Print this page
4027 remove CLOSED_BUILD
4028 remove CLOSED_IS_PRESENT
4029 remove tonic build bits
Reviewed by: Andy Stormont <andyjstormont@gmail.com>
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= \
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 80 all := TARGET= all
81 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 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
↓ open down ↓ |
127 lines elided |
↑ open up ↑ |
128 128
129 129 clean: $(SUBDIRS) head pkg
130 130 clobber: $(SUBDIRS) head pkg clobber_local
131 131 clobber_local:
132 132 @cd tools; pwd; $(MAKE) clobber
133 133 @cd common/mapfiles; pwd; $(MAKE) clobber
134 134 @cd msg; pwd; $(MAKE) clobber
135 135
136 136 closedbins: bldtools $(ROOTDIRS) FRC
137 137 @CLOSED_ROOT="$$ON_CLOSED_BINS/root_$(MACH)$${RELEASE_BUILD+-nd}"; \
138 - if [ "$$CLOSED_IS_PRESENT" = no ]; then \
139 - if [ ! -d "$$CLOSED_ROOT" ]; then \
140 - $(ECHO) "Error: if closed sources are not present," \
141 - "ON_CLOSED_BINS must point to closed binaries."; \
142 - $(ECHO) "root_$(MACH)$${RELEASE_BUILD+-nd} is not" \
143 - "present in $$ON_CLOSED_BINS."; \
144 - exit 1; \
145 - fi; \
146 - $(ECHO) "Copying closed binaries from $$CLOSED_ROOT"; \
147 - (cd $$CLOSED_ROOT; \
148 - $(TAR) cfX - $(CODEMGR_WS)/exception_lists/closed-bins .) | \
149 - (cd $(ROOT); $(TAR) xBpf -); \
150 - ( cd $(ROOT); $(CTFSTRIP) $$(cd $$CLOSED_ROOT; $(FIND) \
151 - ./kernel ./usr/kernel ./platform/*/kernel -type f -a -perm -u+x | \
152 - $(EGREP) -vf $(CODEMGR_WS)/exception_lists/closed-bins) ); \
153 - fi
138 + if [ ! -d "$$CLOSED_ROOT" ]; then \
139 + $(ECHO) "Error: ON_CLOSED_BINS must point to closed" \
140 + "binaries."; \
141 + $(ECHO) "root_$(MACH)$${RELEASE_BUILD+-nd} is not" \
142 + "present in $$ON_CLOSED_BINS."; \
143 + exit 1; \
144 + fi; \
145 + $(ECHO) "Copying closed binaries from $$CLOSED_ROOT"; \
146 + (cd $$CLOSED_ROOT; \
147 + $(TAR) cfX - $(CODEMGR_WS)/exception_lists/closed-bins .) | \
148 + (cd $(ROOT); $(TAR) xBpf -); \
149 + ( cd $(ROOT); $(CTFSTRIP) $$(cd $$CLOSED_ROOT; $(FIND) \
150 + ./kernel ./usr/kernel ./platform/*/kernel -type f -a -perm -u+x | \
151 + $(EGREP) -vf $(CODEMGR_WS)/exception_lists/closed-bins) )
154 152
155 153 #
156 154 # Declare what parts can be built in parallel
157 155 # DUMMY at the end is used in case macro expansion produces an empty string to
158 156 # prevent everything going in parallel
159 157 #
160 158 .PARALLEL: $(PARALLEL_HEADERS) DUMMY
161 159 .PARALLEL: $(PARALLEL_DIRS) DUMMY
162 160
163 161 $(SUBDIRS) head pkg: FRC
164 162 @cd $@; pwd; $(MAKE) $(TARGET)
165 163
166 164 # librpcsvc has a dependency on headers installed by
167 165 # userheaders, hence the .WAIT before libheaders.
168 166 sgs: rootdirs .WAIT sysheaders userheaders .WAIT \
169 167 libheaders cmdheaders
170 168
171 169 #
172 170 # Top-level setup target to setup the development environment that includes
173 171 # headers, tools and generated mapfiles. For open-only builds (i.e.: source
174 172 # trees w/o usr/closed), this also depends on the closedbins target (above)
175 173 # in order to properly seed the proto area. Note, although the tools are
176 174 # dependent on a number of constant mapfiles, the tools themselves are
177 175 # required to build the generated mapfiles.
178 176 #
179 177 setup: closedbins bldtools sgs mapfiles
180 178
181 179 bldtools:
182 180 @cd tools; pwd; $(MAKE) install
183 181
184 182 # /var/mail/:saved is a special case because of the colon in the name.
185 183 #
186 184 rootdirs: $(ROOTDIRS)
187 185 $(INS) -d -m 775 $(ROOT)/var/mail/:saved
188 186
189 187 lint: FRC
190 188 $(MAKE) -f Makefile.lint
191 189
192 190 _msgdirs: $(MSGDIRS)
193 191
194 192 $(ROOTDIRS) $(MSGDIRS):
195 193 $(INS.dir)
196 194
197 195 userheaders: FRC
198 196 @cd head; pwd; $(MAKE) install_h
199 197
200 198 libheaders: bldtools
201 199 @cd lib; pwd; $(MAKE) install_h
202 200
203 201 sysheaders: FRC
204 202 @cd uts; pwd; $(MAKE) install_h
205 203
↓ open down ↓ |
42 lines elided |
↑ open up ↑ |
206 204 cmdheaders: FRC
207 205 @cd cmd/fm; pwd; $(MAKE) install_h
208 206 @cd cmd/mdb; pwd; $(MAKE) install_h
209 207
210 208 check: $(CHKHDRSUBDIRS) $(CHKMFSTSUBDIRS)
211 209
212 210 #
213 211 # Cross-reference customization: skip all of the subdirectories that
214 212 # don't contain actual source code.
215 213 #
216 -$(CLOSED_BUILD)XRDIRS += ../closed
217 214 XRPRUNE = pkg prototypes
218 215 XRINCDIRS = uts/common head ucbhead
219 -$(CLOSED_BUILD)XRINCDIRS = uts/common ../closed/uts/common head ucbhead
220 216
221 217 cscope.out tags: FRC
222 218 $(XREF) -f -x $@
223 219
224 220 FRC:
225 221
226 222 #
227 223 # Targets for reporting compiler versions; nightly uses these.
228 224 #
229 225
230 226 cc-version:
231 227 @if $($(MACH)_CC) -_versions >/dev/null 2>/dev/null; then \
232 228 $(ECHO) 32-bit compiler; \
233 229 $(ECHO) $($(MACH)_CC); \
234 230 $($(MACH)_CC) -_versions 2>&1 | \
235 231 $(EGREP) '^(cw|cc|gcc|primary|shadow)'; \
236 232 else \
237 233 __COMPILER=`$($(MACH)_CC) -_compiler 2>/dev/null || $(TRUE)`;\
238 234 if [ -z "$$__COMPILER" ]; then \
239 235 $(ECHO) No 32-bit compiler found; \
240 236 exit 1; \
241 237 else \
242 238 $(ECHO) 32-bit compiler; \
243 239 $(ECHO) $($(MACH)_CC); \
244 240 $(ECHO) $$__COMPILER; \
245 241 $($(MACH)_CC) -V 2>&1 | head -1; \
246 242 fi; \
247 243 fi
248 244
249 245 cc64-version:
250 246 @if $($(MACH64)_CC) -_versions >/dev/null 2>/dev/null; then \
251 247 $(ECHO) 64-bit compiler; \
252 248 $(ECHO) $($(MACH64)_CC); \
253 249 $($(MACH64)_CC) -_versions 2>&1 | \
254 250 $(EGREP) '^(cw|cc|gcc|primary|shadow)'; \
255 251 else \
256 252 __COMPILER=`$($(MACH64)_CC) -_compiler 2>/dev/null || $(TRUE)`;\
257 253 if [ -z "$$__COMPILER" ]; then \
258 254 $(ECHO) No 64-bit compiler found; \
259 255 exit 1; \
260 256 else \
261 257 $(ECHO) 64-bit compiler; \
262 258 $(ECHO) $($(MACH64)_CC); \
263 259 $(ECHO) $$__COMPILER; \
264 260 $($(MACH64)_CC) -V 2>&1 | head -1; \
265 261 fi; \
266 262 fi
267 263
268 264 java-version:
269 265 @if [ -x "$(JAVAC)" ]; then \
270 266 $(ECHO) $(JAVAC); \
271 267 $(JAVA_ROOT)/bin/java -fullversion 2>&1 | head -1; \
272 268 else \
273 269 $(ECHO) No Java compiler found; \
274 270 exit 1; \
275 271 fi
↓ open down ↓ |
46 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX