Print this page
9128 cw(1onbld) should be able to run multiple shadows
9129 file-locking tests shouldn't build multiple source files in one compiler invocation
9130 DTrace tst.gcc.d isn't useful
9132 cw(1onbld) shouldn't shadow pure preprocessing
Reviewed by: Andy Fiddaman <omnios@citrus-it.net>
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]
↓ open down ↓ |
17 lines elided |
↑ open up ↑ |
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 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
26 26 # Copyright 2015 OmniTI Computer Consulting, Inc. All rights reserved.
27 27 # Copyright 2016 Toomas Soome <tsoome@me.com>
28 -# Copyright 2017 Joyent, Inc.
28 +# Copyright 2018 Joyent, Inc.
29 29 # Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
30 30 #
31 31
32 32 #
33 33 # Makefile for system source
34 34 #
35 35 # include global definitions
36 36 include Makefile.master
37 37 #
38 38 # the Targetdirs file is the AT&T target.dirs file in a makefile format.
39 39 # it defines TARGETDIRS and ROOTDIRS.
40 40 include Targetdirs
41 41
42 42 COMMON_SUBDIRS= data uts lib cmd ucblib ucbcmd psm man test
43 43 sparc_SUBDIRS= stand
44 44 i386_SUBDIRS= grub boot
45 45
46 46 #
47 47 # sparc needs to build stand before psm
48 48 #
49 49 $(SPARC_BLD)psm: stand
50 50
51 51 SUBDIRS= $(COMMON_SUBDIRS) $($(MACH)_SUBDIRS)
52 52
53 53 HDRSUBDIRS= uts head lib cmd
54 54
55 55 # UCB headers are bug-for-bug compatible and not checkable against the header
56 56 # standards.
57 57 #
58 58 CHKHDRSUBDIRS= head uts lib
59 59
60 60 #
61 61 # Headers that can be built in parallel
62 62 #
63 63 PARALLEL_HEADERS = sysheaders userheaders libheaders cmdheaders
64 64
65 65 #
66 66 # Directories that can be built in parallel
67 67 #
68 68 PARALLEL_DIRS = data uts lib man
69 69
70 70 # The check target also causes smf(5) service manifests to be validated.
71 71 CHKMFSTSUBDIRS= cmd
72 72
73 73 # And man page formats
74 74 CHKMANSUBDIRS = man
75 75
76 76 MSGSUBDIRS= cmd ucbcmd lib data
77 77 DOMAINS= \
78 78 SUNW_OST_ADMIN \
79 79 SUNW_OST_NETRPC \
80 80 SUNW_OST_OSCMD \
81 81 SUNW_OST_OSLIB \
82 82 SUNW_OST_UCBCMD \
83 83 SUNW_OST_ZONEINFO
84 84
85 85 MSGDDIRS= $(DOMAINS:%=$(MSGROOT)/%)
86 86 MSGDIRS= $(MSGROOT) $(MSGDDIRS) $(MSGROOT)/LC_TIME
87 87
88 88 all := TARGET= all
89 89 install := TARGET= install
90 90 install1 := TARGET= install
91 91 install2 := TARGET= install
92 92 install_h := TARGET= install_h
93 93 clean := TARGET= clean
94 94 clobber := TARGET= clobber
95 95 check := TARGET= check
96 96
97 97 .KEEP_STATE:
98 98
99 99 #
100 100 # Note: install does not cause a build in pkg. To build packages,
101 101 # cd pkg and do a 'make install'
102 102 #
103 103
104 104 all: mapfiles closedbins sgs .WAIT $(SUBDIRS) pkg
105 105
106 106 #
107 107 # The _msg build is a two-step process. First, the _msg dependency
108 108 # causes recursive makes in $(MSGSUBDIRS), which stages raw message
109 109 # files in $(ROOT)/catalog. Second, the action from the install
110 110 # target rule causes those messages to be post-processed from where
111 111 # they were staged in $(ROOT)/catalog, and the results placed into the
112 112 # proto area.
113 113 #
114 114 # The stage-licenses target causes the license files needed for
115 115 # packaging to be pulled from $(SRC) and $(CLOSED) and staged in
116 116 # $(ROOT)/licenses.
117 117 #
118 118 install: install1 install2 _msg stage-licenses
119 119 @cd msg; pwd; $(MAKE) _msg
120 120 @rm -rf "$(ROOT)/catalog"
121 121
122 122 stage-licenses: install2
123 123 @cd pkg; pwd; $(MAKE) stage-licenses
124 124
125 125 install1: mapfiles closedbins sgs
126 126
127 127 install2: install1 .WAIT $(SUBDIRS)
128 128
129 129 _msg: _msgdirs rootdirs FRC
130 130 @for m in $(MSGSUBDIRS); do \
131 131 cd $$m; pwd; $(MAKE) _msg; cd ..; \
132 132 done
133 133
134 134 mapfiles: bldtools
135 135 @cd common/mapfiles; pwd; $(MAKE) install
136 136
137 137 clean: $(SUBDIRS) head pkg
138 138 clobber: $(SUBDIRS) head pkg clobber_local
139 139 clobber_local:
140 140 @cd tools; pwd; $(MAKE) clobber
141 141 @cd common/mapfiles; pwd; $(MAKE) clobber
142 142 @cd msg; pwd; $(MAKE) clobber
143 143
144 144 # If the tarballs are included inside ON_CLOSED_BINS, use those to extract and
145 145 # preserve the permissions (in case a distro ships them).
146 146
147 147 closedbins: bldtools $(ROOTDIRS) FRC
148 148 @CLOSED_ROOT="$$ON_CLOSED_BINS/root_$(MACH)$${RELEASE_BUILD+-nd}"; \
149 149 if [ -f "$$ON_CLOSED_BINS/on-closed-bins$${RELEASE_BUILD+-nd}.$(MACH).tar.bz2" ]; then \
150 150 $(ECHO) "Extracting tarball $$ON_CLOSED_BINS/on-closed-bins$${RELEASE_BUILD+-nd}.$(MACH).tar.bz2"; \
151 151 (cd $(CODEMGR_WS); \
152 152 $(TAR) xjpf $$ON_CLOSED_BINS/on-closed-bins$${RELEASE_BUILD+-nd}.$(MACH).tar.bz2); \
153 153 CLOSED_ROOT="$(CODEMGR_WS)/closed/root_$(MACH)$${RELEASE_BUILD+-nd}"; \
154 154 fi; \
155 155 if [ ! -d "$$CLOSED_ROOT" ]; then \
156 156 $(ECHO) "Error: ON_CLOSED_BINS must point to closed" \
157 157 "binaries."; \
158 158 $(ECHO) "root_$(MACH)$${RELEASE_BUILD+-nd} is not" \
159 159 "present in $$ON_CLOSED_BINS."; \
160 160 exit 1; \
161 161 fi; \
162 162 $(ECHO) "Copying closed binaries from $$CLOSED_ROOT"; \
163 163 (cd $$CLOSED_ROOT; \
164 164 $(TAR) cfX - $(CODEMGR_WS)/exception_lists/closed-bins .) | \
165 165 (cd $(ROOT); $(TAR) xBpf -); \
166 166 ( cd $(ROOT); $(CTFSTRIP) $$(cd $$CLOSED_ROOT; $(FIND) \
167 167 ./kernel ./usr/kernel ./platform/*/kernel -type f -a -perm -u+x | \
168 168 $(EGREP) -vf $(CODEMGR_WS)/exception_lists/closed-bins) )
169 169
170 170 #
171 171 # Declare what parts can be built in parallel
172 172 # DUMMY at the end is used in case macro expansion produces an empty string to
173 173 # prevent everything going in parallel
174 174 #
175 175 .PARALLEL: $(PARALLEL_HEADERS) DUMMY
176 176 .PARALLEL: $(PARALLEL_DIRS) DUMMY
177 177
178 178 $(SUBDIRS) head pkg: FRC
179 179 @cd $@; pwd; $(MAKE) $(TARGET)
180 180
181 181 # librpcsvc has a dependency on headers installed by
182 182 # userheaders, hence the .WAIT before libheaders.
183 183 sgs: rootdirs .WAIT sysheaders userheaders .WAIT \
184 184 libheaders cmdheaders
185 185
186 186 #
187 187 # Top-level setup target to setup the development environment that includes
188 188 # headers, tools and generated mapfiles. For open-only builds (i.e.: source
189 189 # trees w/o usr/closed), this also depends on the closedbins target (above)
190 190 # in order to properly seed the proto area. Note, although the tools are
191 191 # dependent on a number of constant mapfiles, the tools themselves are
192 192 # required to build the generated mapfiles.
193 193 #
194 194 setup: closedbins bldtools sgs mapfiles
195 195
196 196 bldtools:
197 197 @cd tools; pwd; $(MAKE) install
198 198
199 199 # /var/mail/:saved is a special case because of the colon in the name.
200 200 #
201 201 rootdirs: $(ROOTDIRS)
202 202 $(INS) -d -m 775 $(ROOT)/var/mail/:saved
203 203
204 204 lint: FRC
205 205 $(MAKE) -f Makefile.lint
206 206
207 207 _msgdirs: $(MSGDIRS)
208 208
209 209 $(ROOTDIRS) $(MSGDIRS):
210 210 $(INS.dir)
211 211
212 212 userheaders: FRC
213 213 @cd head; pwd; $(MAKE) install_h
214 214
215 215 libheaders: bldtools
216 216 @cd lib; pwd; $(MAKE) install_h
217 217
218 218 sysheaders: FRC
219 219 @cd uts; pwd; $(MAKE) install_h
220 220
221 221 cmdheaders: FRC
222 222 @cd cmd/devfsadm; pwd; $(MAKE) install_h
223 223 @cd cmd/fm; pwd; $(MAKE) install_h
224 224 @cd cmd/mdb; pwd; $(MAKE) install_h
225 225
226 226 check: $(CHKHDRSUBDIRS) $(CHKMFSTSUBDIRS) $(CHKMANSUBDIRS)
227 227
228 228 #
229 229 # Cross-reference customization: skip all of the subdirectories that
↓ open down ↓ |
191 lines elided |
↑ open up ↑ |
230 230 # don't contain actual source code.
231 231 #
232 232 XRPRUNE = pkg prototypes
233 233 XRINCDIRS = uts/common head ucbhead
234 234
235 235 cscope.out tags: FRC
236 236 $(XREF) -f -x $@
237 237
238 238 FRC:
239 239
240 -#
241 -# Targets for reporting compiler versions; nightly uses these.
242 -#
243 -
240 +# used by nightly
244 241 cc-version:
245 - @if $($(MACH)_CC) -_versions >/dev/null 2>/dev/null; then \
246 - $(ECHO) 32-bit compiler; \
247 - $(ECHO) $($(MACH)_CC); \
248 - $($(MACH)_CC) -_versions 2>&1 | \
249 - $(EGREP) '^(cw|cc|gcc|primary|shadow)'; \
250 - else \
251 - __COMPILER=`$($(MACH)_CC) -_compiler 2>/dev/null || $(TRUE)`;\
252 - if [ -z "$$__COMPILER" ]; then \
253 - $(ECHO) No 32-bit compiler found; \
254 - exit 1; \
255 - else \
256 - $(ECHO) 32-bit compiler; \
257 - $(ECHO) $($(MACH)_CC); \
258 - $(ECHO) $$__COMPILER; \
259 - $($(MACH)_CC) -V 2>&1 | head -1; \
260 - fi; \
261 - fi
242 + @$(CW) --versions $(CW_CC_COMPILERS) 2>&1
262 243
244 +# for older nightlies
263 245 cc64-version:
264 - @if $($(MACH64)_CC) -_versions >/dev/null 2>/dev/null; then \
265 - $(ECHO) 64-bit compiler; \
266 - $(ECHO) $($(MACH64)_CC); \
267 - $($(MACH64)_CC) -_versions 2>&1 | \
268 - $(EGREP) '^(cw|cc|gcc|primary|shadow)'; \
269 - else \
270 - __COMPILER=`$($(MACH64)_CC) -_compiler 2>/dev/null || $(TRUE)`;\
271 - if [ -z "$$__COMPILER" ]; then \
272 - $(ECHO) No 64-bit compiler found; \
273 - exit 1; \
274 - else \
275 - $(ECHO) 64-bit compiler; \
276 - $(ECHO) $($(MACH64)_CC); \
277 - $(ECHO) $$__COMPILER; \
278 - $($(MACH64)_CC) -V 2>&1 | head -1; \
279 - fi; \
280 - fi
281 246
282 247 java-version:
283 248 @if [ -x "$(JAVAC)" ]; then \
284 249 $(ECHO) $(JAVAC); \
285 250 $(JAVA_ROOT)/bin/java -fullversion 2>&1 | head -1; \
286 251 else \
287 252 $(ECHO) No Java compiler found; \
288 253 exit 1; \
289 254 fi
290 255
291 256 openssl-version:
292 257 @if [ -x "$(OPENSSL)" ]; then \
293 258 $(ECHO) $(OPENSSL); \
294 259 $(OPENSSL) version; \
295 260 $(OPENSSL) version -f | \
296 261 $(SED) -n '/_API/{s/.*_API/ API/;s/ -.*//;p;}'; \
297 262 else \
298 263 $(ECHO) No OpenSSL utility found; \
299 264 fi
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX