author | mfang |
Tue, 24 Sep 2013 14:34:55 -0700 | |
changeset 20197 | 8a8f4f7b8356 |
parent 15903 | bc0e6cd9d760 |
permissions | -rw-r--r-- |
0 | 1 |
# |
9930 | 2 |
# Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. |
0 | 3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
# |
|
5 |
# This code is free software; you can redistribute it and/or modify it |
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
|
5499 | 7 |
# published by the Free Software Foundation. Oracle designates this |
0 | 8 |
# particular file as subject to the "Classpath" exception as provided |
5499 | 9 |
# by Oracle in the LICENSE file that accompanied this code. |
0 | 10 |
# |
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
# accompanied this code). |
|
16 |
# |
|
17 |
# You should have received a copy of the GNU General Public License version |
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
# |
|
5499 | 21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
# or visit www.oracle.com if you need additional information or have any |
|
23 |
# questions. |
|
0 | 24 |
# |
25 |
||
26 |
################################################################ |
|
27 |
# SANITY |
|
28 |
################################################################ |
|
29 |
||
30 |
sanity:: pre-sanity settings insane environment |
|
31 |
||
32 |
ifeq ($(BUILD_HOTSPOT), true) |
|
33 |
sanity:: hotspot-sanity |
|
34 |
endif |
|
35 |
||
36 |
ifeq ($(BUILD_DEPLOY), true) |
|
37 |
sanity:: deploy-sanity |
|
38 |
endif |
|
39 |
||
40 |
ifeq ($(BUILD_JDK), true) |
|
11946
ea3e0a10bf9b
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9930
diff
changeset
|
41 |
sanity:: jdk-sanity |
0 | 42 |
endif |
43 |
||
44 |
# Only need these sanity rules when not doing a debug build |
|
45 |
ifeq ($(DEBUG_NAME),) |
|
46 |
||
47 |
ifeq ($(BUILD_INSTALL), true) |
|
48 |
sanity:: install-sanity |
|
49 |
endif |
|
50 |
||
51 |
ifeq ($(BUILD_SPONSORS), true) |
|
52 |
sanity:: sponsors-sanity |
|
53 |
endif |
|
54 |
||
55 |
endif |
|
56 |
||
57 |
sanity:: post-sanity |
|
58 |
||
9930 | 59 |
source-sanity : pre-sanity post-sanity |
0 | 60 |
|
61 |
$(ERROR_FILE) $(WARNING_FILE) $(MESSAGE_FILE): |
|
62 |
@$(prep-target) |
|
63 |
||
64 |
purge-sanity: $(ERROR_FILE) $(WARNING_FILE) $(MESSAGE_FILE) |
|
65 |
-@$(RM) $(ERROR_FILE) $(WARNING_FILE) $(MESSAGE_FILE) |
|
66 |
||
11946
ea3e0a10bf9b
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9930
diff
changeset
|
67 |
pre-sanity: purge-sanity |
0 | 68 |
|
69 |
# this should be the last rule in any target's sanity rule. |
|
70 |
post-sanity post-sanity-hotspot post-sanity-jdk post-sanity-install post-sanity-deploy: |
|
71 |
@if [ -r $(MESSAGE_FILE) ]; then \ |
|
72 |
$(ECHO) "" ; \ |
|
73 |
$(CAT) $(MESSAGE_FILE) ; \ |
|
74 |
fi |
|
75 |
@if [ -r $(WARNING_FILE) ]; then \ |
|
76 |
$(CAT) $(WARNING_FILE) ; \ |
|
77 |
fi |
|
78 |
@if [ "x$(INSANE)" != x ]; then \ |
|
79 |
$(ECHO) "INSANE mode requested. \n" \ |
|
80 |
"Sanity will not force a build termination, even with errors.\n" \ |
|
81 |
"" >> $(ERROR_FILE); \ |
|
82 |
fi |
|
83 |
@if [ -r $(ERROR_FILE) ]; then \ |
|
84 |
if [ "x$(INSANE)" = x ]; then \ |
|
85 |
$(ECHO) "Exiting because of the above error(s). \n" \ |
|
86 |
"">> $(ERROR_FILE); \ |
|
87 |
fi ; \ |
|
88 |
$(CAT) $(ERROR_FILE) ; \ |
|
89 |
if [ "x$(INSANE)" = x ]; then \ |
|
90 |
exit 1 ; \ |
|
91 |
fi ; \ |
|
92 |
fi |
|
93 |
ifdef PEDANTIC |
|
94 |
@if [ -r $(WARNING_FILE) ]; then \ |
|
95 |
$(ECHO) "PEDANTIC mode requested. \n" \ |
|
96 |
"Exiting because of the above warning(s). \n" \ |
|
97 |
"" >> $(ERROR_FILE); \ |
|
98 |
$(CAT) $(ERROR_FILE) ; \ |
|
99 |
exit 1 ; \ |
|
100 |
fi |
|
101 |
endif |
|
102 |
@if [ ! -r $(ERROR_FILE) ]; then \ |
|
103 |
$(ECHO) "Sanity check passed." ; \ |
|
104 |
fi |
|
105 |
||
106 |
insane: |
|
107 |
ifdef INSANE |
|
108 |
@$(ECHO) "WARNING: You are building in 'INSANE' mode. You \n" \ |
|
109 |
" should not use this mode, and in fact, \n" \ |
|
110 |
" it may be removed at any time. If you \n" \ |
|
111 |
" have build problems as a result of using \n" \ |
|
112 |
" INSANE mode, then you should not expect \n" \ |
|
113 |
" assistance from anyone with the problems \n" \ |
|
114 |
" or consequences you experience. \n" \ |
|
115 |
"" >> $(WARNING_FILE) |
|
116 |
endif |
|
117 |
||
118 |
# Get list of environment variables set that we do not want set |
|
119 |
ifdef ALT_HOTSPOT_SERVER_PATH |
|
120 |
DO_NOT_SET_LIST += ALT_HOTSPOT_SERVER_PATH |
|
121 |
endif |
|
122 |
ifdef ALT_HOTSPOT_CLIENT_PATH |
|
123 |
DO_NOT_SET_LIST += ALT_HOTSPOT_CLIENT_PATH |
|
124 |
endif |
|
125 |
ifdef ALT_HOTSPOT_LIB_PATH |
|
126 |
DO_NOT_SET_LIST += ALT_HOTSPOT_LIB_PATH |
|
127 |
endif |
|
128 |
||
129 |
# Error message for environment variable set that should not be |
|
130 |
%.do_not_set: |
|
131 |
@$(ECHO) "ERROR: Your build environment has the variable\n" \ |
|
132 |
" $* defined. Please unset it and restart your build. \n" \ |
|
133 |
"" >> $(ERROR_FILE) |
|
134 |
||
11946
ea3e0a10bf9b
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9930
diff
changeset
|
135 |
# Check the environment variables |
0 | 136 |
environment: $(DO_NOT_SET_LIST:%=%.do_not_set) |
137 |
ifeq ($(LANGTOOLS_SRC_AVAILABLE), true) |
|
138 |
ifneq ($(BUILD_LANGTOOLS), true) |
|
139 |
@$(ECHO) "WARNING: You are not building the LANGTOOLS sources.\n" \ |
|
140 |
" Lang tools (javac) will be obtained from \n" \ |
|
141 |
" the location set in ALT_JDK_IMPORT_PATH. \n" \ |
|
142 |
"" >> $(WARNING_FILE) |
|
143 |
endif |
|
144 |
endif |
|
145 |
ifeq ($(JAXP_SRC_AVAILABLE), true) |
|
146 |
ifneq ($(BUILD_JAXP), true) |
|
147 |
@$(ECHO) "WARNING: You are not building the JAXP sources.\n" \ |
|
148 |
" The jaxp files will be obtained from \n" \ |
|
149 |
" the location set in ALT_JDK_IMPORT_PATH. \n" \ |
|
150 |
"" >> $(WARNING_FILE) |
|
151 |
endif |
|
152 |
endif |
|
153 |
ifeq ($(JAXWS_SRC_AVAILABLE), true) |
|
154 |
ifneq ($(BUILD_JAXWS), true) |
|
155 |
@$(ECHO) "WARNING: You are not building the JAXWS sources.\n" \ |
|
156 |
" The jaxws files will be obtained from \n" \ |
|
157 |
" the location set in ALT_JDK_IMPORT_PATH. \n" \ |
|
158 |
"" >> $(WARNING_FILE) |
|
159 |
endif |
|
160 |
endif |
|
161 |
ifeq ($(CORBA_SRC_AVAILABLE), true) |
|
162 |
ifneq ($(BUILD_CORBA), true) |
|
163 |
@$(ECHO) "WARNING: You are not building the CORBA sources.\n" \ |
|
164 |
" The corba files will be obtained from \n" \ |
|
165 |
" the location set in ALT_JDK_IMPORT_PATH. \n" \ |
|
166 |
"" >> $(WARNING_FILE) |
|
167 |
endif |
|
168 |
endif |
|
169 |
ifeq ($(HOTSPOT_SRC_AVAILABLE), true) |
|
170 |
ifneq ($(BUILD_HOTSPOT), true) |
|
171 |
@$(ECHO) "WARNING: You are not building the HOTSPOT sources.\n" \ |
|
172 |
" Hotspot libs will be obtained from \n" \ |
|
173 |
" the location set in ALT_HOTSPOT_IMPORT_PATH. \n" \ |
|
174 |
"" >> $(WARNING_FILE) |
|
175 |
endif |
|
176 |
endif |
|
177 |
ifeq ($(JDK_SRC_AVAILABLE), true) |
|
178 |
ifneq ($(BUILD_JDK), true) |
|
179 |
@$(ECHO) "WARNING: You are not building the JDK sources.\n" \ |
|
180 |
" This will result in a development-only\n" \ |
|
181 |
" build of the JDK , lacking the jdk binaries.\n" \ |
|
182 |
"" >> $(WARNING_FILE) |
|
183 |
endif |
|
184 |
endif |
|
15903 | 185 |
ifeq ($(NASHORN_SRC_AVAILABLE), true) |
186 |
ifneq ($(BUILD_NASHORN), true) |
|
187 |
@$(ECHO) "WARNING: You are not building the NASHORN sources.\n" \ |
|
188 |
" The nashorn files will be obtained from \n" \ |
|
189 |
" the location set in ALT_JDK_IMPORT_PATH. \n" \ |
|
190 |
"" >> $(WARNING_FILE) |
|
191 |
endif |
|
192 |
endif |
|
0 | 193 |
ifeq ($(DEPLOY_SRC_AVAILABLE), true) |
194 |
ifneq ($(BUILD_DEPLOY), true) |
|
195 |
@$(ECHO) "WARNING: You are not building the DEPLOY sources.\n" \ |
|
196 |
" This will result in a development-only\n" \ |
|
197 |
" build of the JDK, lacking the plugin and javaws binaries.\n" \ |
|
198 |
"" >> $(WARNING_FILE) |
|
199 |
endif |
|
200 |
endif |
|
201 |
ifeq ($(INSTALL_SRC_AVAILABLE), true) |
|
202 |
ifneq ($(BUILD_INSTALL), true) |
|
203 |
@$(ECHO) "WARNING: You are not building the INSTALL sources.\n" \ |
|
204 |
" This will result in a development-only\n" \ |
|
205 |
" build of the JDK, lacking the installation bundles\n" \ |
|
206 |
"" >> $(WARNING_FILE) |
|
207 |
endif |
|
208 |
endif |
|
209 |
ifeq ($(SPONSORS_SRC_AVAILABLE), true) |
|
210 |
ifneq ($(BUILD_SPONSORS), true) |
|
211 |
@$(ECHO) "WARNING: You are not building the SPONSORS sources.\n" \ |
|
212 |
"" >> $(WARNING_FILE) |
|
213 |
endif |
|
214 |
endif |
|
4309
39ca605f0647
6727046: Add message when docs are skipped in control build
ohair
parents:
3259
diff
changeset
|
215 |
ifeq ($(GENERATE_DOCS),false) |
11946
ea3e0a10bf9b
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9930
diff
changeset
|
216 |
@$(ECHO) "WARNING: This build does not include generating javadoc.\n" \ |
ea3e0a10bf9b
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9930
diff
changeset
|
217 |
"" >> $(WARNING_FILE) |
ea3e0a10bf9b
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9930
diff
changeset
|
218 |
endif |
ea3e0a10bf9b
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9930
diff
changeset
|
219 |
ifdef NO_DEMOS |
ea3e0a10bf9b
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9930
diff
changeset
|
220 |
@$(ECHO) "WARNING: This build and any install images will not include demos.\n" \ |
ea3e0a10bf9b
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9930
diff
changeset
|
221 |
"" >> $(WARNING_FILE) |
ea3e0a10bf9b
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9930
diff
changeset
|
222 |
endif |
ea3e0a10bf9b
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9930
diff
changeset
|
223 |
ifdef NO_SAMPLES |
ea3e0a10bf9b
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9930
diff
changeset
|
224 |
@$(ECHO) "WARNING: This build and any install images will not include samples.\n" \ |
0 | 225 |
"" >> $(WARNING_FILE) |
226 |
endif |
|
227 |
ifdef NO_IMAGES |
|
228 |
@$(ECHO) "WARNING: Your build environment has the variable NO_IMAGES\n" \ |
|
229 |
" defined. This will result in a development-only\n" \ |
|
230 |
" build of the JDK, lacking the install images\n" \ |
|
231 |
" and bundles.\n" \ |
|
232 |
"" >> $(WARNING_FILE) |
|
233 |
endif |
|
234 |
ifdef DEV_ONLY |
|
235 |
@$(ECHO) "WARNING: Your build environment has the variable DEV_ONLY\n" \ |
|
236 |
" defined. This will result in a development-only\n" \ |
|
237 |
" build of the JDK, lacking the documentation\n" \ |
|
238 |
" build and installation bundles.\n" \ |
|
239 |
"" >> $(WARNING_FILE) |
|
240 |
endif |
|
241 |
||
242 |
###################################################### |
|
243 |
# dump out the variable settings... |
|
244 |
###################################################### |
|
245 |
ifneq ($(PLATFORM), windows) |
|
246 |
ifndef HOSTNAME |
|
247 |
HOSTNAME := $(shell hostname) |
|
248 |
endif |
|
249 |
endif |
|
11946
ea3e0a10bf9b
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9930
diff
changeset
|
250 |
settings:: |
0 | 251 |
@$(ECHO) "Build Machine Information:" >> $(MESSAGE_FILE) |
252 |
ifeq ($(PLATFORM), windows) |
|
253 |
@$(ECHO) " build machine = $(COMPUTERNAME)" >> $(MESSAGE_FILE) |
|
254 |
else |
|
255 |
@$(ECHO) " build machine = $(HOSTNAME)" >> $(MESSAGE_FILE) |
|
256 |
endif |
|
257 |
@$(ECHO) "" >> $(MESSAGE_FILE) |
|
258 |
@$(ECHO) "Build Directory Structure:" >> $(MESSAGE_FILE) |
|
259 |
@$(ECHO) " CWD = `$(PWD)`" >> $(MESSAGE_FILE) |
|
260 |
@$(ECHO) " TOPDIR = $(TOPDIR)" >> $(MESSAGE_FILE) |
|
261 |
ifeq ($(LANGTOOLS_SRC_AVAILABLE), true) |
|
262 |
@$(ECHO) " LANGTOOLS_TOPDIR = $(LANGTOOLS_TOPDIR)" >> $(MESSAGE_FILE) |
|
263 |
endif |
|
264 |
ifeq ($(JAXP_SRC_AVAILABLE), true) |
|
265 |
@$(ECHO) " JAXP_TOPDIR = $(JAXP_TOPDIR)" >> $(MESSAGE_FILE) |
|
266 |
endif |
|
267 |
ifeq ($(JAXWS_SRC_AVAILABLE), true) |
|
268 |
@$(ECHO) " JAXWS_TOPDIR = $(JAXWS_TOPDIR)" >> $(MESSAGE_FILE) |
|
269 |
endif |
|
270 |
ifeq ($(CORBA_SRC_AVAILABLE), true) |
|
271 |
@$(ECHO) " CORBA_TOPDIR = $(CORBA_TOPDIR)" >> $(MESSAGE_FILE) |
|
272 |
endif |
|
273 |
ifeq ($(HOTSPOT_SRC_AVAILABLE), true) |
|
274 |
@$(ECHO) " HOTSPOT_TOPDIR = $(HOTSPOT_TOPDIR)" >> $(MESSAGE_FILE) |
|
275 |
endif |
|
276 |
ifeq ($(JDK_SRC_AVAILABLE), true) |
|
277 |
@$(ECHO) " JDK_TOPDIR = $(JDK_TOPDIR)" >> $(MESSAGE_FILE) |
|
278 |
endif |
|
15903 | 279 |
ifeq ($(NASHORN_SRC_AVAILABLE), true) |
280 |
@$(ECHO) " NASHORN_TOPDIR = $(NASHORN_TOPDIR)" >> $(MESSAGE_FILE) |
|
281 |
endif |
|
0 | 282 |
ifeq ($(DEPLOY_SRC_AVAILABLE), true) |
283 |
@$(ECHO) " DEPLOY_TOPDIR = $(DEPLOY_TOPDIR)" >> $(MESSAGE_FILE) |
|
284 |
endif |
|
285 |
ifeq ($(INSTALL_SRC_AVAILABLE), true) |
|
286 |
@$(ECHO) " INSTALL_TOPDIR = $(INSTALL_TOPDIR)" >> $(MESSAGE_FILE) |
|
287 |
endif |
|
288 |
ifeq ($(SPONSORS_SRC_AVAILABLE), true) |
|
289 |
@$(ECHO) " SPONSORS_TOPDIR = $(SPONSORS_TOPDIR)" >> $(MESSAGE_FILE) |
|
290 |
endif |
|
291 |
@$(ECHO) "" >> $(MESSAGE_FILE) |
|
292 |
ifneq ($(SKIP_COMPARE_IMAGES), true) |
|
293 |
@$(ECHO) "External File/Binary Locations:" >> $(MESSAGE_FILE) |
|
294 |
@$(ECHO) " PREVIOUS_JRE_BUNDLE = $(PREVIOUS_JRE_BUNDLE) " >> $(MESSAGE_FILE) |
|
295 |
@$(ECHO) " PREVIOUS_JDK_BUNDLE = $(PREVIOUS_JDK_BUNDLE) " >> $(MESSAGE_FILE) |
|
296 |
@$(ECHO) "" >> $(MESSAGE_FILE) |
|
297 |
endif |
|
298 |
@$(ECHO) "Build Directives:" >> $(MESSAGE_FILE) |
|
299 |
ifeq ($(LANGTOOLS_SRC_AVAILABLE), true) |
|
300 |
@$(ECHO) " BUILD_LANGTOOLS = $(BUILD_LANGTOOLS) " >> $(MESSAGE_FILE) |
|
301 |
endif |
|
302 |
ifeq ($(JAXP_SRC_AVAILABLE), true) |
|
303 |
@$(ECHO) " BUILD_JAXP = $(BUILD_JAXP) " >> $(MESSAGE_FILE) |
|
304 |
endif |
|
305 |
ifeq ($(JAXWS_SRC_AVAILABLE), true) |
|
306 |
@$(ECHO) " BUILD_JAXWS = $(BUILD_JAXWS) " >> $(MESSAGE_FILE) |
|
307 |
endif |
|
308 |
ifeq ($(CORBA_SRC_AVAILABLE), true) |
|
309 |
@$(ECHO) " BUILD_CORBA = $(BUILD_CORBA) " >> $(MESSAGE_FILE) |
|
310 |
endif |
|
311 |
ifeq ($(HOTSPOT_SRC_AVAILABLE), true) |
|
312 |
@$(ECHO) " BUILD_HOTSPOT = $(BUILD_HOTSPOT) " >> $(MESSAGE_FILE) |
|
313 |
endif |
|
314 |
ifeq ($(JDK_SRC_AVAILABLE), true) |
|
315 |
@$(ECHO) " BUILD_JDK = $(BUILD_JDK) " >> $(MESSAGE_FILE) |
|
316 |
endif |
|
15903 | 317 |
ifeq ($(NASHORN_SRC_AVAILABLE), true) |
318 |
@$(ECHO) " BUILD_NASHORN = $(BUILD_NASHORN) " >> $(MESSAGE_FILE) |
|
319 |
endif |
|
0 | 320 |
ifeq ($(DEPLOY_SRC_AVAILABLE), true) |
321 |
@$(ECHO) " BUILD_DEPLOY = $(BUILD_DEPLOY) " >> $(MESSAGE_FILE) |
|
322 |
endif |
|
323 |
ifeq ($(INSTALL_SRC_AVAILABLE), true) |
|
324 |
@$(ECHO) " BUILD_INSTALL = $(BUILD_INSTALL) " >> $(MESSAGE_FILE) |
|
325 |
endif |
|
326 |
ifeq ($(SPONSORS_SRC_AVAILABLE), true) |
|
327 |
@$(ECHO) " BUILD_SPONSORS = $(BUILD_SPONSORS) " >> $(MESSAGE_FILE) |
|
328 |
endif |
|
2778
6df702c8ca19
6829575: 100028: Debug information is incomplete or missing
aph
parents:
0
diff
changeset
|
329 |
@$(ECHO) " DEBUG_CLASSFILES = $(DEBUG_CLASSFILES) " >> $(MESSAGE_FILE) |
6df702c8ca19
6829575: 100028: Debug information is incomplete or missing
aph
parents:
0
diff
changeset
|
330 |
@$(ECHO) " DEBUG_BINARIES = $(DEBUG_BINARIES) " >> $(MESSAGE_FILE) |
0 | 331 |
@$(ECHO) "" >> $(MESSAGE_FILE) |
332 |
||
333 |
.PHONY: sanity settings pre-sanity insane \ |
|
334 |
post-sanity post-sanity-hotspot post-sanity-jdk \ |
|
335 |
post-sanity-install post-sanity-deploy \ |
|
9930 | 336 |
environment |