xref: /illumos-gate/usr/src/cmd/valtools/Makefile (revision 55fea89dcaa64928bed4327112404dcb3e07b79f)
1*7c478bd9Sstevel@tonic-gate#
2*7c478bd9Sstevel@tonic-gate# CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate#
4*7c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate# (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate# with the License.
8*7c478bd9Sstevel@tonic-gate#
9*7c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate# and limitations under the License.
13*7c478bd9Sstevel@tonic-gate#
14*7c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate#
20*7c478bd9Sstevel@tonic-gate# CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate#
22*7c478bd9Sstevel@tonic-gate#
23*7c478bd9Sstevel@tonic-gate#ident	"%Z%%M%	%I%	%E% SMI"
24*7c478bd9Sstevel@tonic-gate#
25*7c478bd9Sstevel@tonic-gate# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
26*7c478bd9Sstevel@tonic-gate# Use is subject to license terms.
27*7c478bd9Sstevel@tonic-gate#
28*7c478bd9Sstevel@tonic-gate# cmd/valtools/Makefile
29*7c478bd9Sstevel@tonic-gate#
30*7c478bd9Sstevel@tonic-gate
31*7c478bd9Sstevel@tonic-gatePROG= ckint ckitem ckpath ckrange ckstr ckyorn \
32*7c478bd9Sstevel@tonic-gate      ckkeywd ckdate cktime ckuid ckgid
33*7c478bd9Sstevel@tonic-gate
34*7c478bd9Sstevel@tonic-gatePOFILES= ckdate.po ckgid.po ckint.po ckitem.po \
35*7c478bd9Sstevel@tonic-gate	ckkeywd.po ckpath.po ckrange.po ckstr.po \
36*7c478bd9Sstevel@tonic-gate	cktime.po ckuid.po ckyorn.po puttext.po
37*7c478bd9Sstevel@tonic-gate
38*7c478bd9Sstevel@tonic-gateinclude ../Makefile.cmd
39*7c478bd9Sstevel@tonic-gate
40*7c478bd9Sstevel@tonic-gateLIBADMDIR=	../../lib/libadm/inc
41*7c478bd9Sstevel@tonic-gateCPPFLAGS +=	-I$(LIBADMDIR)
42*7c478bd9Sstevel@tonic-gateCFLAGS +=	$(CCVERBOSE)
43*7c478bd9Sstevel@tonic-gateLDLIBS += -ladm
44*7c478bd9Sstevel@tonic-gatePOFILE= valtools.po
45*7c478bd9Sstevel@tonic-gateCLOBBERFILES +=	puttext $(POFILES) $(POFILE)
46*7c478bd9Sstevel@tonic-gateCLEANFILES += puttext
47*7c478bd9Sstevel@tonic-gate
48*7c478bd9Sstevel@tonic-gateVCKS=	valint helpint errint  \
49*7c478bd9Sstevel@tonic-gate	helpitem erritem  \
50*7c478bd9Sstevel@tonic-gate        valpath helppath errpath  \
51*7c478bd9Sstevel@tonic-gate	valrange helprange errange  \
52*7c478bd9Sstevel@tonic-gate	valstr helpstr errstr  \
53*7c478bd9Sstevel@tonic-gate	valyorn helpyorn erryorn  \
54*7c478bd9Sstevel@tonic-gate	valtime helptime errtime  \
55*7c478bd9Sstevel@tonic-gate	valdate helpdate errdate  \
56*7c478bd9Sstevel@tonic-gate	dispuid valuid helpuid erruid  \
57*7c478bd9Sstevel@tonic-gate	dispgid valgid helpgid errgid
58*7c478bd9Sstevel@tonic-gate
59*7c478bd9Sstevel@tonic-gateDISPS=	dispuid dispgid
60*7c478bd9Sstevel@tonic-gate
61*7c478bd9Sstevel@tonic-gateROOTSADMDIR=	$(ROOT)/usr/sadm/bin
62*7c478bd9Sstevel@tonic-gate
63*7c478bd9Sstevel@tonic-gateROOTPUTTEXT=	$(ROOTSADMDIR)/puttext
64*7c478bd9Sstevel@tonic-gateROOTVCKS=	$(VCKS:%=$(ROOTSADMDIR)/%)
65*7c478bd9Sstevel@tonic-gateROOTDISPS=	$(DISPS:%=$(ROOTBIN)/%)
66*7c478bd9Sstevel@tonic-gate
67*7c478bd9Sstevel@tonic-gate
68*7c478bd9Sstevel@tonic-gate# valtool install rules
69*7c478bd9Sstevel@tonic-gate$(ROOTSADMDIR)/%: %
70*7c478bd9Sstevel@tonic-gate	$(INS.file)
71*7c478bd9Sstevel@tonic-gate
72*7c478bd9Sstevel@tonic-gate# there is a special case here for errange
73*7c478bd9Sstevel@tonic-gate#
74*7c478bd9Sstevel@tonic-gate$(ROOTSADMDIR)/disp% \
75*7c478bd9Sstevel@tonic-gate$(ROOTSADMDIR)/val% \
76*7c478bd9Sstevel@tonic-gate$(ROOTSADMDIR)/help% \
77*7c478bd9Sstevel@tonic-gate$(ROOTSADMDIR)/err% \
78*7c478bd9Sstevel@tonic-gate$(ROOTSADMDIR)/er% \
79*7c478bd9Sstevel@tonic-gate$(ROOTBIN)/disp%: $(ROOTBIN)/ck%
80*7c478bd9Sstevel@tonic-gate	$(RM) $@; $(LN) $< $@
81*7c478bd9Sstevel@tonic-gate
82*7c478bd9Sstevel@tonic-gate
83*7c478bd9Sstevel@tonic-gate.KEEP_STATE:
84*7c478bd9Sstevel@tonic-gate
85*7c478bd9Sstevel@tonic-gate.PARALLEL:	 $(PROG) puttext
86*7c478bd9Sstevel@tonic-gate
87*7c478bd9Sstevel@tonic-gateall: $(PROG) puttext
88*7c478bd9Sstevel@tonic-gate
89*7c478bd9Sstevel@tonic-gateinstall: all $(ROOTSADMDIR) $(ROOTPROG) $(ROOTPUTTEXT) $(ROOTVCKS) $(ROOTDISPS)
90*7c478bd9Sstevel@tonic-gate
91*7c478bd9Sstevel@tonic-gate$(ROOTSADMDIR):
92*7c478bd9Sstevel@tonic-gate	$(INS.dir)
93*7c478bd9Sstevel@tonic-gate
94*7c478bd9Sstevel@tonic-gate$(POFILE):	$(POFILES)
95*7c478bd9Sstevel@tonic-gate	$(RM) $@
96*7c478bd9Sstevel@tonic-gate	cat $(POFILES) > $@
97*7c478bd9Sstevel@tonic-gate
98*7c478bd9Sstevel@tonic-gateclean:
99*7c478bd9Sstevel@tonic-gate
100*7c478bd9Sstevel@tonic-gatelint:
101*7c478bd9Sstevel@tonic-gate	$(LINT.c) ckint.c   $(LDLIBS)
102*7c478bd9Sstevel@tonic-gate	$(LINT.c) ckitem.c  $(LDLIBS)
103*7c478bd9Sstevel@tonic-gate	$(LINT.c) ckpath.c  $(LDLIBS)
104*7c478bd9Sstevel@tonic-gate	$(LINT.c) ckrange.c $(LDLIBS)
105*7c478bd9Sstevel@tonic-gate	$(LINT.c) ckstr.c   $(LDLIBS)
106*7c478bd9Sstevel@tonic-gate	$(LINT.c) ckyorn.c  $(LDLIBS)
107*7c478bd9Sstevel@tonic-gate	$(LINT.c) ckkeywd.c $(LDLIBS)
108*7c478bd9Sstevel@tonic-gate	$(LINT.c) ckdate.c  $(LDLIBS)
109*7c478bd9Sstevel@tonic-gate	$(LINT.c) cktime.c  $(LDLIBS)
110*7c478bd9Sstevel@tonic-gate	$(LINT.c) ckuid.c   $(LDLIBS)
111*7c478bd9Sstevel@tonic-gate	$(LINT.c) ckgid.c   $(LDLIBS)
112*7c478bd9Sstevel@tonic-gate	$(LINT.c) puttext.c $(LDLIBS)
113*7c478bd9Sstevel@tonic-gate
114*7c478bd9Sstevel@tonic-gateinclude ../Makefile.targ
115