Home | History | Annotate | Download | only in cmd
      1 #
      2 # CDDL HEADER START
      3 #
      4 # The contents of this file are subject to the terms of the
      5 # Common Development and Distribution License (the License).
      6 # You may not use this file except in compliance with the License.
      7 #
      8 # You can obtain a copy of the license at usr/src/CDDL.txt
      9 # or http://www.opensolaris.org/os/licensing.
     10 # See the License for the specific language governing permissions
     11 # and limitations under the License.
     12 #
     13 # When distributing Covered Code, include this CDDL HEADER in each
     14 # file and include the License file at usr/src/CDDL.txt.
     15 # If applicable, add the following below this CDDL HEADER, with the
     16 # fields enclosed by brackets [] replaced with your own identifying
     17 # information: Portions Copyright [yyyy] [name of copyright owner]
     18 #
     19 # CDDL HEADER END
     20 #
     21 
     22 #
     23 #ident	"@(#)Makefile.targ	1.6	07/11/18 SMI"
     24 #
     25 # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
     26 # Use is subject to license terms.
     27 #
     28 # cmd/Makefile.targ
     29 # common target definitions for command builds
     30 #
     31 
     32 
     33 .KEEP_STATE:
     34 
     35 clobber: clean
     36 	-$(RM) $(PROG) $(CLOBBERFILES)
     37 	-@([ ! -d $(TMPLREPNAME) ] || $(PTCLEAN))
     38 
     39 lint_PROG:
     40 	$(LINT.c) $(PROG).c
     41 
     42 lint_SRCS:
     43 	$(LINT.c) $(SRCS)
     44 
     45 lint: $(LINTFILES)
     46 
     47 #
     48 # For message catalogue files
     49 #
     50 _msg: $(MSGDOMAIN) $(POFILE)
     51 	$(RM) $(MSGDOMAIN)/$(POFILE)
     52 	$(CP) $(POFILE) $(MSGDOMAIN)
     53 
     54 $(MSGDOMAIN):
     55 	$(INS.dir)
     56 
     57 
     58 $(ROOTCLUSTBIN)/%: $(ROOTCLUSTBIN) %
     59 	$(INS.file)
     60 
     61 $(ROOTCLUSTBIN):
     62 	$(INS.dir)
     63 
     64 $(ROOTCLUSTLIB):
     65 	$(INS.dir)
     66 
     67 $(ROOTCLUSTRT)/%: $(ROOTCLUSTRT) %
     68 	$(INS.file)
     69 
     70 $(ROOTCLUSTRT):
     71 	$(INS.dir)
     72 
     73 $(ROOTCLUSTRTREG)/%: $(ROOTCLUSTRTREG) %
     74 	$(INS.file)
     75 
     76 $(ROOTCLUSTRTREG):
     77 	$(INS.dir)
     78 
     79 $(ROOTCLUSTETC)/%: $(ROOTCLUSTETC) %
     80 	$(INS.file)
     81 
     82 $(ROOTCLUSTETC):
     83 	$(INS.dir)
     84 
     85 check: $(CHECK_FILES)
     86 	@$(CAT) $(CHECK_FILES) /dev/null
     87 
     88 $(ROOTOPT):
     89 	$(INS.dir)
     90 
     91 $(ROOTOPTBIN)/%: $(ROOTOPTBIN) %
     92 	$(INS.file)
     93 
     94 $(ROOTOPTBIN): $(ROOTOPT)
     95 	$(INS.dir)
     96 
     97 $(ROOTOPTETC)/%: $(ROOTOPTETC) %
     98 	$(INS.file)
     99 
    100 $(ROOTOPTETC): $(ROOTOPT)
    101 	$(INS.dir)
    102 
    103 $(ROOTOPTLIB)/%: $(ROOTOPTLIB) %
    104 	$(INS.file)
    105 
    106 $(ROOTOPTLIB): $(ROOTOPT)
    107 	$(INS.dir)
    108 
    109 $(ROOTOPTRT): $(ROOTOPT) 
    110 	$(INS.dir)
    111 
    112 $(ROOTOPTRTBIN): $(ROOTOPTRT) 
    113 	$(INS.dir)
    114 
    115 $(ROOTOPTRTETC): $(ROOTOPTRT) 
    116 	$(INS.dir)
    117 
    118 $(ROOTOPTRTETC)/%: $(ROOTOPTRTETC) %
    119 	$(INS.file)
    120 
    121 $(ROOTOPTRTBIN)/%: $(ROOTOPTRTBIN) %
    122 	$(INS.file)
    123 
    124 $(ROOTCLUSTLIBGEOLIB)/% : $(ROOTCLUSTLIBGEOLIB) %
    125 	$(INS.file)
    126 
    127 $(ROOTCLUSTLIBGEOLIB):
    128 	$(INS.dir)
    129 
    130 $(ROOTCLUSTLIBGEORT)/%: $(ROOTCLUSTLIBGEORT) %
    131 	$(INS.file)
    132 
    133 $(ROOTCLUSTLIBGEORT):
    134 	$(INS.dir)
    135 
    136 $(ROOTCLUSTLIBGEORTBIN)/%: $(ROOTCLUSTLIBGEORTBIN) %
    137 	$(INS.file)
    138 
    139 $(ROOTCLUSTLIBGEORTBIN):
    140 	$(INS.dir)
    141 
    142 $(ROOTCLUSTLIBGEORTETC)/%: $(ROOTCLUSTLIBGEORTETC) %
    143 	$(INS.file)
    144 
    145 $(ROOTCLUSTLIBGEORTETC):
    146 	$(INS.dir)
    147 
    148 $(ROOTCLUSTLIBGEOCLI)/%: $(ROOTCLUSTLIBGEOCLI) %
    149 	$(INS.file)
    150 
    151 $(ROOTCLUSTLIBGEOCLI):
    152 	$(INS.dir)
    153 
    154 
    155 $(POFILE):      $(PIFILES)
    156 	$(XGETTEXT) $(XGETFLAGS) -d $(@:%.po=%) $(PIFILES) /dev/null ; \
    157 	if [ -f $(TEXT_DOMAIN).po ]; then \
    158 		cat $(TEXT_DOMAIN).po >> $@; \
    159 		$(RM) $(TEXT_DOMAIN).po; \
    160 	fi
    161 
    162 LHEAD =	( $(ECHO) "\n$@";
    163 LTAIL =	> $@ ; $(CAT) $@)
    164 
    165 %.ln: ../common/%.c
    166 	@($(LHEAD) $(LINT.c) $< $(LTAIL))
    167 
    168 %.ln: ../common/%.cc
    169 	@($(LHEAD) $(LINT.cc) $< $(LTAIL))
    170