Print this page
onc plus-be-gone
first pass
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/Makefile
+++ new/usr/src/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 #
23 23 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
24 24 # Copyright (c) 2012 by Delphix. All rights reserved.
25 25 #
26 26
27 27 #
28 28 # Makefile for system source
29 29 #
30 30 # include global definitions
31 31 include Makefile.master
32 32 #
33 33 # the Targetdirs file is the AT&T target.dirs file in a makefile format.
34 34 # it defines TARGETDIRS and ROOTDIRS.
35 35 include Targetdirs
36 36
37 37 COMMON_SUBDIRS= uts lib cmd ucblib ucbcmd psm man test
38 38 sparc_SUBDIRS= stand
39 39 i386_SUBDIRS= grub
40 40
41 41 #
42 42 # sparc needs to build stand before psm
43 43 #
44 44 $(SPARC_BLD)psm: stand
45 45
46 46 SUBDIRS= $(COMMON_SUBDIRS) $($(MACH)_SUBDIRS)
47 47
48 48 HDRSUBDIRS= uts head lib cmd
49 49
50 50 # UCB headers are bug-for-bug compatible and not checkable against the header
51 51 # standards.
52 52 #
53 53 CHKHDRSUBDIRS= head uts lib
54 54
55 55 #
56 56 # Headers that can be built in parallel
57 57 #
58 58 PARALLEL_HEADERS = sysheaders userheaders libheaders cmdheaders
59 59
60 60 #
61 61 # Directories that can be built in parallel
62 62 #
63 63 PARALLEL_DIRS = uts lib man
64 64
65 65 # The check target also causes smf(5) service manifests to be validated.
66 66 CHKMFSTSUBDIRS= cmd
67 67
68 68 MSGSUBDIRS= cmd ucbcmd lib
69 69 DOMAINS= \
↓ open down ↓ |
69 lines elided |
↑ open up ↑ |
70 70 SUNW_OST_ADMIN \
71 71 SUNW_OST_NETRPC \
72 72 SUNW_OST_OSCMD \
73 73 SUNW_OST_OSLIB \
74 74 SUNW_OST_UCBCMD \
75 75 SUNW_OST_ZONEINFO
76 76
77 77 MSGDDIRS= $(DOMAINS:%=$(MSGROOT)/%)
78 78 MSGDIRS= $(MSGROOT) $(MSGDDIRS) $(MSGROOT)/LC_TIME
79 79
80 -all all_xmod := TARGET= all
81 -install install_xmod := TARGET= install
80 +all := TARGET= all
81 +install := TARGET= install
82 82 install1 := TARGET= install
83 83 install2 := TARGET= install
84 84 install_h := TARGET= install_h
85 85 clean := TARGET= clean
86 86 clobber := TARGET= clobber
87 87 check := TARGET= check
88 88
89 89 .KEEP_STATE:
90 90
91 91 #
92 92 # Note: install does not cause a build in pkg. To build packages,
93 93 # cd pkg and do a 'make install'
94 94 #
95 95
96 96 all: mapfiles closedbins sgs .WAIT $(SUBDIRS) pkg
97 97
98 98 #
99 99 # The _msg build is a two-step process. First, the _msg dependency
100 100 # causes recursive makes in $(MSGSUBDIRS), which stages raw message
101 101 # files in $(ROOT)/catalog. Second, the action from the install
102 102 # target rule causes those messages to be post-processed from where
103 103 # they were staged in $(ROOT)/catalog, and the results placed into the
104 104 # proto area.
105 105 #
106 106 # The stage-licenses target causes the license files needed for
107 107 # packaging to be pulled from $(SRC) and $(CLOSED) and staged in
108 108 # $(ROOT)/licenses.
109 109 #
110 110 install: install1 install2 _msg stage-licenses
111 111 @cd msg; pwd; $(MAKE) _msg
112 112 @rm -rf "$(ROOT)/catalog"
113 113
114 114 stage-licenses: install2
115 115 @cd pkg; pwd; $(MAKE) stage-licenses
116 116
117 117 install1: mapfiles closedbins sgs
118 118
119 119 install2: install1 $(SUBDIRS)
120 120
121 121 _msg: _msgdirs rootdirs install2 FRC
122 122 @for m in $(MSGSUBDIRS); do \
123 123 cd $$m; pwd; $(MAKE) _msg; cd ..; \
124 124 done
125 125
126 126 mapfiles: bldtools
127 127 @cd common/mapfiles; pwd; $(MAKE) install
128 128
129 129 clean clobber: $(SUBDIRS) head pkg
130 130
131 131 closedbins: bldtools $(ROOTDIRS) FRC
132 132 @CLOSED_ROOT="$$ON_CLOSED_BINS/root_$(MACH)$${RELEASE_BUILD+-nd}"; \
133 133 if [ "$$CLOSED_IS_PRESENT" = no ]; then \
134 134 if [ ! -d "$$CLOSED_ROOT" ]; then \
135 135 $(ECHO) "Error: if closed sources are not present," \
136 136 "ON_CLOSED_BINS must point to closed binaries."; \
137 137 $(ECHO) "root_$(MACH)$${RELEASE_BUILD+-nd} is not" \
138 138 "present in $$ON_CLOSED_BINS."; \
139 139 exit 1; \
140 140 fi; \
141 141 $(ECHO) "Copying closed binaries from $$CLOSED_ROOT"; \
142 142 (cd $$CLOSED_ROOT; \
143 143 $(TAR) cfX - $(CODEMGR_WS)/exception_lists/closed-bins .) | \
144 144 (cd $(ROOT); $(TAR) xBpf -); \
145 145 ( cd $(ROOT); $(CTFSTRIP) $$(cd $$CLOSED_ROOT; $(FIND) \
146 146 ./kernel ./usr/kernel ./platform/*/kernel -type f -a -perm -u+x | \
147 147 $(EGREP) -vf $(CODEMGR_WS)/exception_lists/closed-bins) ); \
148 148 fi
149 149
150 150 #
151 151 # Declare what parts can be built in parallel
152 152 # DUMMY at the end is used in case macro expansion produces an empty string to
153 153 # prevent everything going in parallel
154 154 #
155 155 .PARALLEL: $(PARALLEL_HEADERS) DUMMY
156 156 .PARALLEL: $(PARALLEL_DIRS) DUMMY
157 157
158 158 $(SUBDIRS) head pkg: FRC
159 159 @cd $@; pwd; $(MAKE) $(TARGET)
160 160
161 161 # librpcsvc has a dependency on headers installed by
162 162 # userheaders, hence the .WAIT before libheaders.
163 163 sgs: rootdirs .WAIT sysheaders userheaders .WAIT \
164 164 libheaders cmdheaders
165 165
166 166 #
167 167 # Top-level setup target to setup the development environment that includes
168 168 # headers, tools and generated mapfiles. For open-only builds (i.e.: source
169 169 # trees w/o usr/closed), this also depends on the closedbins target (above)
170 170 # in order to properly seed the proto area. Note, although the tools are
171 171 # dependent on a number of constant mapfiles, the tools themselves are
172 172 # required to build the generated mapfiles.
173 173 #
174 174 setup: closedbins bldtools sgs mapfiles
175 175
176 176 bldtools:
177 177 @cd tools; pwd; $(MAKE) install
178 178
179 179 # /var/mail/:saved is a special case because of the colon in the name.
180 180 #
181 181 rootdirs: $(ROOTDIRS)
182 182 $(INS) -d -m 775 $(ROOT)/var/mail/:saved
183 183
184 184 lint: FRC
185 185 $(MAKE) -f Makefile.lint
186 186
187 187 _msgdirs: $(MSGDIRS)
188 188
189 189 $(ROOTDIRS) $(MSGDIRS):
190 190 $(INS.dir)
191 191
192 192 userheaders: FRC
193 193 @cd head; pwd; $(MAKE) install_h
194 194
↓ open down ↓ |
103 lines elided |
↑ open up ↑ |
195 195 libheaders: bldtools
196 196 @cd lib; pwd; $(MAKE) install_h
197 197
198 198 sysheaders: FRC
199 199 @cd uts; pwd; $(MAKE) install_h
200 200
201 201 cmdheaders: FRC
202 202 @cd cmd/fm; pwd; $(MAKE) install_h
203 203 @cd cmd/mdb; pwd; $(MAKE) install_h
204 204
205 -# each xmod target depends on a corresponding MACH-specific pseudotarget
206 -# before doing common xmod work
207 -#
208 -all_xmod install_xmod: $$@_$(MACH)
209 - @cd uts/common/sys; pwd; $(MAKE) svvs_h
210 -
211 -all_xmod_sparc install_xmod_sparc: FRC
212 - @cd uts/sparc; pwd; \
213 - $(MAKE) TARGET=$(TARGET) svvs pm wsdrv
214 -
215 -all_xmod_i386 install_xmod_i386: FRC
216 - @cd uts/i86; pwd; $(MAKE) TARGET=$(TARGET) svvs
217 -
218 205 check: $(CHKHDRSUBDIRS) $(CHKMFSTSUBDIRS)
219 206
220 207 #
221 208 # Cross-reference customization: skip all of the subdirectories that
222 209 # don't contain actual source code.
223 210 #
224 211 $(CLOSED_BUILD)XRDIRS += ../closed
225 -XRPRUNE = pkg prototypes xmod
212 +XRPRUNE = pkg prototypes
226 213 XRINCDIRS = uts/common head ucbhead
227 214 $(CLOSED_BUILD)XRINCDIRS = uts/common ../closed/uts/common head ucbhead
228 215
229 216 cscope.out tags: FRC
230 217 $(XREF) -f -x $@
231 218
232 219 FRC:
233 220
234 -# EXPORT DELETE START
235 -
236 -XMOD_DELETE_FILES:sh = cat xmod/xmod_files
237 -
238 -EXPORT_SRC:
239 - @cd $(CLOSED)/cmd/cmd-inet/usr.lib/in.iked; pwd; $(MAKE) EXPORT_SRC
240 - @cd $(CLOSED)/cmd/cmd-inet/usr.lib/ike-certutils; pwd; \
241 - $(MAKE) EXPORT_SRC
242 - @cd cmd/cmd-inet/usr.sbin; pwd; $(MAKE) EXPORT_SRC
243 - @cd $(CLOSED)/cmd/cmd-crypto/etc; pwd; $(MAKE) EXPORT_SRC
244 - @cd cmd/crypt; pwd; $(MAKE) EXPORT_SRC
245 - @cd cmd/gss/gssd; pwd; $(MAKE) EXPORT_SRC
246 - @cd cmd/krb5/kadmin; pwd; $(MAKE) EXPORT_SRC
247 - @cd cmd/sendmail/src; pwd; $(MAKE) EXPORT_SRC
248 - @cd common/crypto/aes; pwd; $(MAKE) EXPORT_SRC
249 - @cd common/crypto/arcfour; pwd; $(MAKE) EXPORT_SRC
250 - @cd common/crypto/blowfish; pwd; $(MAKE) EXPORT_SRC
251 - @cd common/crypto/des; pwd; $(MAKE) EXPORT_SRC
252 - @cd common/crypto/rsa; pwd; $(MAKE) EXPORT_SRC
253 - @cd lib/crypt_modules/bsdbf; pwd ; $(MAKE) EXPORT_SRC
254 - @cd lib/gss_mechs/mech_dummy; pwd; $(MAKE) EXPORT_SRC
255 - @cd lib/gss_mechs/mech_dh/backend; pwd; $(MAKE) EXPORT_SRC
256 - @cd lib/gss_mechs/mech_krb5; pwd; $(MAKE) EXPORT_SRC
257 - @cd lib/gss_mechs/mech_spnego; pwd; $(MAKE) EXPORT_SRC
258 - @cd lib/libcrypt; pwd; $(MAKE) EXPORT_SRC
259 - @cd lib/libgss; pwd; $(MAKE) EXPORT_SRC
260 - @cd $(CLOSED)/lib/libike; pwd; $(MAKE) EXPORT_SRC
261 - @cd lib/libnsl; pwd; $(MAKE) EXPORT_SRC
262 - @cd lib/pkcs11/pkcs11_softtoken/common; pwd; $(MAKE) EXPORT_SRC
263 - @cd lib/libsldap; pwd; $(MAKE) EXPORT_SRC
264 - @cd lib/libsasl; pwd; $(MAKE) EXPORT_SRC
265 - @cd lib/sasl_plugins; pwd; $(MAKE) EXPORT_SRC
266 - @cd lib/pam_modules/krb5; pwd; $(MAKE) EXPORT_SRC
267 - @cd psm/stand/boot; pwd; $(MAKE) EXPORT_SRC
268 - @cd uts/common/crypto/io; pwd; $(MAKE) EXPORT_SRC
269 - @cd uts/common/des; pwd; $(MAKE) EXPORT_SRC
270 - @cd uts/common/rpc; pwd; $(MAKE) EXPORT_SRC
271 - @cd uts/common/sys; pwd; $(MAKE) EXPORT_SRC
272 - @cd uts/common/gssapi/include; pwd; $(MAKE) EXPORT_SRC
273 - @cd uts/common/gssapi; pwd; $(MAKE) EXPORT_SRC
274 - @cd uts/common/gssapi/mechs/dummy; pwd; $(MAKE) EXPORT_SRC
275 - @cd uts/common/gssapi/mechs/krb5; pwd; $(MAKE) EXPORT_SRC
276 - @cd uts/common; pwd; $(MAKE) EXPORT_SRC
277 - @cd uts/sparc; pwd; $(MAKE) EXPORT_SRC
278 - @cd $(CLOSED)/uts/sun4u/forthdebug; pwd; $(MAKE) EXPORT_SRC
279 - @cd $(CLOSED)/uts/sun4v/forthdebug; pwd; $(MAKE) EXPORT_SRC
280 - @cd uts/intel; pwd; $(MAKE) EXPORT_SRC
281 - @cd uts/sun4u; pwd; $(MAKE) EXPORT_SRC
282 - @cd $(CLOSED)/uts/sun4v/io/ncp; pwd; $(MAKE) EXPORT_SRC
283 - @cd $(CLOSED)/uts/sun4v/io/n2cp; pwd; $(MAKE) EXPORT_SRC
284 - @cd pkg; pwd; $(MAKE) EXPORT_SRC
285 - $(RM) -r $(XMOD_DELETE_FILES)
286 - $(RM) Targetdirs+
287 - sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
288 - < Targetdirs > Targetdirs+
289 - $(MV) Targetdirs+ Targetdirs
290 - $(CHMOD) 444 Targetdirs
291 - $(RM) Makefile+
292 - sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
293 - < Makefile > Makefile+
294 - $(MV) Makefile+ Makefile
295 - $(CHMOD) 444 Makefile
296 - $(RM) Makefile.master+
297 - sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
298 - < Makefile.master > Makefile.master+
299 - $(MV) Makefile.master+ Makefile.master
300 - $(CHMOD) 444 Makefile.master
301 -
302 -CRYPT_SRC:
303 - @cd $(CLOSED)/cmd/cmd-crypto/etc; pwd; $(MAKE) CRYPT_SRC
304 - @cd $(CLOSED)/cmd/cmd-inet/usr.lib/in.iked; pwd; $(MAKE) CRYPT_SRC
305 - @cd $(CLOSED)/cmd/cmd-inet/usr.lib/ike-certutils; pwd; \
306 - $(MAKE) CRYPT_SRC
307 - @cd lib/crypt_modules/bsdbf; pwd ; $(MAKE) CRYPT_SRC
308 - @cd lib/gss_mechs/mech_dummy; pwd; $(MAKE) CRYPT_SRC
309 - @cd lib/gss_mechs/mech_dh/backend; pwd; $(MAKE) CRYPT_SRC
310 - @cd lib/gss_mechs/mech_krb5; pwd; $(MAKE) CRYPT_SRC
311 - @cd lib/gss_mechs/mech_spnego; pwd; $(MAKE) CRYPT_SRC
312 - @cd $(CLOSED)/lib/libike; pwd; $(MAKE) CRYPT_SRC
313 - @cd lib/libnsl; pwd; $(MAKE) CRYPT_SRC
314 - @cd lib/libsasl; pwd; $(MAKE) CRYPT_SRC
315 - @cd lib/sasl_plugins; pwd; $(MAKE) CRYPT_SRC
316 - @cd lib/pam_modules/krb5; pwd; $(MAKE) CRYPT_SRC
317 - @cd uts/common/gssapi; pwd; $(MAKE) CRYPT_SRC
318 - @cd uts/common/gssapi/include; pwd; $(MAKE) CRYPT_SRC
319 - @cd uts/common/gssapi/mechs/dummy; pwd; $(MAKE) CRYPT_SRC
320 - @cd uts/common/gssapi/mechs/krb5; pwd; $(MAKE) CRYPT_SRC
321 - $(RM) Makefile+
322 - sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
323 - < Makefile > Makefile+
324 - $(MV) Makefile+ Makefile
325 - $(CHMOD) 444 Makefile
326 - $(RM) Makefile.master+
327 - sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
328 - < Makefile.master > Makefile.master+
329 - $(MV) Makefile.master+ Makefile.master
330 - $(CHMOD) 444 Makefile.master
331 -
332 -# EXPORT DELETE END
333 -
334 -ONC_PLUS:
335 - @cd cmd/login; pwd; $(MAKE) ONC_PLUS
336 - @cd uts; pwd; $(MAKE) ONC_PLUS
337 -
338 221 #
339 222 # Targets for reporting compiler versions; nightly uses these.
340 223 #
341 224
342 225 cc-version:
343 226 @if $($(MACH)_CC) -_versions >/dev/null 2>/dev/null; then \
344 227 $(ECHO) 32-bit compiler; \
345 228 $(ECHO) $($(MACH)_CC); \
346 229 $($(MACH)_CC) -_versions 2>&1 | \
347 230 $(EGREP) '^(cw|cc|gcc|primary|shadow)'; \
348 231 else \
349 232 __COMPILER=`$($(MACH)_CC) -_compiler 2>/dev/null || $(TRUE)`;\
350 233 if [ -z "$$__COMPILER" ]; then \
351 234 $(ECHO) No 32-bit compiler found; \
352 235 exit 1; \
353 236 else \
354 237 $(ECHO) 32-bit compiler; \
355 238 $(ECHO) $($(MACH)_CC); \
356 239 $(ECHO) $$__COMPILER; \
357 240 $($(MACH)_CC) -V 2>&1 | head -1; \
358 241 fi; \
359 242 fi
360 243
361 244 cc64-version:
362 245 @if $($(MACH64)_CC) -_versions >/dev/null 2>/dev/null; then \
363 246 $(ECHO) 64-bit compiler; \
364 247 $(ECHO) $($(MACH64)_CC); \
365 248 $($(MACH64)_CC) -_versions 2>&1 | \
366 249 $(EGREP) '^(cw|cc|gcc|primary|shadow)'; \
367 250 else \
368 251 __COMPILER=`$($(MACH64)_CC) -_compiler 2>/dev/null || $(TRUE)`;\
369 252 if [ -z "$$__COMPILER" ]; then \
370 253 $(ECHO) No 64-bit compiler found; \
371 254 exit 1; \
372 255 else \
373 256 $(ECHO) 64-bit compiler; \
374 257 $(ECHO) $($(MACH64)_CC); \
375 258 $(ECHO) $$__COMPILER; \
376 259 $($(MACH64)_CC) -V 2>&1 | head -1; \
377 260 fi; \
378 261 fi
379 262
380 263 java-version:
381 264 @if [ -x "$(JAVAC)" ]; then \
382 265 $(ECHO) $(JAVAC); \
383 266 $(JAVA_ROOT)/bin/java -fullversion 2>&1 | head -1; \
384 267 else \
385 268 $(ECHO) No Java compiler found; \
386 269 exit 1; \
387 270 fi
↓ open down ↓ |
40 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX