Print this page
4027 remove CLOSED_BUILD
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/sun4u/Makefile
+++ new/usr/src/uts/sun4u/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 # This makefile drives the production of all implementation architecture
26 26 # dependent modules for the sun4u architecture.
27 27 #
28 28
29 29 UTSBASE = ..
30 30
31 31 include Makefile.sun4u
32 32
33 33 #
34 34 # The following are SPARC specific (rather than sun4u) specific modules
35 35 # which are required for the sun4u kernel to completely lint. They are
36 36 # not involved in the build in any other way. In order to minimize
37 37 # build time, it is assumed that they are up to date. But since sun4u
38 38 # is really a separate architecture we cannot use the v7 sparc modules.
↓ open down ↓ |
38 lines elided |
↑ open up ↑ |
39 39 #
40 40 SPARC_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR)
41 41
42 42 SPARC_LINTS =
43 43
44 44 #
45 45 #
46 46 #
47 47 LINT_LIBS = $(LINT_LIB) \
48 48 $(LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
49 - $(CLOSED_LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
50 49 $(SPARC_LINTS:%=$(SPARC_LIB_DIR)/llib-l%.ln)
51 50
52 51
53 52 def := TARGET= def
54 53 def.prereq := TARGET= def
55 54 all := TARGET= all
56 55 all.prereq := TARGET= all
57 56 install := TARGET= install
58 57 install.prereq := TARGET= all
59 58 install_h := TARGET= install_h
60 59 install_h.prere := TARGET= install_h
61 60 clean := TARGET= clean
62 61 clobber := TARGET= clobber
63 62 lint := TARGET= lint
↓ open down ↓ |
4 lines elided |
↑ open up ↑ |
64 63 lint.prereq := TARGET= lint
65 64 lintlib := TARGET= lintlib
66 65 modlintlib := TARGET= modlintlib
67 66 modlist := TARGET= modlist
68 67 modlist modlist.sparc := NO_STATE= -K $$MODSTATE$$$$
69 68 clean.lint := TARGET= clean.lint
70 69 check := TARGET= check
71 70
72 71 .KEEP_STATE:
73 72
74 -.PARALLEL: $(PARALLEL_KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
75 - $(IMPLEMENTATIONS) $(CLOSED_IMPLEMENTATIONS) \
73 +.PARALLEL: $(PARALLEL_KMODS) $(XMODS) \
74 + $(IMPLEMENTATIONS) \
76 75 modlist modlist.sparc
77 76
78 77 # Override for CPU_KMODS... they cannot be built
79 78 # in parallel
80 79 .NO_PARALLEL: $(CPU_KMODS)
81 80
82 81 def all clean clobber clean.lint: genassym unix .WAIT \
83 - $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
84 - $(IMPLEMENTATIONS) $(CLOSED_IMPLEMENTATIONS)
82 + $(KMODS) $(XMODS) \
83 + $(IMPLEMENTATIONS)
85 84
86 85 # list the modules under sun4u.
87 -modlist: unix $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
88 - $(IMPLEMENTATIONS:.WAIT=) $(CLOSED_IMPLEMENTATIONS)
86 +modlist: unix $(KMODS) $(XMODS) \
87 + $(IMPLEMENTATIONS:.WAIT=)
89 88
90 89 # list the modules for Install -k sun4u.
91 90 modlist.karch: modlist modlist.sparc
92 91
93 92 modlist.sparc:
94 93 @cd $(SRC)/uts/sparc; pwd; $(MAKE) $(NO_STATE) modlist
95 94
96 -install: install_platforms genassym unix .WAIT $(KMODS) $(CLOSED_KMODS) \
97 - $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS) $(CLOSED_IMPLEMENTATIONS)
95 +install: install_platforms genassym unix .WAIT $(KMODS) \
96 + $(XMODS) $(IMPLEMENTATIONS)
98 97
99 98 lintlib: unix
100 99
101 -modlintlib: $(LINT_KMODS) $(CLOSED_LINT_KMODS)
100 +modlintlib: $(LINT_KMODS)
102 101
103 102 genassym unix $(KMODS): FRC
104 103 @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
105 104
106 105 #
107 106 # Privilege constants
108 107 #
109 108 # NOTE: The rules for generating priv_const.c file are shared between all
110 109 # processor architectures and should be kept in sync. If they are changed in
111 110 # this file make sure that x86 rules are updated as well.
112 111 #
113 112 PRIVS_C = $(UTSBASE)/common/os/priv_const.c
114 113
115 114 $(PRIVS_C): $(PRIVS_AWK) $(PRIVS_DEF)
116 115 $(NAWK) -f $(PRIVS_AWK) < $(PRIVS_DEF) cfile=$@
117 116
118 117
119 118 #
120 119 # Prerequisites
121 120 #
122 121 # The uts/Makefile defines build parallelism for sun4 platforms such that sparc,
123 122 # sun4u and sun4v are all built in parallel. Also this Makefile specifies that
124 123 # all IMPLEMENTATIONS sun4u sub-platforms are built in parallel. This requires
125 124 # building certain parts before the parallel build can start. The uts/Makefile
126 125 # appends the '.prereq' string to the original target and executes this Makefile
127 126 # to build any prerequisites needed before the full parallel build can start.
128 127 # After that make continues with normal targets.
129 128 #
130 129 # Any build prerequisites for sun4 and IMPLEMENTATIONS builds should be
131 130 # described here.
132 131 #
133 132 # genassym is used to build dtrace and genunix, so it should be built first.
134 133 #
135 134 # priv_const.c is required to build genunix.
136 135 #
137 136 # genunix is used by everyone to ctfmerge with. Genunix is merged with sparc/ip
138 137 # so as a side effect this dependency builds sparc/ip as part of the
139 138 # prerequisites.
140 139 #
141 140 # unix is not required by itself but several sun4u platforms require
142 141 # sun4u/platmod to be present. The easiest way to achieve this is to build
143 142 # sun4u/unix first since sun4u/unix Makefile builds sun4u/platform correctly.
144 143 # This causes full sun4u/unix to be built before all sun4u platforms and
145 144 # before uts/sun4v and uts/sparc, but it acceptable since it is not spending
146 145 # too much time building sun4u/unix.
147 146 #
148 147 all.prereq def.prereq install.prereq: genassym genunix unix
149 148
150 149 #
151 150 # Various sun4u platforms expect proto/root_sparc/platform/sun4u/include to be
152 151 # present. This is handled by running make install_h in sun4u/unix directory
153 152 # first.
154 153 #
155 154 install_h.prereq: FRC
156 155 @cd sys; pwd; $(MAKE) $(TARGET)
157 156
158 157 #
159 158 # sun4u/unix and sun4u/genunix should be linted first since sparc does global
160 159 # cross-check with these lint libraries. The sun4u/unix and sun4u/genunix can be
161 160 # linted in parallel.
162 161 #
163 162 LINT_PREREQ = unix.lint genunix.lint
164 163 lint.prereq: $(LINT_PREREQ)
165 164
166 165 .PARALLEL: $(LINT_PREREQ)
167 166
168 167 $(LINT_PREREQ):
169 168 @cd $(@:%.lint=%); pwd; $(MAKE) $(TARGET)
170 169
171 170 #
172 171 # Nothing to do with any other prerequisites
173 172 #
174 173 %.prereq:
175 174
176 175 #
177 176 # Platform inter-dependencies
178 177 #
179 178 lw8: serengeti
180 179
181 180 quasar: darwin
182 181
183 182 #
184 183 # The genunix requires priv_const.c file to be generated first.
↓ open down ↓ |
73 lines elided |
↑ open up ↑ |
185 184 #
186 185 genunix: $(PRIVS_C)
187 186
188 187 #
189 188 # Rules
190 189 #
191 190
192 191 $(IMPLEMENTATIONS): FRC
193 192 @cd $@; pwd; THISIMPL=$@ $(MAKE) $(NO_STATE) $(TARGET)
194 193
195 -$(CLOSED_IMPLEMENTATIONS): FRC
196 - cd $(CLOSED)/uts/sun4u/$@; pwd; \
197 - THISIMPL=$@ $(MAKE) $(NO_STATE) $(TARGET); \
198 -
199 194 $(XMODS): FRC
200 195 @if [ -f $@/Makefile ]; then \
201 196 cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
202 197 else \
203 198 true; \
204 199 fi
205 200
206 -$(CLOSED_XMODS): FRC
207 - @if [ -f $(CLOSED)/uts/sun4u/$@/Makefile ]; then \
208 - cd $(CLOSED)/uts/sun4u/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
209 - else \
210 - true; \
211 - fi
212 -
213 -$(CLOSED_KMODS): FRC
214 - cd $(CLOSED)/uts/sun4u/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
215 -
216 201 install_h check: install_platforms $(IMPLEMENTATIONS) \
217 - $(CLOSED_IMPLEMENTATIONS) FRC
218 202 @cd sys; pwd; $(MAKE) $(TARGET)
219 203 @cd vm; pwd; $(MAKE) $(TARGET)
220 204
221 205 #
222 206 # Rules for the /platforms directories. This is hardwired here because
223 207 # the first stage of the project (KBI) only implements the userland
224 208 # changes, but the only reasonable place to record the aliases is
225 209 # here in kernel land.
226 210 #
227 211 $(ROOT_PLAT_DIRS): $(ROOT_PLAT_DIR)
228 212 -$(INS.dir)
229 213
230 214 #
231 215 # create directories in /usr/platform/ for the implementations that are
232 216 # defined in $(IMPLEMENTED_PLATFORM)
233 217 # (eg. SUNW,Ultra-1)
234 218 #
235 219 # Foreach $(IMPLEMENTED_PLATFORM) there can be a list of $(LINKED_PLATFORMS)
236 220 # that are linked to it.
237 221 #
238 222 $(USR_PLAT_DIR)/$(IMPLEMENTED_PLATFORM): $(USR_PLAT_DIR)
239 223 -$(INS.dir)
240 224
241 225 #
242 226 # create the links in /usr/platform/ foreach $(LINKED_PLATFORMS)
243 227 # to it's corresponding $(IMPLEMENTED_PLATFORM).
244 228 #
245 229 PLATFORMS = $(LINKED_PLATFORMS)
246 230
247 231 $(USR_PLAT_DIRS): $(USR_PLAT_DIR)
248 232 $(INS.slink3)
249 233
250 234 PLATFORMS += $(IMPLEMENTED_PLATFORM)
251 235
252 236 #
253 237 # Make the /platforms directories. This is hardwired here because
254 238 # the first stage of the project (KBI) only implements the userland
255 239 # changes, but the only reasonable place to record the aliases is
256 240 # here in kernel land.
257 241 #
258 242 install_platforms: $(ROOT_PSM_DIR) $(USR_PSM_DIR) \
259 243 $(ROOT_PLAT_DIRS) $(USR_PLAT_DIRS) \
260 244 $(USR_DESKTOP_DIR) $(USR_DESKTOP_INC_DIR) \
261 245 $(USR_DESKTOP_SBIN_DIR) $(USR_DESKTOP_LIB_DIR)
262 246
263 247 #
264 248 # rules for making include, sbin, lib dirs/links in
265 249 # /usr/platform/$(PLATFORM)/ for desktop platforms
266 250 #
267 251 $(USR_DESKTOP_INC_DIR): $(USR_DESKTOP_DIR)
268 252 $(INS.slink4)
269 253
270 254 $(USR_DESKTOP_SBIN_DIR): $(USR_DESKTOP_DIR)
271 255 $(INS.slink5)
272 256
273 257 $(USR_DESKTOP_LIB_DIR): $(USR_DESKTOP_DIR)
274 258 -$(INS.dir)
275 259
276 260 #
↓ open down ↓ |
49 lines elided |
↑ open up ↑ |
277 261 # Full kernel lint target.
278 262 #
279 263 LINT_TARGET = globallint
280 264
281 265 globallint:
282 266 @pwd
283 267 @-$(ECHO) "\nSUN4U KERNEL: global crosschecks:"
284 268 @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
285 269
286 270 lint: lintlib .WAIT modlintlib .WAIT $(SPARC_LINTS) $(LINT_DEPS) \
287 - $(IMPLEMENTATIONS) $(CLOSED_IMPLEMENTATIONS) $(CPU_KMODS)
271 + $(IMPLEMENTATIONS) $(CPU_KMODS)
288 272
289 273 include ../Makefile.targ
290 274
291 275 #
292 276 # Cross-reference customization: build a cross-reference over all of the
293 277 # sun4u-related directories.
294 278 #
295 -SHARED_XRDIRS = ../sun4u ../sun4 ../sfmmu ../sparc ../sun ../common
296 -CLOSED_XRDIRS = $(SHARED_XRDIRS:../%=../% ../../../closed/uts/%)
297 -XRDIRS = $(SHARED_XRDIRS)
298 -$(CLOSED_BUILD)XRDIRS = $(CLOSED_XRDIRS:../../../closed/uts/sfmmu=)
299 -
279 +XRDIRS = ../sun4u ../sun4 ../sfmmu ../sparc ../sun ../common
300 280 XRPRUNE = i86pc
301 281
302 282 cscope.out tags: FRC
303 283 $(XREF) -x $@
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX