author | dholmes |
Tue, 03 Sep 2013 23:47:27 -0400 | |
changeset 19803 | db1de252632d |
parent 15903 | bc0e6cd9d760 |
child 19758 | 3e519fa7e632 |
permissions | -rw-r--r-- |
0 | 1 |
# |
13697 | 2 |
# Copyright (c) 1995, 2012, 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 |
||
13697 | 26 |
# If NEWBUILD is defined, use the new build-infra Makefiles and configure. |
27 |
# See NewMakefile.gmk for more information. |
|
28 |
||
15064
049338f0fb4e
8004229: build-infra: Umbrella for switch of default "make" to new makefiles
ohair
parents:
13697
diff
changeset
|
29 |
# If not specified, select what the default build is |
049338f0fb4e
8004229: build-infra: Umbrella for switch of default "make" to new makefiles
ohair
parents:
13697
diff
changeset
|
30 |
ifndef NEWBUILD |
049338f0fb4e
8004229: build-infra: Umbrella for switch of default "make" to new makefiles
ohair
parents:
13697
diff
changeset
|
31 |
NEWBUILD=true |
049338f0fb4e
8004229: build-infra: Umbrella for switch of default "make" to new makefiles
ohair
parents:
13697
diff
changeset
|
32 |
endif |
049338f0fb4e
8004229: build-infra: Umbrella for switch of default "make" to new makefiles
ohair
parents:
13697
diff
changeset
|
33 |
|
13697 | 34 |
ifeq ($(NEWBUILD),true) |
35 |
||
36 |
# The new top level Makefile |
|
37 |
include NewMakefile.gmk |
|
38 |
||
39 |
else # Original Makefile logic |
|
40 |
||
17
bb9f330cd95a
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
16
diff
changeset
|
41 |
BUILD_PARENT_DIRECTORY=. |
bb9f330cd95a
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
16
diff
changeset
|
42 |
|
9618 | 43 |
# Basename of any originally supplied ALT_OUTPUTDIR directory |
44 |
ifndef ORIG_OUTPUTDIR_BASENAME |
|
45 |
ifdef ALT_OUTPUTDIR |
|
46 |
ORIG_OUTPUTDIR_BASENAME := $(shell basename $(ALT_OUTPUTDIR)) |
|
47 |
else |
|
48 |
ORIG_OUTPUTDIR_BASENAME = $(PLATFORM)-$(ARCH) |
|
49 |
endif |
|
50 |
endif |
|
51 |
export ORIG_OUTPUTDIR_BASENAME |
|
52 |
||
53 |
# The three possible directories created for output (3 build flavors) |
|
54 |
OUTPUTDIR_BASENAME- = $(ORIG_OUTPUTDIR_BASENAME) |
|
55 |
OUTPUTDIR_BASENAME-debug = $(ORIG_OUTPUTDIR_BASENAME)-debug |
|
56 |
OUTPUTDIR_BASENAME-fastdebug = $(ORIG_OUTPUTDIR_BASENAME)-fastdebug |
|
57 |
||
58 |
# Relative path to a debug output area |
|
59 |
REL_JDK_OUTPUTDIR = ../$(OUTPUTDIR_BASENAME-$(DEBUG_NAME)) |
|
60 |
||
61 |
# The created jdk image directory |
|
62 |
JDK_IMAGE_DIRNAME = j2sdk-image |
|
63 |
JDK_IMAGE_DIR = $(OUTPUTDIR)/$(JDK_IMAGE_DIRNAME) |
|
64 |
ABS_JDK_IMAGE_DIR = $(ABS_OUTPUTDIR)/$(JDK_IMAGE_DIRNAME) |
|
65 |
||
66 |
# Relative path from an output directory to the image directory |
|
67 |
REL_JDK_IMAGE_DIR = ../$(OUTPUTDIR_BASENAME-$(DEBUG_NAME))/$(JDK_IMAGE_DIRNAME) |
|
68 |
REL_JDK_DEBUG_IMAGE_DIR = ../$(OUTPUTDIR_BASENAME-debug)/$(JDK_IMAGE_DIRNAME) |
|
69 |
REL_JDK_FASTDEBUG_IMAGE_DIR = ../$(OUTPUTDIR_BASENAME-fastdebug)/$(JDK_IMAGE_DIRNAME) |
|
70 |
||
0 | 71 |
ifndef TOPDIR |
20 | 72 |
TOPDIR:=. |
0 | 73 |
endif |
74 |
||
75 |
ifndef JDK_TOPDIR |
|
76 |
JDK_TOPDIR=$(TOPDIR)/jdk |
|
77 |
endif |
|
78 |
ifndef JDK_MAKE_SHARED_DIR |
|
79 |
JDK_MAKE_SHARED_DIR=$(JDK_TOPDIR)/make/common/shared |
|
80 |
endif |
|
81 |
||
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
82 |
default: all |
0 | 83 |
|
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
84 |
include $(JDK_MAKE_SHARED_DIR)/Defs-control.gmk |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
85 |
include ./make/Defs-internal.gmk |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
86 |
include ./make/sanity-rules.gmk |
0 | 87 |
include ./make/hotspot-rules.gmk |
88 |
include ./make/langtools-rules.gmk |
|
89 |
include ./make/corba-rules.gmk |
|
90 |
include ./make/jaxp-rules.gmk |
|
91 |
include ./make/jaxws-rules.gmk |
|
92 |
include ./make/jdk-rules.gmk |
|
15903 | 93 |
include ./make/nashorn-rules.gmk |
0 | 94 |
include ./make/install-rules.gmk |
95 |
include ./make/sponsors-rules.gmk |
|
96 |
include ./make/deploy-rules.gmk |
|
97 |
||
7873
4ff5acee11e8
7009969: Remove SKIP_OPENJDK_BUILD from top Makefile
ohair
parents:
7652
diff
changeset
|
98 |
all:: sanity |
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
99 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
100 |
ifeq ($(SKIP_FASTDEBUG_BUILD), false) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
101 |
all:: fastdebug_build |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
102 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
103 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
104 |
ifeq ($(SKIP_DEBUG_BUILD), false) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
105 |
all:: debug_build |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
106 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
107 |
|
948 | 108 |
all:: all_product_build |
109 |
||
8445 | 110 |
all_product_build:: |
111 |
||
8441 | 112 |
# Everything for a full product build |
113 |
ifeq ($(SKIP_PRODUCT_BUILD), false) |
|
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
114 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
115 |
all_product_build:: product_build |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
116 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
117 |
ifeq ($(BUILD_INSTALL), true) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
118 |
all_product_build:: $(INSTALL) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
119 |
clobber:: install-clobber |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
120 |
endif |
8441 | 121 |
|
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
122 |
ifeq ($(BUILD_SPONSORS), true) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
123 |
all_product_build:: $(SPONSORS) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
124 |
clobber:: sponsors-clobber |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
125 |
endif |
8441 | 126 |
|
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
127 |
ifneq ($(SKIP_COMPARE_IMAGES), true) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
128 |
all_product_build:: compare-image |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
129 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
130 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
131 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
132 |
|
8441 | 133 |
define StartTimer |
134 |
$(MKDIR) -p $(BUILDTIMESDIR) |
|
135 |
$(RM) $(BUILDTIMESDIR)/build_time_* |
|
136 |
$(call RecordStartTime,TOTAL) |
|
137 |
endef |
|
138 |
||
139 |
define StopTimer |
|
140 |
$(if $(REPORT_BUILD_TIMES),$(call RecordEndTime,TOTAL) && $(call ReportBuildTimes,$1),) |
|
141 |
endef |
|
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
142 |
|
5743 | 143 |
# Generic build of basic repo series |
9309 | 144 |
generic_build_repo_series:: $(SOURCE_TIPS) |
9618 | 145 |
$(MKDIR) -p $(JDK_IMAGE_DIR) |
8441 | 146 |
@$(call StartTimer) |
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
147 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
148 |
ifeq ($(BUILD_LANGTOOLS), true) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
149 |
generic_build_repo_series:: langtools |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
150 |
clobber:: langtools-clobber |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
151 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
152 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
153 |
ifeq ($(BUILD_CORBA), true) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
154 |
generic_build_repo_series:: corba |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
155 |
clobber:: corba-clobber |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
156 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
157 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
158 |
ifeq ($(BUILD_JAXP), true) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
159 |
generic_build_repo_series:: jaxp |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
160 |
clobber:: jaxp-clobber |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
161 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
162 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
163 |
ifeq ($(BUILD_JAXWS), true) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
164 |
generic_build_repo_series:: jaxws |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
165 |
clobber:: jaxws-clobber |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
166 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
167 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
168 |
ifeq ($(BUILD_HOTSPOT), true) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
169 |
generic_build_repo_series:: $(HOTSPOT) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
170 |
clobber:: hotspot-clobber |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
171 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
172 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
173 |
ifeq ($(BUILD_JDK), true) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
174 |
generic_build_repo_series:: $(JDK_JAVA_EXE) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
175 |
clobber:: jdk-clobber |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
176 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
177 |
|
15903 | 178 |
ifeq ($(BUILD_NASHORN), true) |
179 |
generic_build_repo_series:: $(NASHORN) |
|
180 |
clobber:: nashorn-clobber |
|
181 |
endif |
|
182 |
||
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
183 |
ifeq ($(BUILD_DEPLOY), true) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
184 |
generic_build_repo_series:: $(DEPLOY) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
185 |
clobber:: deploy-clobber |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
186 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
187 |
|
8441 | 188 |
generic_build_repo_series:: |
189 |
@$(call StopTimer,$(if $(DEBUG_NAME),$(DEBUG_NAME)_build,all_product_build)) |
|
190 |
||
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
191 |
# The debug build, fastdebug or debug. Needs special handling. |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
192 |
# Note that debug builds do NOT do INSTALL steps, but must be done |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
193 |
# after the product build and before the INSTALL step of the product build. |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
194 |
# |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
195 |
# DEBUG_NAME is fastdebug or debug |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
196 |
# ALT_OUTPUTDIR is changed to have -debug or -fastdebug suffix |
9618 | 197 |
# The resulting image directory (j2sdk-image) is used by the install makefiles |
198 |
# to create a debug install bundle jdk-*-debug-** bundle (tar or zip) |
|
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
199 |
# which will install in the debug or fastdebug subdirectory of the |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
200 |
# normal product install area. |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
201 |
# The install process needs to know what the DEBUG_NAME is, so |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
202 |
# look for INSTALL_DEBUG_NAME in the install rules. |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
203 |
# |
5743 | 204 |
# NOTE: On windows, do not use $(ABS_BOOTDIR_OUTPUTDIR)-$(DEBUG_NAME). |
205 |
# Due to the use of short paths in $(ABS_OUTPUTDIR), this may |
|
206 |
# not be the same location. |
|
207 |
# |
|
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
208 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
209 |
# Location of fresh bootdir output |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
210 |
ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk |
9618 | 211 |
FRESH_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/$(JDK_IMAGE_DIRNAME) |
212 |
FRESH_DEBUG_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/$(REL_JDK_IMAGE_DIR) |
|
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
213 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
214 |
create_fresh_product_bootdir: FRC |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
215 |
$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \ |
4309
39ca605f0647
6727046: Add message when docs are skipped in control build
ohair
parents:
2099
diff
changeset
|
216 |
GENERATE_DOCS=false \ |
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
217 |
BOOT_CYCLE_SETTINGS= \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
218 |
build_product_image |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
219 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
220 |
create_fresh_debug_bootdir: FRC |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
221 |
$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \ |
4309
39ca605f0647
6727046: Add message when docs are skipped in control build
ohair
parents:
2099
diff
changeset
|
222 |
GENERATE_DOCS=false \ |
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
223 |
BOOT_CYCLE_DEBUG_SETTINGS= \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
224 |
build_debug_image |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
225 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
226 |
create_fresh_fastdebug_bootdir: FRC |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
227 |
$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \ |
4309
39ca605f0647
6727046: Add message when docs are skipped in control build
ohair
parents:
2099
diff
changeset
|
228 |
GENERATE_DOCS=false \ |
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
229 |
BOOT_CYCLE_DEBUG_SETTINGS= \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
230 |
build_fastdebug_image |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
231 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
232 |
# Create boot image? |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
233 |
ifeq ($(SKIP_BOOT_CYCLE),false) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
234 |
ifneq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
235 |
DO_BOOT_CYCLE=true |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
236 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
237 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
238 |
|
8441 | 239 |
|
240 |
||
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
241 |
ifeq ($(DO_BOOT_CYCLE),true) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
242 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
243 |
# Create the bootdir to use in the build |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
244 |
product_build:: create_fresh_product_bootdir |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
245 |
debug_build:: create_fresh_debug_bootdir |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
246 |
fastdebug_build:: create_fresh_fastdebug_bootdir |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
247 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
248 |
# Define variables to be used now for the boot jdk |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
249 |
BOOT_CYCLE_SETTINGS= \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
250 |
ALT_BOOTDIR=$(FRESH_BOOTDIR) \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
251 |
ALT_JDK_IMPORT_PATH=$(FRESH_BOOTDIR) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
252 |
BOOT_CYCLE_DEBUG_SETTINGS= \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
253 |
ALT_BOOTDIR=$(FRESH_DEBUG_BOOTDIR) \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
254 |
ALT_JDK_IMPORT_PATH=$(FRESH_DEBUG_BOOTDIR) |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
255 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
256 |
else |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
257 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
258 |
# Use the supplied ALT_BOOTDIR as the boot |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
259 |
BOOT_CYCLE_SETTINGS= |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
260 |
BOOT_CYCLE_DEBUG_SETTINGS= |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
261 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
262 |
endif |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
263 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
264 |
build_product_image: |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
265 |
$(MAKE) \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
266 |
SKIP_FASTDEBUG_BUILD=true \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
267 |
SKIP_DEBUG_BUILD=true \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
268 |
$(BOOT_CYCLE_SETTINGS) \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
269 |
generic_build_repo_series |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
270 |
|
5743 | 271 |
# NOTE: On windows, do not use $(ABS_OUTPUTDIR)-$(DEBUG_NAME). |
272 |
# Due to the use of short paths in $(ABS_OUTPUTDIR), this may |
|
273 |
# not be the same location. |
|
274 |
||
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
275 |
generic_debug_build: |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
276 |
$(MAKE) \ |
9618 | 277 |
ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)/$(REL_JDK_OUTPUTDIR) \ |
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
278 |
DEBUG_NAME=$(DEBUG_NAME) \ |
4309
39ca605f0647
6727046: Add message when docs are skipped in control build
ohair
parents:
2099
diff
changeset
|
279 |
GENERATE_DOCS=false \ |
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
280 |
$(BOOT_CYCLE_DEBUG_SETTINGS) \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
281 |
generic_build_repo_series |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
282 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
283 |
build_debug_image: |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
284 |
$(MAKE) DEBUG_NAME=debug generic_debug_build |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
285 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
286 |
build_fastdebug_image: |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
287 |
$(MAKE) DEBUG_NAME=fastdebug generic_debug_build |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
288 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
289 |
# Build final image |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
290 |
product_build:: build_product_image |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
291 |
debug_build:: build_debug_image |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
292 |
fastdebug_build:: build_fastdebug_image |
0 | 293 |
|
9309 | 294 |
# The source tips are stored with the relative path to the repo. |
295 |
# This file will be used when constructing the jdk image. |
|
296 |
source_tips: $(SOURCE_TIPS) |
|
297 |
$(CAT) $< |
|
298 |
$(SOURCE_TIPS): FRC |
|
299 |
@$(prep-target) |
|
300 |
@$(call GetSourceTips) |
|
301 |
||
8441 | 302 |
clobber:: REPORT_BUILD_TIMES= |
303 |
clobber:: |
|
0 | 304 |
$(RM) -r $(OUTPUTDIR)/* |
305 |
-($(RMDIR) -p $(OUTPUTDIR) > $(DEV_NULL) 2>&1; $(TRUE)) |
|
306 |
||
307 |
clean: clobber |
|
308 |
||
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
309 |
# |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
310 |
# Dev builds |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
311 |
# |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
312 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
313 |
dev : dev-build |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
314 |
|
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
315 |
dev-build: |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
316 |
$(MAKE) DEV_ONLY=true all |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
317 |
dev-sanity: |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
318 |
$(MAKE) DEV_ONLY=true sanity |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
319 |
dev-clobber: |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
320 |
$(MAKE) DEV_ONLY=true clobber |
0 | 321 |
|
322 |
# |
|
323 |
# Quick jdk verification build |
|
324 |
# |
|
325 |
jdk_only: |
|
326 |
$(MAKE) SKIP_FASTDEBUG_BUILD=true BUILD_HOTSPOT=false all |
|
327 |
||
328 |
||
329 |
# |
|
330 |
# Quick jdk verification fastdebug build |
|
331 |
# |
|
332 |
jdk_fastdebug_only: |
|
333 |
$(MAKE) DEBUG_NAME=fastdebug BUILD_HOTSPOT=false BUILD_DEPLOY=false \ |
|
334 |
BUILD_INSTALL=false BUILD_SPONSORS=false generic_debug_build |
|
335 |
||
336 |
# |
|
337 |
# Quick deploy verification fastdebug build |
|
338 |
# |
|
339 |
deploy_fastdebug_only: |
|
340 |
$(MAKE) \ |
|
341 |
DEBUG_NAME=fastdebug \ |
|
342 |
BUILD_HOTSPOT=false \ |
|
343 |
BUILD_JDK=false \ |
|
344 |
BUILD_LANGTOOLS=false \ |
|
15903 | 345 |
BUILD_NASHORN=false \ |
0 | 346 |
BUILD_CORBA=false \ |
347 |
BUILD_JAXP=false \ |
|
348 |
BUILD_JAXWS=false \ |
|
349 |
BUILD_INSTALL=false \ |
|
350 |
BUILD_SPONSORS=false \ |
|
351 |
generic_debug_build |
|
352 |
||
353 |
# |
|
354 |
# Product build (skip debug builds) |
|
355 |
# |
|
356 |
product_only: |
|
357 |
$(MAKE) SKIP_FASTDEBUG_BUILD=true all |
|
358 |
||
359 |
# |
|
360 |
# Check target |
|
361 |
# |
|
362 |
||
363 |
check: variable_check |
|
364 |
||
365 |
# |
|
366 |
# Help target |
|
367 |
# |
|
368 |
help: intro_help target_help variable_help notes_help examples_help |
|
369 |
||
370 |
# Intro help message |
|
371 |
intro_help: |
|
372 |
@$(ECHO) "\ |
|
373 |
Makefile for the JDK builds (all the JDK). \n\ |
|
374 |
" |
|
375 |
||
376 |
# Target help |
|
377 |
target_help: |
|
378 |
@$(ECHO) "\ |
|
379 |
--- Common Targets --- \n\ |
|
380 |
all -- build the core JDK (default target) \n\ |
|
381 |
help -- Print out help information \n\ |
|
382 |
check -- Check make variable values for correctness \n\ |
|
383 |
sanity -- Perform detailed sanity checks on system and settings \n\ |
|
384 |
fastdebug_build -- build the core JDK in 'fastdebug' mode (-g -O) \n\ |
|
385 |
debug_build -- build the core JDK in 'debug' mode (-g) \n\ |
|
386 |
clean -- remove all built and imported files \n\ |
|
387 |
clobber -- same as clean \n\ |
|
388 |
" |
|
389 |
||
390 |
# Variable help (only common ones used by this Makefile) |
|
391 |
variable_help: variable_help_intro variable_list variable_help_end |
|
392 |
variable_help_intro: |
|
393 |
@$(ECHO) "--- Common Variables ---" |
|
394 |
variable_help_end: |
|
395 |
@$(ECHO) " " |
|
396 |
||
397 |
# One line descriptions for the variables |
|
398 |
OUTPUTDIR.desc = Output directory |
|
399 |
PARALLEL_COMPILE_JOBS.desc = Solaris/Linux parallel compile run count |
|
400 |
SLASH_JAVA.desc = Root of all build tools, e.g. /java or J: |
|
401 |
BOOTDIR.desc = JDK used to boot the build |
|
402 |
JDK_IMPORT_PATH.desc = JDK used to import components of the build |
|
403 |
COMPILER_PATH.desc = Compiler install directory |
|
404 |
CACERTS_FILE.desc = Location of certificates file |
|
405 |
DEVTOOLS_PATH.desc = Directory containing zip and gnumake |
|
406 |
CUPS_HEADERS_PATH.desc = Include directory location for CUPS header files |
|
407 |
DXSDK_PATH.desc = Root directory of DirectX SDK |
|
408 |
||
409 |
# Make variables to print out (description and value) |
|
410 |
VARIABLE_PRINTVAL_LIST += \ |
|
411 |
OUTPUTDIR \ |
|
412 |
PARALLEL_COMPILE_JOBS \ |
|
413 |
SLASH_JAVA \ |
|
414 |
BOOTDIR \ |
|
415 |
JDK_IMPORT_PATH \ |
|
416 |
COMPILER_PATH \ |
|
417 |
CACERTS_FILE \ |
|
418 |
DEVTOOLS_PATH |
|
419 |
||
420 |
# Make variables that should refer to directories that exist |
|
421 |
VARIABLE_CHECKDIR_LIST += \ |
|
422 |
SLASH_JAVA \ |
|
423 |
BOOTDIR \ |
|
424 |
JDK_IMPORT_PATH \ |
|
425 |
COMPILER_PATH \ |
|
426 |
DEVTOOLS_PATH |
|
427 |
||
428 |
# Make variables that should refer to files that exist |
|
429 |
VARIABLE_CHECKFIL_LIST += \ |
|
430 |
CACERTS_FILE |
|
431 |
||
432 |
# Some are windows specific |
|
433 |
ifeq ($(PLATFORM), windows) |
|
434 |
||
435 |
VARIABLE_PRINTVAL_LIST += \ |
|
7876
c2a288bdcca1
6950375: Remove msvcrt.dll from the Windows JRE bundles
ohair
parents:
7873
diff
changeset
|
436 |
DXSDK_PATH |
0 | 437 |
|
438 |
VARIABLE_CHECKDIR_LIST += \ |
|
7876
c2a288bdcca1
6950375: Remove msvcrt.dll from the Windows JRE bundles
ohair
parents:
7873
diff
changeset
|
439 |
DXSDK_PATH |
0 | 440 |
|
441 |
endif |
|
442 |
||
443 |
# For pattern rules below, so all are treated the same |
|
444 |
DO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval) |
|
445 |
DO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir) |
|
446 |
DO_CHECKFIL_LIST=$(VARIABLE_CHECKFIL_LIST:%=%.checkfil) |
|
447 |
||
448 |
# Complete variable check |
|
449 |
variable_check: $(DO_CHECKDIR_LIST) $(DO_CHECKFIL_LIST) |
|
450 |
variable_list: $(DO_PRINTVAL_LIST) variable_check |
|
451 |
||
452 |
# Pattern rule for printing out a variable |
|
453 |
%.printval: |
|
454 |
@$(ECHO) " ALT_$* - $($*.desc)" |
|
455 |
@$(ECHO) " \t $*=$($*)" |
|
456 |
||
457 |
# Pattern rule for checking to see if a variable with a directory exists |
|
458 |
%.checkdir: |
|
459 |
@if [ ! -d $($*) ] ; then \ |
|
460 |
$(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \ |
|
461 |
fi |
|
462 |
||
463 |
# Pattern rule for checking to see if a variable with a file exists |
|
464 |
%.checkfil: |
|
465 |
@if [ ! -f $($*) ] ; then \ |
|
466 |
$(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \ |
|
467 |
fi |
|
468 |
||
469 |
# Misc notes on help |
|
470 |
notes_help: |
|
471 |
@$(ECHO) "\ |
|
472 |
--- Notes --- \n\ |
|
473 |
- All builds use same output directory unless overridden with \n\ |
|
474 |
\t ALT_OUTPUTDIR=<dir>, changing from product to fastdebug you may want \n\ |
|
475 |
\t to use the clean target first. \n\ |
|
476 |
- JDK_IMPORT_PATH must refer to a compatible build, not all past promoted \n\ |
|
477 |
\t builds or previous release JDK builds will work. \n\ |
|
478 |
- The fastest builds have been when the sources and the BOOTDIR are on \n\ |
|
479 |
\t local disk. \n\ |
|
480 |
" |
|
481 |
||
482 |
examples_help: |
|
483 |
@$(ECHO) "\ |
|
484 |
--- Examples --- \n\ |
|
485 |
$(MAKE) fastdebug_build \n\ |
|
486 |
$(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\ |
|
487 |
$(MAKE) ALT_OUTPUTDIR=/tmp/foobar fastdebug_build \n\ |
|
488 |
$(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\ |
|
489 |
$(MAKE) ALT_BOOTDIR=/opt/java/jdk1.5.0 \n\ |
|
490 |
$(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk1.6.0 \n\ |
|
491 |
" |
|
492 |
||
493 |
################################################################ |
|
7652
803a0c91a1a2
7008723: Remove binary plugs creation and use from openjdk
ohair
parents:
7649
diff
changeset
|
494 |
# Source bundling |
0 | 495 |
################################################################ |
496 |
ifeq ($(BUNDLE_RULES_AVAILABLE), true) |
|
497 |
include $(BUNDLE_RULES) |
|
498 |
endif |
|
499 |
||
500 |
################################################################ |
|
5743 | 501 |
# rule to test |
502 |
################################################################ |
|
503 |
||
6623
b2e02fea81b0
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5743
diff
changeset
|
504 |
.NOTPARALLEL: test_run |
5743 | 505 |
|
6623
b2e02fea81b0
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5743
diff
changeset
|
506 |
test: |
b2e02fea81b0
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5743
diff
changeset
|
507 |
$(MAKE) test_run |
b2e02fea81b0
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5743
diff
changeset
|
508 |
|
b2e02fea81b0
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5743
diff
changeset
|
509 |
test_run: test_clean test_start test_summary |
5743 | 510 |
|
511 |
test_start: |
|
512 |
@$(ECHO) "Tests started at `$(DATE)`" |
|
513 |
||
514 |
test_clean: |
|
515 |
$(RM) $(OUTPUTDIR)/test_failures.txt $(OUTPUTDIR)/test_log.txt |
|
516 |
||
517 |
test_summary: $(OUTPUTDIR)/test_failures.txt |
|
518 |
@$(ECHO) "#################################################" |
|
519 |
@$(ECHO) "Tests completed at `$(DATE)`" |
|
520 |
@( $(EGREP) '^TEST STATS:' $(OUTPUTDIR)/test_log.txt \ |
|
521 |
|| $(ECHO) "No TEST STATS seen in log" ) |
|
522 |
@$(ECHO) "For complete details see: $(OUTPUTDIR)/test_log.txt" |
|
523 |
@$(ECHO) "#################################################" |
|
524 |
@if [ -s $< ] ; then \ |
|
525 |
$(ECHO) "ERROR: Test failure count: `$(CAT) $< | $(WC) -l`"; \ |
|
526 |
$(CAT) $<; \ |
|
527 |
exit 1; \ |
|
528 |
else \ |
|
529 |
$(ECHO) "Success! No failures detected"; \ |
|
530 |
fi |
|
531 |
||
532 |
# Get failure list from log |
|
533 |
$(OUTPUTDIR)/test_failures.txt: $(OUTPUTDIR)/test_log.txt |
|
534 |
@$(RM) $@ |
|
6623
b2e02fea81b0
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5743
diff
changeset
|
535 |
@( $(EGREP) '^FAILED:' $< || $(ECHO) "" ) | $(NAWK) 'length>0' > $@ |
5743 | 536 |
|
537 |
# Get log file of all tests run |
|
538 |
JDK_TO_TEST := $(shell \ |
|
9618 | 539 |
if [ -d "$(ABS_JDK_IMAGE_DIR)" ] ; then \ |
540 |
$(ECHO) "$(ABS_JDK_IMAGE_DIR)"; \ |
|
5743 | 541 |
elif [ -d "$(ABS_OUTPUTDIR)/bin" ] ; then \ |
542 |
$(ECHO) "$(ABS_OUTPUTDIR)"; \ |
|
543 |
elif [ "$(PRODUCT_HOME)" != "" -a -d "$(PRODUCT_HOME)/bin" ] ; then \ |
|
544 |
$(ECHO) "$(PRODUCT_HOME)"; \ |
|
545 |
fi \ |
|
546 |
) |
|
6623
b2e02fea81b0
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5743
diff
changeset
|
547 |
TEST_TARGETS=all |
5743 | 548 |
$(OUTPUTDIR)/test_log.txt: |
549 |
$(RM) $@ |
|
6623
b2e02fea81b0
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5743
diff
changeset
|
550 |
( $(CD) test && \ |
b2e02fea81b0
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5743
diff
changeset
|
551 |
$(MAKE) NO_STOPPING=- PRODUCT_HOME=$(JDK_TO_TEST) $(TEST_TARGETS) \ |
5743 | 552 |
) | tee $@ |
553 |
||
554 |
################################################################ |
|
0 | 555 |
# JPRT rule to build |
556 |
################################################################ |
|
557 |
||
558 |
include ./make/jprt.gmk |
|
559 |
||
560 |
################################################################ |
|
561 |
# PHONY |
|
562 |
################################################################ |
|
563 |
||
6623
b2e02fea81b0
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents:
5743
diff
changeset
|
564 |
.PHONY: all test test_run test_start test_summary test_clean \ |
874
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
565 |
generic_build_repo_series \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
566 |
what clobber insane \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
567 |
dev dev-build dev-sanity dev-clobber \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
568 |
product_build \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
569 |
fastdebug_build \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
570 |
debug_build \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
571 |
build_product_image \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
572 |
build_debug_image \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
573 |
build_fastdebug_image \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
574 |
create_fresh_product_bootdir \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
575 |
create_fresh_debug_bootdir \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
576 |
create_fresh_fastdebug_bootdir \ |
638ddad10e12
6728161: Add SKIP_BOOT_CYCLE feature to create boot jdk and use it during build
ohair
parents:
668
diff
changeset
|
577 |
generic_debug_build |
0 | 578 |
|
17
bb9f330cd95a
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
16
diff
changeset
|
579 |
# Force target |
bb9f330cd95a
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
16
diff
changeset
|
580 |
FRC: |
bb9f330cd95a
6649672: Adjustments to OUTPUTDIR default and mkdirs to avoid empty directory clutter
ohair
parents:
16
diff
changeset
|
581 |
|
13697 | 582 |
endif # Original Makefile logic |
583 |