Print this page
first pass
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/libnsl/Makefile
+++ new/usr/src/lib/libnsl/Makefile
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21 #
22 22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 #
25 25 #
26 26
27 27 PROTOCOL_DIR= $(ROOTHDRDIR)/rpcsvc
28 28 PROTOCOL_SRCDIR= $(SRC)/head/rpcsvc
29 29 PROTOCOL_UTS_SRCDIR= $(SRC)/uts/common/rpc
30 30
31 31 SUBDIRS = $(MACH)
32 32 $(BUILD64)SUBDIRS += $(MACH64)
33 33
34 34 # objects are listed by source directory
35 35
36 36 # common utility code used in more than one directory
37 37 RPC_DERIVED_FILES=
38 38
39 39 GEN_DERIVED_FILES= \
40 40 nis/gen/nis_clnt.h
41 41
42 42
43 43 PROTOCOL_FILES= \
44 44 $(PROTOCOL_DIR)/daemon_utils.h \
45 45 $(PROTOCOL_DIR)/nis.x \
46 46 $(PROTOCOL_DIR)/nis.h \
47 47 $(PROTOCOL_DIR)/nis_object.x
48 48
49 49 PROTOCOL_FILES_UTS= \
50 50 $(PROTOCOL_DIR)/key_prot.x
51 51
52 52 DERIVED_FILES= $(GEN_DERIVED_FILES) $(RPC_DERIVED_FILES)
53 53
54 54 #
55 55 # Make sure they get cleaned when necessary
56 56 #
57 57 CLEANFILES += $(DERIVED_FILES)
58 58
59 59 # include library definitions
60 60 include ../Makefile.lib
61 61
62 62 # header file delivered to /usr/include; internal to ON build process
63 63 HDRS = nss.h
64 64 HDRDIR = nss
65 65
66 66 LIBRARY= libnsl.a
67 67 TEXT_DOMAIN= SUNW_OST_NETRPC
68 68 POFILE= $(LIBRARY:.a=.po)
69 69 POFILES= generic.po _errlst.po
70 70
71 71 all := TARGET= all
72 72 clean := TARGET= clean
73 73 clobber := TARGET= clobber
74 74 delete := TARGET= delete
75 75 install := TARGET= install
76 76 lint := TARGET= lint
77 77 _msg := TARGET= _msg
78 78 package := TARGET= package
79 79
80 80
81 81 .KEEP_STATE:
82 82
83 83 all: $(PROTOCOL_DIR) $(DERIVED_FILES) .WAIT $(SUBDIRS)
84 84
85 85 headers: $(PROTOCOL_DIR) .WAIT $(PROTOCOL_FILES) $(PROTOCOL_FILES_UTS) \
86 86 $(DERIVED_FILES)
87 87
88 88 install: all .WAIT $(SUBDIRS)
89 89
90 90 install_h: $(ROOTHDRS)
91 91
92 92 # nss.h isn't delivered; no reason to check
93 93 check:
94 94
95 95 clean clobber delete lint package: $(SUBDIRS)
96 96
97 97 $(PROTOCOL_DIR):
98 98 $(INS.dir)
99 99
100 100 $(PROTOCOL_DIR)/%.h: $(PROTOCOL_SRCDIR)/%.h
101 101 $(INS.file)
102 102
103 103 $(PROTOCOL_DIR)/nis.h: $(PROTOCOL_SRCDIR)/nis.x $(PROTOCOL_SRCDIR)/nis_object.x
104 104 $(RPCGEN) -C -h $(PROTOCOL_SRCDIR)/nis.x > nis-tmp.h
105 105 $(SED) -e '/EDIT_START/,$$ d' < nis-tmp.h > nis.h
106 106 $(RM) $@
107 107 $(INS) -s -m $(FILEMODE) -f $(@D) nis.h
108 108 $(RM) nis.h nis-tmp.h
109 109
110 110 $(PROTOCOL_DIR)/%.x: $(PROTOCOL_SRCDIR)/%.x
111 111 $(INS.file)
112 112
113 113 $(PROTOCOL_DIR)/%.x: $(PROTOCOL_UTS_SRCDIR)/%.x
114 114 $(INS.file)
115 115
116 116 #
117 117 # Rules for building the derived files
118 118 #
119 119 # Derived header files
120 120 #
121 121 nis/gen/nis_clnt.h: $(PROTOCOL_DIR)/nis.x $(PROTOCOL_DIR)/nis_object.x
122 122 $(RPCGEN) -C -h $(PROTOCOL_DIR)/nis.x > nis_clnt-gen.h
123 123 $(SED) -n -e '/EDIT_START/,$$ p' < nis_clnt-gen.h |\
124 124 $(SED) -e 's/_3_svc/_svc/' |\
↓ open down ↓ |
124 lines elided |
↑ open up ↑ |
125 125 $(SED) -e 's/_3/_clnt/' > $@
126 126 $(RM) nis_clnt-gen.h
127 127
128 128 #
129 129 # Derived source files
130 130 #
131 131
132 132 # include library targets
133 133 include ../Makefile.targ
134 134
135 -# EXPORT DELETE START
136 -# CRYPT DELETE START
137 -# Special target to clean up the source tree for export distribution
138 -# Warning: This target changes the source tree
139 -EXPORT_SRC:
140 - $(RM) Makefile+ des/des_crypt.c+ des/des_soft.c+ key/xcrypt.c+
141 - $(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
142 - < des/des_crypt.c > des/des_crypt.c+
143 - $(MV) des/des_crypt.c+ des/des_crypt.c
144 - $(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
145 - < des/des_soft.c > des/des_soft.c+
146 - $(MV) des/des_soft.c+ des/des_soft.c
147 - $(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
148 - < key/xcrypt.c > key/xcrypt.c+
149 - $(MV) key/xcrypt.c+ key/xcrypt.c
150 - $(SED) -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
151 - < Makefile > Makefile+
152 - $(MV) Makefile+ Makefile
153 - $(CHMOD) 444 Makefile des/des_crypt.c des/des_soft.c key/xcrypt.c
154 -
155 -CRYPT_SRC:
156 - $(RM) Makefile+
157 - $(SED) -e "/^# CRYPT DELETE START/,/^# CRYPT DELETE END/d" \
158 - < Makefile \
159 - | $(SED) -e "/EXPORT DELETE/d" \
160 - > Makefile+
161 - $(MV) Makefile+ Makefile
162 - $(CHMOD) 444 Makefile
163 -
164 -# CRYPT DELETE END
165 -# EXPORT DELETE END
166 -
167 135 _msg: $(MSGDOMAIN) $(POFILE)
168 136 $(RM) $(MSGDOMAIN)/$(POFILE)
169 137 $(CP) $(POFILE) $(MSGDOMAIN)
170 138
171 139 $(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
172 140 $(RM) $@
173 141 $(CAT) $(POFILES) > $@
174 142
175 143 _errlst.po:
176 144 $(RM) messages.po
177 145 $(XGETTEXT) -a nsl/_errlst.c
178 146 $(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
179 147 $(RM) messages.po
180 148
181 149 generic.po:
182 150 $(RM) messages.po
183 151 $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext */*.[ch] nis/*/*.[ch]*`
184 152 $(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@
185 153 $(RM) messages.po
186 154
187 155 $(MSGDOMAIN):
188 156 $(INS.dir)
189 157
190 158 $(SUBDIRS): FRC
191 159 @cd $@; pwd; $(MAKE) $(TARGET)
192 160
193 161 FRC:
↓ open down ↓ |
17 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX