author | ihse |
Fri, 08 Nov 2013 09:36:55 +0100 | |
changeset 21511 | 4be11da17625 |
parent 19870 | 19ebc43b932b |
child 21805 | c7d7946239de |
permissions | -rw-r--r-- |
2 | 1 |
# |
13703
dd844a010010
7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
ohair
parents:
13353
diff
changeset
|
2 |
# Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved. |
2 | 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 |
|
5506 | 7 |
# published by the Free Software Foundation. Oracle designates this |
2 | 8 |
# particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
# by Oracle in the LICENSE file that accompanied this code. |
2 | 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 |
# |
|
5506 | 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. |
|
2 | 24 |
# |
25 |
||
26 |
# |
|
27 |
# Makefile for building and packaging all of the JDK and the JRE. See |
|
28 |
# also included files. |
|
29 |
# |
|
30 |
||
31 |
BUILDDIR=. |
|
13703
dd844a010010
7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
ohair
parents:
13353
diff
changeset
|
32 |
|
2 | 33 |
include $(BUILDDIR)/common/Defs.gmk |
34 |
||
35 |
# |
|
36 |
# Make sure we are clear what the default target is |
|
37 |
# |
|
38 |
default_target: all |
|
39 |
||
40 |
# |
|
41 |
# Check target |
|
42 |
# |
|
43 |
||
44 |
check: variable_check |
|
45 |
||
46 |
# |
|
47 |
# Help target |
|
48 |
# |
|
49 |
help: intro_help target_help variable_help notes_help examples_help |
|
50 |
||
51 |
# Intro help message |
|
52 |
intro_help: |
|
53 |
@$(ECHO) "\ |
|
54 |
Makefile for the main JDK workspace. \n\ |
|
55 |
Default behavior is to use the BOOTDIR javac to bootstrap the build and \n\ |
|
56 |
import in pre-built components like the VM from the JDK_IMPORT_PATH. \n\ |
|
57 |
" |
|
58 |
||
59 |
# Target help |
|
60 |
target_help: |
|
61 |
@$(ECHO) "\ |
|
62 |
--- Common Targets --- \n\ |
|
63 |
all -- build the core JDK (default target) \n\ |
|
64 |
help -- Print out help information \n\ |
|
65 |
check -- Check make variable values for correctness \n\ |
|
66 |
sanity -- Perform detailed sanity checks on system and settings \n\ |
|
67 |
openjdk -- synonym for 'OPENJDK=true all' \n\ |
|
68 |
fastdebug -- build the core JDK in 'fastdebug' mode (-g -O) \n\ |
|
69 |
debug -- build the core JDK in 'debug' mode (-g) \n\ |
|
70 |
clean -- remove all built and imported files \n\ |
|
71 |
clobber -- same as clean \n\ |
|
72 |
docs -- run javadoc to generate the JDK documentation \n\ |
|
73 |
images -- build the jdk and jre image directories \n\ |
|
74 |
import -- copy in the pre-built components (e.g. VM) \n\ |
|
75 |
import_product -- copy in the product components \n\ |
|
76 |
import_fastdebug -- copy in the fastdebug components \n\ |
|
77 |
import_debug -- copy in the debug components \n\ |
|
78 |
create_links -- create softlinks in Solaris 32bit build to 64bit dirs \n\ |
|
79 |
" |
|
80 |
||
81 |
# Variable help (only common ones used by this workspace) |
|
82 |
variable_help: variable_help_intro variable_list variable_help_end |
|
83 |
variable_help_intro: |
|
84 |
@$(ECHO) "--- Common Variables ---" |
|
85 |
variable_help_end: |
|
86 |
@$(ECHO) " " |
|
87 |
||
88 |
# One line descriptions for the variables |
|
89 |
OUTPUTDIR.desc = Output directory |
|
90 |
PARALLEL_COMPILE_JOBS.desc = Solaris/Linux parallel compile run count |
|
91 |
SLASH_JAVA.desc = Root of all build tools, e.g. /java or J: |
|
92 |
BOOTDIR.desc = JDK used to boot the build |
|
93 |
LANGTOOLS_DIST.desc = langtools dist area used to build |
|
94 |
CORBA_DIST.desc = corba dist area |
|
95 |
JAXP_DIST.desc = jaxp dist area |
|
96 |
JAXWS_DIST.desc = jaxws dist area |
|
97 |
JDK_IMPORT_PATH.desc = JDK used to import components of the build |
|
98 |
COMPILER_PATH.desc = Compiler install directory |
|
99 |
CACERTS_FILE.desc = Location of certificates file |
|
100 |
DEVTOOLS_PATH.desc = Directory containing zip and unzip |
|
101 |
CUPS_HEADERS_PATH.desc = Include directory location for CUPS header files |
|
102 |
||
103 |
# Make variables to print out (description and value) |
|
104 |
VARIABLE_PRINTVAL_LIST += \ |
|
105 |
OUTPUTDIR \ |
|
106 |
PARALLEL_COMPILE_JOBS \ |
|
107 |
SLASH_JAVA \ |
|
108 |
BOOTDIR \ |
|
109 |
LANGTOOLS_DIST \ |
|
110 |
JAXWS_DIST \ |
|
111 |
CORBA_DIST \ |
|
112 |
JAXP_DIST \ |
|
113 |
JDK_IMPORT_PATH \ |
|
114 |
COMPILER_PATH \ |
|
115 |
CACERTS_FILE \ |
|
116 |
DEVTOOLS_PATH |
|
117 |
||
118 |
# Make variables that should refer to directories that exist |
|
119 |
VARIABLE_CHECKDIR_LIST += \ |
|
120 |
SLASH_JAVA \ |
|
121 |
BOOTDIR \ |
|
122 |
JDK_IMPORT_PATH \ |
|
123 |
COMPILER_PATH \ |
|
124 |
DEVTOOLS_PATH |
|
125 |
||
126 |
# Make variables that should refer to files that exist |
|
127 |
VARIABLE_CHECKFIL_LIST += \ |
|
128 |
CACERTS_FILE |
|
129 |
||
130 |
# For pattern rules below, so all are treated the same |
|
131 |
DO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval) |
|
132 |
DO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir) |
|
133 |
DO_CHECKFIL_LIST=$(VARIABLE_CHECKFIL_LIST:%=%.checkfil) |
|
134 |
||
135 |
# Complete variable check |
|
136 |
variable_check: $(DO_CHECKDIR_LIST) $(DO_CHECKFIL_LIST) |
|
137 |
variable_list: $(DO_PRINTVAL_LIST) variable_check |
|
138 |
||
139 |
# Pattern rule for printing out a variable |
|
140 |
%.printval: |
|
141 |
@$(ECHO) " ALT_$* - $($*.desc)" |
|
142 |
@$(ECHO) " \t $*=$($*)" |
|
143 |
||
144 |
# Pattern rule for checking to see if a variable with a directory exists |
|
145 |
%.checkdir: |
|
146 |
@if [ ! -d $($*) ] ; then \ |
|
147 |
$(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \ |
|
148 |
fi |
|
149 |
||
150 |
# Pattern rule for checking to see if a variable with a file exists |
|
151 |
%.checkfil: |
|
152 |
@if [ ! -f $($*) ] ; then \ |
|
153 |
$(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \ |
|
154 |
fi |
|
155 |
||
156 |
# Misc notes on help |
|
157 |
notes_help: |
|
158 |
@$(ECHO) "\ |
|
159 |
--- Notes --- \n\ |
|
160 |
- All builds use same output directory unless overridden with \n\ |
|
161 |
\t ALT_OUTPUTDIR=<dir>, changing from product to fastdebug you may want \n\ |
|
162 |
\t to use the clean target first. \n\ |
|
163 |
- LANGTOOLS_DIST must refer to a langtools dist area, used to build. \n\ |
|
164 |
- CORBA_DIST must refer to a corba dist area. \n\ |
|
165 |
- JAXP_DIST must refer to a jaxp dist area. \n\ |
|
166 |
- JAXWS_DIST must refer to a jaxws dist area. \n\ |
|
167 |
- JDK_IMPORT_PATH must refer to a compatible build, not all past promoted \n\ |
|
168 |
\t builds or previous release JDK builds will work. \n\ |
|
169 |
- The 'debug' target and 'import_debug' only works when a debug promoted \n\ |
|
170 |
\t build is available, and they currently are not. \n\ |
|
171 |
- The fastest builds have been when the workspace and the BOOTDIR are on \n\ |
|
172 |
\t local disk. \n\ |
|
173 |
" |
|
174 |
||
175 |
examples_help: |
|
176 |
@$(ECHO) "\ |
|
177 |
--- Examples --- \n\ |
|
178 |
$(MAKE) fastdebug \n\ |
|
179 |
$(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\ |
|
180 |
$(MAKE) ALT_OUTPUTDIR=/tmp/foobar fastdebug images \n\ |
|
181 |
$(MAKE) ALT_OUTPUTDIR=/tmp/foobar all docs images \n\ |
|
182 |
$(MAKE) ALT_BOOTDIR=/opt/java/jdk1.6.0 \n\ |
|
183 |
$(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk1.7.0 \n\ |
|
184 |
" |
|
185 |
||
186 |
# |
|
187 |
# 'all' target intro |
|
188 |
# |
|
11994
74f1488b7347
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9035
diff
changeset
|
189 |
all:: |
2 | 190 |
@$(ECHO) $(PLATFORM) $(ARCH) $(RELEASE) build started: $(shell $(DATE) '+%y-%m-%d %H:%M') |
191 |
||
192 |
# Just in case anyone uses this old name, same as 'build' |
|
193 |
optimized: build |
|
194 |
||
195 |
openjdk: |
|
196 |
$(MAKE) OPENJDK=true all |
|
197 |
||
198 |
# |
|
199 |
# Special debug rules (You may also want to set ALT_OUTPUTDIR) |
|
200 |
# |
|
201 |
debug: |
|
202 |
$(MAKE) VARIANT=DBG all |
|
203 |
fastdebug: |
|
204 |
$(MAKE) VARIANT=DBG FASTDEBUG=true all |
|
205 |
||
206 |
# |
|
207 |
# Rules to re-import VM and other JDK files |
|
208 |
# |
|
209 |
import: |
|
210 |
$(CD) java/redist; $(MAKE) clean all |
|
211 |
||
212 |
import_fastdebug: |
|
213 |
$(MAKE) VARIANT=DBG FASTDEBUG=true import |
|
214 |
||
215 |
import_product: |
|
216 |
$(MAKE) VARIANT=OPT FASTDEBUG=false import |
|
217 |
||
218 |
# |
|
219 |
# Core. |
|
220 |
# |
|
221 |
||
222 |
all build:: sanity-all post-sanity-all |
|
223 |
||
14198
071fd6fd257d
7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
13703
diff
changeset
|
224 |
SUBDIRS = tools java javax sun com jdk |
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11994
diff
changeset
|
225 |
ifeq ($(PLATFORM), macosx) |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11994
diff
changeset
|
226 |
SUBDIRS += apple |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
11994
diff
changeset
|
227 |
endif |
15324
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14198
diff
changeset
|
228 |
ifeq ($(PLATFORM), windows) |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14198
diff
changeset
|
229 |
SUBDIRS += bridge |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14198
diff
changeset
|
230 |
endif |
4917
c98da2209f8c
6915413: Module build: building of specified jdk components instead of all
mchung
parents:
4524
diff
changeset
|
231 |
SUBDIRS_tools = launchers |
13353
a043d6778c4c
4650871: Classes in sunw.* should be removed from workspace and rt.jar
malenkov
parents:
12047
diff
changeset
|
232 |
SUBDIRS_misc = org jpda |
11994
74f1488b7347
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9035
diff
changeset
|
233 |
|
74f1488b7347
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9035
diff
changeset
|
234 |
# demos |
74f1488b7347
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9035
diff
changeset
|
235 |
ifndef NO_DEMOS |
74f1488b7347
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9035
diff
changeset
|
236 |
SUBDIRS_misc += mkdemo |
74f1488b7347
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9035
diff
changeset
|
237 |
endif |
74f1488b7347
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9035
diff
changeset
|
238 |
|
74f1488b7347
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9035
diff
changeset
|
239 |
# samples |
74f1488b7347
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9035
diff
changeset
|
240 |
ifndef NO_SAMPLES |
74f1488b7347
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9035
diff
changeset
|
241 |
SUBDIRS_misc += mksample |
74f1488b7347
7143162: Allow disable building of jdk demos and samples
mduigou
parents:
9035
diff
changeset
|
242 |
endif |
4917
c98da2209f8c
6915413: Module build: building of specified jdk components instead of all
mchung
parents:
4524
diff
changeset
|
243 |
|
7174
5a56e43d896c
6792706: Add JAR file to bootclasspath when using AggressiveOpts
ohair
parents:
6681
diff
changeset
|
244 |
# Alternate classes implementation |
5a56e43d896c
6792706: Add JAR file to bootclasspath when using AggressiveOpts
ohair
parents:
6681
diff
changeset
|
245 |
ifndef OPENJDK |
5a56e43d896c
6792706: Add JAR file to bootclasspath when using AggressiveOpts
ohair
parents:
6681
diff
changeset
|
246 |
SUBDIRS_misc += altclasses |
5a56e43d896c
6792706: Add JAR file to bootclasspath when using AggressiveOpts
ohair
parents:
6681
diff
changeset
|
247 |
endif |
5a56e43d896c
6792706: Add JAR file to bootclasspath when using AggressiveOpts
ohair
parents:
6681
diff
changeset
|
248 |
|
4917
c98da2209f8c
6915413: Module build: building of specified jdk components instead of all
mchung
parents:
4524
diff
changeset
|
249 |
include $(BUILDDIR)/common/Subdirs.gmk |
c98da2209f8c
6915413: Module build: building of specified jdk components instead of all
mchung
parents:
4524
diff
changeset
|
250 |
|
2 | 251 |
all build:: |
252 |
$(SUBDIRS-loop) |
|
253 |
||
254 |
clean clobber:: |
|
255 |
$(RM) -r $(OUTPUTDIR) |
|
256 |
||
257 |
# |
|
258 |
# Docs |
|
259 |
# |
|
260 |
OTHERSUBDIRS = docs |
|
261 |
docs:: sanity-docs post-sanity-docs |
|
262 |
$(OTHERSUBDIRS-loop) |
|
263 |
||
264 |
# |
|
265 |
# Release engineering targets. |
|
266 |
# |
|
267 |
include $(BUILDDIR)/common/Release.gmk |
|
13703
dd844a010010
7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
ohair
parents:
13353
diff
changeset
|
268 |
-include $(CUSTOM_MAKE_DIR)/Release.gmk |
2 | 269 |
|
270 |
# |
|
271 |
# Cscope targets. |
|
272 |
# |
|
273 |
include $(BUILDDIR)/common/Cscope.gmk |
|
274 |
||
275 |
# |
|
276 |
# Sanity checks. |
|
277 |
# |
|
278 |
include $(BUILDDIR)/common/Sanity.gmk |
|
279 |
||
280 |
$(OUTPUTDIR) $(TEMPDIR): |
|
281 |
$(MKDIR) -p $@ |
|
282 |
||
283 |
# this should be the last rule in this file: |
|
284 |
all:: |
|
285 |
@if [ -r $(WARNING_FILE) ]; then \ |
|
286 |
$(CAT) $(WARNING_FILE) ; \ |
|
287 |
fi |
|
288 |
@$(ECHO) $(PLATFORM) $(ARCH) $(RELEASE) build finished: $(shell $(DATE) '+%y-%m-%d %H:%M') |
|
289 |
||
290 |
# |
|
291 |
# Developer rule that links 32 and 64 bit builds on Solaris by creating |
|
292 |
# softlinks in the 32bit outputdir to the 64bit outputdir. |
|
293 |
# |
|
294 |
ifeq ($(PLATFORM), solaris) |
|
295 |
ifeq ($(ARCH_FAMILY), sparc) |
|
296 |
ARCH32 = sparc |
|
297 |
ARCH64 = sparcv9 |
|
298 |
else |
|
299 |
ARCH32 = i586 |
|
300 |
ARCH64 = amd64 |
|
301 |
endif |
|
302 |
OUTPUTDIR32 = $(ABS_OUTPUTDIR)/../$(PLATFORM)-$(ARCH32) |
|
303 |
OUTPUTDIR64 = $(ABS_OUTPUTDIR)/../$(PLATFORM)-$(ARCH64) |
|
304 |
endif |
|
305 |
||
306 |
create_links: |
|
307 |
ifeq ($(PLATFORM), solaris) |
|
308 |
@if [ -d $(OUTPUTDIR32) -a -d $(OUTPUTDIR64) ] ; then \ |
|
309 |
dirlist=`($(CD) $(OUTPUTDIR64); $(FIND) . -name $(ARCH64))`; \ |
|
310 |
for sd in $$dirlist ; do \ |
|
311 |
pdir=`$(DIRNAME) $$sd`; \ |
|
312 |
if [ -d $(OUTPUTDIR32)/$$pdir ] ; then \ |
|
313 |
echo "Creating link for $$sd"; \ |
|
314 |
(cd $(OUTPUTDIR32)/$$pdir; $(RM) $(ARCH64); \ |
|
315 |
$(LN) -s $(OUTPUTDIR64)/$$sd ); \ |
|
316 |
fi; \ |
|
317 |
done; \ |
|
318 |
else \ |
|
319 |
$(ECHO) "Build both 32 and 64 bit versions first"; \ |
|
320 |
fi |
|
321 |
else |
|
322 |
$(ECHO) "Rule $@ does not apply on $(PLATFORM)-$(ARCH)" |
|
323 |
endif |
|
324 |
||
325 |
# |
|
6681
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
326 |
# Test rule |
2 | 327 |
# |
6681
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
328 |
|
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
329 |
.NOTPARALLEL: test_run |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
330 |
|
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
331 |
test: |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
332 |
$(MAKE) test_run |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
333 |
|
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
334 |
test_run: test_clean test_start test_summary |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
335 |
|
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
336 |
test_start: |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
337 |
@$(ECHO) "Tests started at `$(DATE)`" |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
338 |
|
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
339 |
test_clean: |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
340 |
$(RM) $(OUTPUTDIR)/test_failures.txt $(OUTPUTDIR)/test_log.txt |
2 | 341 |
|
6681
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
342 |
test_summary: $(OUTPUTDIR)/test_failures.txt |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
343 |
@$(ECHO) "#################################################" |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
344 |
@$(ECHO) "Tests completed at `$(DATE)`" |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
345 |
@( $(EGREP) '^TEST STATS:' $(OUTPUTDIR)/test_log.txt \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
346 |
|| $(ECHO) "No TEST STATS seen in log" ) |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
347 |
@$(ECHO) "For complete details see: $(OUTPUTDIR)/test_log.txt" |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
348 |
@$(ECHO) "#################################################" |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
349 |
@if [ -s $< ] ; then \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
350 |
$(ECHO) "ERROR: Test failure count: `$(CAT) $< | $(WC) -l`"; \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
351 |
$(CAT) $<; \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
352 |
exit 1; \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
353 |
else \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
354 |
$(ECHO) "Success! No failures detected"; \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
355 |
fi |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
356 |
|
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
357 |
# Get failure list from log |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
358 |
$(OUTPUTDIR)/test_failures.txt: $(OUTPUTDIR)/test_log.txt |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
359 |
@$(RM) $@ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
360 |
@( $(EGREP) '^FAILED:' $< || $(ECHO) "" ) | $(NAWK) 'length>0' > $@ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
361 |
|
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
362 |
# Get log file of all tests run |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
363 |
JDK_TO_TEST := $(shell \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
364 |
if [ -d "$(ABS_OUTPUTDIR)/j2sdk-image" ] ; then \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
365 |
$(ECHO) "$(ABS_OUTPUTDIR)/j2sdk-image"; \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
366 |
elif [ -d "$(ABS_OUTPUTDIR)/bin" ] ; then \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
367 |
$(ECHO) "$(ABS_OUTPUTDIR)"; \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
368 |
elif [ "$(PRODUCT_HOME)" != "" -a -d "$(PRODUCT_HOME)/bin" ] ; then \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
369 |
$(ECHO) "$(PRODUCT_HOME)"; \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
370 |
fi \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
371 |
) |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
372 |
|
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
373 |
TEST_TARGETS=jdk_all |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
374 |
$(OUTPUTDIR)/test_log.txt: |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
375 |
$(RM) $@ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
376 |
( $(CD) ../test && \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
377 |
$(MAKE) NO_STOPPING=- PRODUCT_HOME=$(JDK_TO_TEST) $(TEST_TARGETS) \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
378 |
) | tee $@ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
379 |
|
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
380 |
# |
2 | 381 |
# JPRT rules |
6681
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
382 |
# |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
383 |
|
2 | 384 |
include jprt.gmk |
385 |
||
386 |
# |
|
387 |
# Phonies to avoid accidents. |
|
388 |
# |
|
389 |
.PHONY: all build clean clobber optimized debug fastdebug create_links \ |
|
6681
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
390 |
import import_product import_fastdebug import_debug \ |
e721d11e4826
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5506
diff
changeset
|
391 |
test test_run test_start test_clean test_summary |