author | ohair |
Sun, 09 Mar 2008 13:11:51 -0700 | |
changeset 16 | 13adabd0ff72 |
parent 0 | fd16c54261b3 |
child 17 | bb9f330cd95a |
permissions | -rw-r--r-- |
0 | 1 |
# |
2 |
# Copyright 1995-2007 Sun Microsystems, Inc. All Rights Reserved. |
|
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 |
|
7 |
# published by the Free Software Foundation. Sun designates this |
|
8 |
# particular file as subject to the "Classpath" exception as provided |
|
9 |
# by Sun in the LICENSE file that accompanied this code. |
|
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 |
# |
|
21 |
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
|
22 |
# CA 95054 USA or visit www.sun.com if you need additional information or |
|
23 |
# have any questions. |
|
24 |
# |
|
25 |
||
26 |
ifndef TOPDIR |
|
27 |
TOPDIR:=$(shell \ |
|
28 |
if [ -r ./j2se/make/Makefile -o -r ./jdk/make/Makefile ]; then \ |
|
29 |
echo "."; \ |
|
30 |
else \ |
|
31 |
echo "../.."; \ |
|
32 |
fi) |
|
33 |
endif |
|
34 |
||
35 |
ifndef CONTROL_TOPDIR |
|
36 |
CONTROL_TOPDIR=$(TOPDIR)/control |
|
37 |
CONTROL_TOPDIR:=$(shell \ |
|
38 |
if [ -r $(TOPDIR)/control/make/Makefile ]; then \ |
|
39 |
echo "$(TOPDIR)/control"; \ |
|
40 |
else \ |
|
41 |
echo "$(TOPDIR)"; \ |
|
42 |
fi) |
|
43 |
endif |
|
44 |
||
16
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
45 |
# Openjdk sources (only used if SKIP_OPENJDK_BUILD!=true) |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
46 |
OPENJDK_SOURCETREE=$(TOPDIR)/openjdk |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
47 |
OPENJDK_BUILDDIR:=$(shell \ |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
48 |
if [ -r $(OPENJDK_SOURCETREE)/control/make/Makefile ]; then \ |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
49 |
echo "$(OPENJDK_SOURCETREE)/control/make"; \ |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
50 |
elif [ -r $(OPENJDK_SOURCETREE)/Makefile ]; then \ |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
51 |
echo "$(OPENJDK_SOURCETREE)"; \ |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
52 |
else \ |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
53 |
echo "."; \ |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
54 |
fi) |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
55 |
|
0 | 56 |
ifndef JDK_TOPDIR |
57 |
JDK_TOPDIR=$(TOPDIR)/jdk |
|
58 |
endif |
|
59 |
ifndef JDK_MAKE_SHARED_DIR |
|
60 |
JDK_MAKE_SHARED_DIR=$(JDK_TOPDIR)/make/common/shared |
|
61 |
endif |
|
62 |
||
63 |
include $(JDK_MAKE_SHARED_DIR)/Defs-control.gmk |
|
64 |
||
65 |
include ./make/Defs-internal.gmk |
|
66 |
||
67 |
all:: |
|
68 |
@$(ECHO) $(PLATFORM) $(ARCH) $(RELEASE) build started: `$(DATE) '+%y-%m-%d %H:%M'` |
|
69 |
||
70 |
# Rules for sanity checks |
|
71 |
include ./make/sanity-rules.gmk |
|
72 |
||
73 |
dev : dev-build |
|
74 |
||
75 |
dev-build: |
|
76 |
$(MAKE) DEV_ONLY=true all |
|
77 |
dev-sanity: |
|
78 |
$(MAKE) DEV_ONLY=true sanity |
|
79 |
dev-clobber: |
|
80 |
$(MAKE) DEV_ONLY=true clobber |
|
81 |
||
82 |
# Rules for various components |
|
83 |
include ./make/hotspot-rules.gmk |
|
84 |
include ./make/langtools-rules.gmk |
|
85 |
include ./make/corba-rules.gmk |
|
86 |
include ./make/jaxp-rules.gmk |
|
87 |
include ./make/jaxws-rules.gmk |
|
88 |
include ./make/jdk-rules.gmk |
|
89 |
include ./make/install-rules.gmk |
|
90 |
include ./make/sponsors-rules.gmk |
|
91 |
include ./make/deploy-rules.gmk |
|
92 |
||
93 |
all:: setup build |
|
94 |
||
16
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
95 |
setup: openjdk_check |
0 | 96 |
$(MKDIR) -p $(OUTPUTDIR)/j2sdk-image |
97 |
$(MKDIR) -p $(ABS_OUTPUTDIR)/j2sdk-image |
|
98 |
$(MKDIR) -p $(OUTPUTDIR)-fastdebug/j2sdk-image |
|
99 |
$(MKDIR) -p $(ABS_OUTPUTDIR)-fastdebug/j2sdk-image |
|
100 |
||
16
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
101 |
# Check on whether we really can build the openjdk, need source etc. |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
102 |
openjdk_check: |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
103 |
ifneq ($(SKIP_OPENJDK_BUILD), true) |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
104 |
@$(ECHO) " " |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
105 |
@$(ECHO) "=================================================" |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
106 |
@if [ ! -r $(OPENJDK_BUILDDIR)/Makefile ] ; then \ |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
107 |
$(ECHO) "ERROR: No openjdk source tree available at: $(OPENJDK_BUILDDIR)"; \ |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
108 |
exit 1; \ |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
109 |
else \ |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
110 |
$(ECHO) "OpenJDK will be built after JDK is built"; \ |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
111 |
$(ECHO) " OPENJDK_BUILDDIR=$(OPENJDK_BUILDDIR)"; \ |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
112 |
fi |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
113 |
@$(ECHO) "=================================================" |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
114 |
@$(ECHO) " " |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
115 |
endif |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
116 |
|
0 | 117 |
build:: sanity |
118 |
||
119 |
clobber:: |
|
120 |
||
121 |
ifeq ($(BUILD_LANGTOOLS), true) |
|
122 |
build:: langtools |
|
123 |
clobber:: langtools-clobber |
|
124 |
endif |
|
125 |
||
126 |
ifeq ($(BUILD_CORBA), true) |
|
127 |
build:: corba |
|
128 |
clobber:: corba-clobber |
|
129 |
endif |
|
130 |
||
131 |
ifeq ($(BUILD_JAXP), true) |
|
132 |
build:: jaxp |
|
133 |
clobber:: jaxp-clobber |
|
134 |
endif |
|
135 |
||
136 |
ifeq ($(BUILD_JAXWS), true) |
|
137 |
build:: jaxws |
|
138 |
clobber:: jaxws-clobber |
|
139 |
endif |
|
140 |
||
141 |
ifeq ($(BUILD_HOTSPOT), true) |
|
142 |
build:: $(HOTSPOT) |
|
143 |
clobber:: hotspot-clobber |
|
144 |
endif |
|
145 |
||
146 |
ifeq ($(BUILD_JDK), true) |
|
147 |
build:: $(JDK_JAVA_EXE) |
|
148 |
clobber:: jdk-clobber |
|
149 |
endif |
|
150 |
||
151 |
ifeq ($(BUILD_DEPLOY), true) |
|
152 |
build:: $(DEPLOY) |
|
153 |
clobber:: deploy-clobber |
|
154 |
endif |
|
155 |
||
156 |
# |
|
157 |
# Generic debug build, fastdebug or debug. Needs special handling. |
|
158 |
# Note that debug builds do NOT do INSTALL steps, but must be done |
|
159 |
# after the product build and before the INSTALL step of the product build. |
|
160 |
# |
|
161 |
# DEBUG_NAME is fastdebug or debug |
|
162 |
# ALT_OUTPUTDIR is changed to have -debug or -fastdebug suffix |
|
163 |
# The resulting j2sdk-image is used by the install makefiles to create a |
|
164 |
# debug install bundle jdk-*-debug-** bundle (tar or zip) |
|
165 |
# which will install in the debug or fastdebug subdirectory of the |
|
166 |
# normal product install area. |
|
167 |
# The install process needs to know what the DEBUG_NAME is, so |
|
168 |
# look for INSTALL_DEBUG_NAME in the install rules. |
|
169 |
# |
|
170 |
||
171 |
COMMON_DEBUG_FLAGS= \ |
|
172 |
DEBUG_NAME=$(DEBUG_NAME) \ |
|
173 |
ALT_OUTPUTDIR=$(_OUTPUTDIR)-$(DEBUG_NAME) \ |
|
174 |
NO_DOCS=true |
|
175 |
||
176 |
product_build: setup |
|
177 |
@$(ECHO) $@ build started: `$(DATE) '+%y-%m-%d %H:%M'` |
|
178 |
$(MAKE) SKIP_FASTDEBUG_BUILD=true SKIP_DEBUG_BUILD=true all |
|
179 |
@$(ECHO) $@ build finished: `$(DATE) '+%y-%m-%d %H:%M'` |
|
180 |
||
181 |
generic_debug_build: |
|
182 |
@$(ECHO) $@ build started: `$(DATE) '+%y-%m-%d %H:%M'` |
|
183 |
$(MAKE) $(COMMON_DEBUG_FLAGS) setup build |
|
184 |
@$(ECHO) $@ build finished: `$(DATE) '+%y-%m-%d %H:%M'` |
|
185 |
||
186 |
debug_build: setup |
|
187 |
$(MAKE) DEBUG_NAME=debug generic_debug_build |
|
188 |
||
189 |
fastdebug_build: setup |
|
190 |
$(MAKE) DEBUG_NAME=fastdebug generic_debug_build |
|
191 |
||
192 |
ifeq ($(SKIP_FASTDEBUG_BUILD), false) |
|
193 |
all:: fastdebug_build |
|
194 |
endif |
|
195 |
||
196 |
ifeq ($(SKIP_DEBUG_BUILD), false) |
|
197 |
all:: debug_build |
|
198 |
endif |
|
199 |
||
200 |
ifeq ($(BUILD_JDK), true) |
|
201 |
ifeq ($(BUNDLE_RULES_AVAILABLE), true) |
|
202 |
all:: openjdk-binary-plugs-bundles |
|
203 |
endif |
|
204 |
endif |
|
205 |
||
206 |
ifeq ($(BUILD_INSTALL), true) |
|
207 |
all :: $(INSTALL) |
|
208 |
clobber:: install-clobber |
|
209 |
endif |
|
210 |
||
211 |
ifeq ($(BUILD_SPONSORS), true) |
|
212 |
all :: $(SPONSORS) |
|
213 |
clobber:: sponsors-clobber |
|
214 |
endif |
|
215 |
||
216 |
ifneq ($(SKIP_COMPARE_IMAGES), true) |
|
217 |
all :: compare-image |
|
218 |
endif |
|
219 |
||
16
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
220 |
ifneq ($(SKIP_OPENJDK_BUILD), true) |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
221 |
all :: openjdk_build |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
222 |
endif |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
223 |
|
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
224 |
# If we have bundle rules, we have a chance here to do a complete cycle |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
225 |
# build, of production and open build. |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
226 |
# FIXUP: We should create the openjdk source bundle and build that? |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
227 |
# But how do we reliable create or get at a formal openjdk source tree? |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
228 |
# The one we have needs to be trimmed of built bits and closed dirs. |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
229 |
# The repositories might not be available. |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
230 |
# The openjdk source bundle is probably not available. |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
231 |
|
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
232 |
ifneq ($(SKIP_OPENJDK_BUILD), true) |
0 | 233 |
ifeq ($(BUILD_JDK), true) |
234 |
ifeq ($(BUNDLE_RULES_AVAILABLE), true) |
|
16
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
235 |
|
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
236 |
OPENJDK_PLUGS=$(ABS_OUTPUTDIR)/$(OPENJDK_BINARY_PLUGS_INAME) |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
237 |
OPENJDK_OUTPUTDIR=$(ABS_OUTPUTDIR)/open-output |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
238 |
OPENJDK_BUILD_NAME \ |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
239 |
= openjdk-$(JDK_MINOR_VERSION)-$(BUILD_NUMBER)-$(PLATFORM)-$(ARCH)-$(BUNDLE_DATE) |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
240 |
OPENJDK_BUILD_BINARY_ZIP=$(ABS_BIN_BUNDLEDIR)/$(OPENJDK_BUILD_NAME).zip |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
241 |
BUILT_IMAGE=$(ABS_OUTPUTDIR)/j2sdk-image |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
242 |
ifeq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64) |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
243 |
OPENJDK_BOOTDIR=$(BOOTDIR) |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
244 |
OPENJDK_IMPORTJDK=$(JDK_IMPORT_PATH) |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
245 |
else |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
246 |
OPENJDK_BOOTDIR=$(BUILT_IMAGE) |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
247 |
OPENJDK_IMPORTJDK=$(BUILT_IMAGE) |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
248 |
endif |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
249 |
|
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
250 |
openjdk_build: |
0 | 251 |
@$(ECHO) " " |
252 |
@$(ECHO) "=================================================" |
|
253 |
@$(ECHO) "Starting openjdk build" |
|
16
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
254 |
@$(ECHO) " Using: ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR)" |
0 | 255 |
@$(ECHO) "=================================================" |
256 |
@$(ECHO) " " |
|
16
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
257 |
$(RM) -r $(OPENJDK_OUTPUTDIR) |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
258 |
$(MKDIR) -p $(OPENJDK_OUTPUTDIR) |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
259 |
($(CD) $(OPENJDK_BUILDDIR) && $(MAKE) \ |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
260 |
OPENJDK=true \ |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
261 |
ALT_JDK_DEVTOOLS_DIR=$(JDK_DEVTOOLS_DIR) \ |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
262 |
ALT_OUTPUTDIR=$(OPENJDK_OUTPUTDIR) \ |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
263 |
ALT_BINARY_PLUGS_PATH=$(OPENJDK_PLUGS) \ |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
264 |
ALT_BOOTDIR=$(OPENJDK_BOOTDIR) \ |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
265 |
ALT_JDK_IMPORT_PATH=$(OPENJDK_IMPORTJDK) \ |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
266 |
product_build ) |
0 | 267 |
$(RM) $(OPENJDK_BUILD_BINARY_ZIP) |
16
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
268 |
( $(CD) $(OPENJDK_OUTPUTDIR)/j2sdk-image && \ |
0 | 269 |
$(ZIPEXE) -q -r $(OPENJDK_BUILD_BINARY_ZIP) .) |
16
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
270 |
$(RM) -r $(OPENJDK_OUTPUTDIR) |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
271 |
@$(ECHO) " " |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
272 |
@$(ECHO) "=================================================" |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
273 |
@$(ECHO) "Finished openjdk build" |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
274 |
@$(ECHO) " Binary Bundle: $(OPENJDK_BUILD_BINARY_ZIP)" |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
275 |
@$(ECHO) "=================================================" |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
276 |
@$(ECHO) " " |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
277 |
|
0 | 278 |
endif |
279 |
endif |
|
280 |
endif |
|
281 |
||
282 |
clobber:: |
|
283 |
$(RM) -r $(OUTPUTDIR)/* |
|
284 |
$(RM) -r $(OUTPUTDIR)-debug/* |
|
285 |
$(RM) -r $(OUTPUTDIR)-fastdebug/* |
|
286 |
-($(RMDIR) -p $(OUTPUTDIR) > $(DEV_NULL) 2>&1; $(TRUE)) |
|
287 |
||
288 |
clean: clobber |
|
289 |
||
290 |
all:: |
|
291 |
@$(ECHO) Control build finished: `$(DATE) '+%y-%m-%d %H:%M'` |
|
292 |
||
293 |
# |
|
294 |
# Quick jdk verification build |
|
295 |
# |
|
296 |
jdk_only: |
|
297 |
$(MAKE) SKIP_FASTDEBUG_BUILD=true BUILD_HOTSPOT=false all |
|
298 |
||
299 |
||
300 |
# |
|
301 |
# Quick jdk verification fastdebug build |
|
302 |
# |
|
303 |
jdk_fastdebug_only: |
|
304 |
$(MAKE) DEBUG_NAME=fastdebug BUILD_HOTSPOT=false BUILD_DEPLOY=false \ |
|
305 |
BUILD_INSTALL=false BUILD_SPONSORS=false generic_debug_build |
|
306 |
||
307 |
# |
|
308 |
# Quick deploy verification fastdebug build |
|
309 |
# |
|
310 |
deploy_fastdebug_only: |
|
311 |
$(MAKE) \ |
|
312 |
DEBUG_NAME=fastdebug \ |
|
313 |
BUILD_HOTSPOT=false \ |
|
314 |
BUILD_JDK=false \ |
|
315 |
BUILD_LANGTOOLS=false \ |
|
316 |
BUILD_CORBA=false \ |
|
317 |
BUILD_JAXP=false \ |
|
318 |
BUILD_JAXWS=false \ |
|
319 |
BUILD_INSTALL=false \ |
|
320 |
BUILD_SPONSORS=false \ |
|
321 |
generic_debug_build |
|
322 |
||
323 |
# |
|
324 |
# Product build (skip debug builds) |
|
325 |
# |
|
326 |
product_only: |
|
327 |
$(MAKE) SKIP_FASTDEBUG_BUILD=true all |
|
328 |
||
329 |
# |
|
330 |
# Check target |
|
331 |
# |
|
332 |
||
333 |
check: variable_check |
|
334 |
||
335 |
# |
|
336 |
# Help target |
|
337 |
# |
|
338 |
help: intro_help target_help variable_help notes_help examples_help |
|
339 |
||
340 |
# Intro help message |
|
341 |
intro_help: |
|
342 |
@$(ECHO) "\ |
|
343 |
Makefile for the JDK builds (all the JDK). \n\ |
|
344 |
" |
|
345 |
||
346 |
# Target help |
|
347 |
target_help: |
|
348 |
@$(ECHO) "\ |
|
349 |
--- Common Targets --- \n\ |
|
350 |
all -- build the core JDK (default target) \n\ |
|
351 |
help -- Print out help information \n\ |
|
352 |
check -- Check make variable values for correctness \n\ |
|
353 |
sanity -- Perform detailed sanity checks on system and settings \n\ |
|
354 |
fastdebug_build -- build the core JDK in 'fastdebug' mode (-g -O) \n\ |
|
355 |
debug_build -- build the core JDK in 'debug' mode (-g) \n\ |
|
356 |
clean -- remove all built and imported files \n\ |
|
357 |
clobber -- same as clean \n\ |
|
358 |
" |
|
359 |
||
360 |
# Variable help (only common ones used by this Makefile) |
|
361 |
variable_help: variable_help_intro variable_list variable_help_end |
|
362 |
variable_help_intro: |
|
363 |
@$(ECHO) "--- Common Variables ---" |
|
364 |
variable_help_end: |
|
365 |
@$(ECHO) " " |
|
366 |
||
367 |
# One line descriptions for the variables |
|
368 |
OUTPUTDIR.desc = Output directory |
|
369 |
PARALLEL_COMPILE_JOBS.desc = Solaris/Linux parallel compile run count |
|
370 |
SLASH_JAVA.desc = Root of all build tools, e.g. /java or J: |
|
371 |
BOOTDIR.desc = JDK used to boot the build |
|
372 |
JDK_IMPORT_PATH.desc = JDK used to import components of the build |
|
373 |
COMPILER_PATH.desc = Compiler install directory |
|
374 |
CACERTS_FILE.desc = Location of certificates file |
|
375 |
DEVTOOLS_PATH.desc = Directory containing zip and gnumake |
|
376 |
CUPS_HEADERS_PATH.desc = Include directory location for CUPS header files |
|
377 |
DXSDK_PATH.desc = Root directory of DirectX SDK |
|
378 |
MSDEVTOOLS_PATH.desc = Root directory of VC++ tools (e.g. rc.exe) |
|
379 |
MSVCRT_DLL_PATH.desc = Directory containing mscvrt.dll |
|
380 |
||
381 |
# Make variables to print out (description and value) |
|
382 |
VARIABLE_PRINTVAL_LIST += \ |
|
383 |
OUTPUTDIR \ |
|
384 |
PARALLEL_COMPILE_JOBS \ |
|
385 |
SLASH_JAVA \ |
|
386 |
BOOTDIR \ |
|
387 |
JDK_IMPORT_PATH \ |
|
388 |
COMPILER_PATH \ |
|
389 |
CACERTS_FILE \ |
|
390 |
DEVTOOLS_PATH |
|
391 |
||
392 |
# Make variables that should refer to directories that exist |
|
393 |
VARIABLE_CHECKDIR_LIST += \ |
|
394 |
SLASH_JAVA \ |
|
395 |
BOOTDIR \ |
|
396 |
JDK_IMPORT_PATH \ |
|
397 |
COMPILER_PATH \ |
|
398 |
DEVTOOLS_PATH |
|
399 |
||
400 |
# Make variables that should refer to files that exist |
|
401 |
VARIABLE_CHECKFIL_LIST += \ |
|
402 |
CACERTS_FILE |
|
403 |
||
404 |
# Some are windows specific |
|
405 |
ifeq ($(PLATFORM), windows) |
|
406 |
||
407 |
VARIABLE_PRINTVAL_LIST += \ |
|
408 |
DXSDK_PATH \ |
|
409 |
MSDEVTOOLS_PATH \ |
|
410 |
MSVCRT_DLL_PATH |
|
411 |
||
412 |
VARIABLE_CHECKDIR_LIST += \ |
|
413 |
DXSDK_PATH \ |
|
414 |
MSDEVTOOLS_PATH \ |
|
415 |
MSVCRT_DLL_PATH |
|
416 |
||
417 |
endif |
|
418 |
||
419 |
# For pattern rules below, so all are treated the same |
|
420 |
DO_PRINTVAL_LIST=$(VARIABLE_PRINTVAL_LIST:%=%.printval) |
|
421 |
DO_CHECKDIR_LIST=$(VARIABLE_CHECKDIR_LIST:%=%.checkdir) |
|
422 |
DO_CHECKFIL_LIST=$(VARIABLE_CHECKFIL_LIST:%=%.checkfil) |
|
423 |
||
424 |
# Complete variable check |
|
425 |
variable_check: $(DO_CHECKDIR_LIST) $(DO_CHECKFIL_LIST) |
|
426 |
variable_list: $(DO_PRINTVAL_LIST) variable_check |
|
427 |
||
428 |
# Pattern rule for printing out a variable |
|
429 |
%.printval: |
|
430 |
@$(ECHO) " ALT_$* - $($*.desc)" |
|
431 |
@$(ECHO) " \t $*=$($*)" |
|
432 |
||
433 |
# Pattern rule for checking to see if a variable with a directory exists |
|
434 |
%.checkdir: |
|
435 |
@if [ ! -d $($*) ] ; then \ |
|
436 |
$(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \ |
|
437 |
fi |
|
438 |
||
439 |
# Pattern rule for checking to see if a variable with a file exists |
|
440 |
%.checkfil: |
|
441 |
@if [ ! -f $($*) ] ; then \ |
|
442 |
$(ECHO) "WARNING: $* does not exist, try $(MAKE) sanity"; \ |
|
443 |
fi |
|
444 |
||
445 |
# Misc notes on help |
|
446 |
notes_help: |
|
447 |
@$(ECHO) "\ |
|
448 |
--- Notes --- \n\ |
|
449 |
- All builds use same output directory unless overridden with \n\ |
|
450 |
\t ALT_OUTPUTDIR=<dir>, changing from product to fastdebug you may want \n\ |
|
451 |
\t to use the clean target first. \n\ |
|
452 |
- JDK_IMPORT_PATH must refer to a compatible build, not all past promoted \n\ |
|
453 |
\t builds or previous release JDK builds will work. \n\ |
|
454 |
- The fastest builds have been when the sources and the BOOTDIR are on \n\ |
|
455 |
\t local disk. \n\ |
|
456 |
" |
|
457 |
||
458 |
examples_help: |
|
459 |
@$(ECHO) "\ |
|
460 |
--- Examples --- \n\ |
|
461 |
$(MAKE) fastdebug_build \n\ |
|
462 |
$(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\ |
|
463 |
$(MAKE) ALT_OUTPUTDIR=/tmp/foobar fastdebug_build \n\ |
|
464 |
$(MAKE) ALT_OUTPUTDIR=/tmp/foobar all \n\ |
|
465 |
$(MAKE) ALT_BOOTDIR=/opt/java/jdk1.5.0 \n\ |
|
466 |
$(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk1.6.0 \n\ |
|
467 |
" |
|
468 |
||
469 |
################################################################ |
|
470 |
# Source and binary plug bundling |
|
471 |
################################################################ |
|
472 |
ifeq ($(BUNDLE_RULES_AVAILABLE), true) |
|
473 |
include $(BUNDLE_RULES) |
|
474 |
endif |
|
475 |
||
476 |
################################################################ |
|
477 |
# Cycle build. Build the jdk, use it to build the jdk again. |
|
478 |
################################################################ |
|
479 |
||
16
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
480 |
ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk |
0 | 481 |
|
482 |
boot_cycle: |
|
16
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
483 |
$(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) product_build |
13adabd0ff72
6649270: Change by-default openjdk building in control/make/makefile to use open source tree
ohair
parents:
0
diff
changeset
|
484 |
$(MAKE) ALT_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image product_build |
0 | 485 |
|
486 |
################################################################ |
|
487 |
# JPRT rule to build |
|
488 |
################################################################ |
|
489 |
||
490 |
include ./make/jprt.gmk |
|
491 |
||
492 |
################################################################ |
|
493 |
# PHONY |
|
494 |
################################################################ |
|
495 |
||
496 |
.PHONY: all build what clobber insane \ |
|
497 |
fastdebug_build debug_build product_build setup \ |
|
498 |
dev dev-build dev-sanity dev-clobber |
|
499 |
||
500 |
# FIXUP: Old j2se targets |
|
501 |
j2se_fastdebug_only: jdk_fastdebug_only |
|
502 |
j2se_only: jdk_only |
|
503 |