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/OPENSOLARIS.LICENSE
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/OPENSOLARIS.LICENSE.
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 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
24 #
25 #
26
27 include ../../Makefile.master
28 include ../Makefile.lib
29
30 MANIFEST= client.xml
31 MANIFESTDIR= $(ROOT)/var/svc/manifest/network/dns
32 ROOTMANIFEST= $(MANIFEST:%=$(MANIFESTDIR)/%)
33
34 $(ROOTMANIFEST) := FILEMODE = 444
35 $(ROOTMANIFEST) := OWNER = root
36 $(ROOTMANIFEST) := GROUP = bin
37
38 CHKMANIFEST= $(MANIFEST:%.xml=%.xmlchk)
39
40 SUBDIRS= include $(MACH)
41 $(BUILD64)SUBDIRS += $(MACH64)
42 SUBDIRS += .WAIT irs
43
44 # EXPORT DELETE START
45 # CRYPT DELETE START
46 SUBDIRS += cylink dnssafe
47 # CRYPT DELETE END
48 # EXPORT DELETE END
49
50 all := TARGET= all
51 clean := TARGET= clean
52 clobber := TARGET= clobber
53 install := TARGET= install
54 lint := TARGET= lint
55 _msg := TARGET= _msg
56
57 LIBRARY= libresolv.a
58 TEXT_DOMAIN= SUNW_OST_OSLIB
59 XGETFLAGS= -a
60 POFILE= $(LIBRARY:.a=.po)
61 POFILES= generic.po
62
63 SED= sed
64 GREP= grep
65
66 .KEEP_STATE:
67
68 all clean clobber lint: $(SUBDIRS)
69
70 install: $(SUBDIRS) $(ROOTMANIFEST)
71
72 $(ROOTMANIFEST): $(MANIFESTDIR)
73
74 $(MANIFESTDIR):
75 $(INS.dir)
76
77 $(MANIFESTDIR)/%: %
78 $(INS.file)
79
80 # install rule for install_h target
81 $(ROOTHDRDIR)/%: %
82 $(INS.file)
83
84 install_h: $(ROOTHDRS)
85
86 check: $(CHECKHDRS) $(CHKMANIFEST)
87
88 # EXPORT DELETE START
89 # CRYPT DELETE START
90 # Special targets to clean up the source tree for export distribution
91 # Warning: These target change the source tree
92 EXPORT_SRC:
93 $(RM) Makefile+
94 $(SED) -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
95 < Makefile > Makefile+
96 $(MV) Makefile+ Makefile
97 $(CHMOD) 444 Makefile
98 /usr/bin/find cylink dnssafe common/cylink common/dnssafe \
99 -name SCCS -prune -o -type f -exec $(RM) {} \;
100
101 CRYPT_SRC:
102 $(RM) Makefile+
103 $(SED) -e "/^# CRYPT DELETE START/,/^# CRYPT DELETE END/d" \
104 < Makefile > Makefile+
105 $(MV) Makefile+ Makefile
106 $(CHMOD) 444 Makefile
107 /usr/bin/find cylink dnssafe common/cylink common/dnssafe \
108 -name SCCS -prune -o -type f -exec $(RM) {} \;
109
110 # CRYPT DELETE END
111 # EXPORT DELETE END
112
113 _msg: $(MSGDOMAIN) $(POFILE)
114 $(RM) $(MSGDOMAIN)/$(POFILE)
115 $(CP) $(POFILE) $(MSGDOMAIN)
116
117 $(POFILE): $(POFILES)
118 $(RM) $@
119 $(CAT) $(POFILES) > $@
120
121 $(POFILES):
122 $(RM) messages.po
123 $(XGETTEXT) $(XGETFLAGS) *.[ch]* */*.[ch]*
124 $(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
125 $(RM) messages.po
126
127 $(SUBDIRS): FRC
128 @cd $@; pwd; $(MAKE) $(TARGET); echo
129
130 FRC: