author | katleman |
Wed, 04 Dec 2013 23:11:17 -0800 | |
changeset 22000 | a1eb659bc2df |
parent 21759 | e24e22311718 |
child 22031 | ae288cbb4c28 |
permissions | -rw-r--r-- |
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
1 |
# |
20047
daafff583fd7
8023495: [infra] create 64-bit solaris bits with symlinks
ksrini
parents:
17667
diff
changeset
|
2 |
# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. |
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
4 |
# |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
7 |
# published by the Free Software Foundation. Oracle designates this |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
8 |
# particular file as subject to the "Classpath" exception as provided |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
10 |
# |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
15 |
# accompanied this code). |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
16 |
# |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
17 |
# You should have received a copy of the GNU General Public License version |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
20 |
# |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
22 |
# or visit www.oracle.com if you need additional information or have any |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
23 |
# questions. |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
24 |
# |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
25 |
|
20363 | 26 |
# This file is included by the root NewerMakefile and contains targets |
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
27 |
# and utilities needed by JPRT. |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
28 |
|
15072
71f6bf463347
8006100: build-infra: Bundle up the correct images in jprt
erikj
parents:
15061
diff
changeset
|
29 |
# Utilities used in this Makefile. Most of this makefile executes without |
71f6bf463347
8006100: build-infra: Bundle up the correct images in jprt
erikj
parents:
15061
diff
changeset
|
30 |
# the context of a spec file from configure. |
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
31 |
CAT=cat |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
32 |
CMP=cmp |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
33 |
CP=cp |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
34 |
ECHO=echo |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
35 |
MKDIR=mkdir |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
36 |
PRINTF=printf |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
37 |
PWD=pwd |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
38 |
# Insure we have a path that looks like it came from pwd |
20363 | 39 |
# (This is mostly for Windows sake and drive letters) |
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
40 |
define UnixPath # path |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
41 |
$(shell (cd "$1" && $(PWD))) |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
42 |
endef |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
43 |
|
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
44 |
BUILD_DIR_ROOT:=$(root_dir)/build |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
45 |
|
15061
9c6c6c6628cf
8005597: build-infra: bridgeBuild broken for pure openjdk build
erikj
parents:
15058
diff
changeset
|
46 |
ifdef OPENJDK |
9c6c6c6628cf
8005597: build-infra: bridgeBuild broken for pure openjdk build
erikj
parents:
15058
diff
changeset
|
47 |
OPEN_BUILD=true |
15082
ac03da8601cc
8003693: build-infra: bridgeBuild should allow for partial build (no hotspot)
erikj
parents:
15081
diff
changeset
|
48 |
else |
ac03da8601cc
8003693: build-infra: bridgeBuild should allow for partial build (no hotspot)
erikj
parents:
15081
diff
changeset
|
49 |
OPEN_BUILD := $(if $(or $(wildcard $(root_dir)/jdk/src/closed), \ |
20363 | 50 |
$(wildcard $(root_dir)/jdk/make/closed), \ |
51 |
$(wildcard $(root_dir)/jdk/test/closed), \ |
|
52 |
$(wildcard $(root_dir)/hotspot/src/closed), \ |
|
53 |
$(wildcard $(root_dir)/hotspot/make/closed), \ |
|
54 |
$(wildcard $(root_dir)/hotspot/test/closed)), \ |
|
55 |
false,true) |
|
15061
9c6c6c6628cf
8005597: build-infra: bridgeBuild broken for pure openjdk build
erikj
parents:
15058
diff
changeset
|
56 |
endif |
9c6c6c6628cf
8005597: build-infra: bridgeBuild broken for pure openjdk build
erikj
parents:
15058
diff
changeset
|
57 |
|
15082
ac03da8601cc
8003693: build-infra: bridgeBuild should allow for partial build (no hotspot)
erikj
parents:
15081
diff
changeset
|
58 |
HOTSPOT_AVAILABLE := $(if $(wildcard $(root_dir)/hotspot),true,false) |
ac03da8601cc
8003693: build-infra: bridgeBuild should allow for partial build (no hotspot)
erikj
parents:
15081
diff
changeset
|
59 |
|
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
60 |
########################################################################### |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
61 |
# To help in adoption of the new configure&&make build process, a bridge |
20363 | 62 |
# build will use the old settings to run configure and do the build. |
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
63 |
|
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
64 |
# Build with the configure bridge. After running configure, restart make |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
65 |
# to parse the new spec file. |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
66 |
BRIDGE_TARGETS := all |
16578
7a35b47cb9e5
8006828: "SKIP_BOOT_CYCLE=false" must work in new building infrastructure
erikj
parents:
15396
diff
changeset
|
67 |
# Add bootcycle-images target if legacy variable is set. |
7a35b47cb9e5
8006828: "SKIP_BOOT_CYCLE=false" must work in new building infrastructure
erikj
parents:
15396
diff
changeset
|
68 |
ifeq ($(SKIP_BOOT_CYCLE),false) |
7a35b47cb9e5
8006828: "SKIP_BOOT_CYCLE=false" must work in new building infrastructure
erikj
parents:
15396
diff
changeset
|
69 |
BRIDGE_TARGETS += bootcycle-images |
7a35b47cb9e5
8006828: "SKIP_BOOT_CYCLE=false" must work in new building infrastructure
erikj
parents:
15396
diff
changeset
|
70 |
endif |
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
71 |
bridgeBuild: bridge2configure |
21759 | 72 |
@cd $(root_dir) && $(MAKE) -f Makefile $(BRIDGE_TARGETS) |
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
73 |
|
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
74 |
# Bridge from old Makefile ALT settings to configure options |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
75 |
bridge2configure: $(BUILD_DIR_ROOT)/.bridge2configureOpts |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
76 |
bash ./configure $(strip $(shell $(CAT) $<)) |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
77 |
|
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
78 |
# Create a file with configure options created from old Makefile mechanisms. |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
79 |
$(BUILD_DIR_ROOT)/.bridge2configureOpts: $(BUILD_DIR_ROOT)/.bridge2configureOptsLatest |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
80 |
$(RM) $@ |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
81 |
$(CP) $< $@ |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
82 |
|
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
83 |
# Use this file to only change when obvious things have changed |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
84 |
$(BUILD_DIR_ROOT)/.bridge2configureOptsLatest: FRC |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
85 |
$(RM) $@.tmp |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
86 |
$(MKDIR) -p $(BUILD_DIR_ROOT) |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
87 |
@$(ECHO) " --with-debug-level=$(if $(DEBUG_LEVEL),$(DEBUG_LEVEL),release) " >> $@.tmp |
20363 | 88 |
ifdef ARCH_DATA_MODEL |
89 |
@$(ECHO) " --with-target-bits=$(ARCH_DATA_MODEL) " >> $@.tmp |
|
90 |
endif |
|
91 |
ifeq ($(ARCH_DATA_MODEL),32) |
|
92 |
@$(ECHO) " --with-jvm-variants=client,server " >> $@.tmp |
|
93 |
endif |
|
94 |
ifdef ALT_PARALLEL_COMPILE_JOBS |
|
95 |
@$(ECHO) " --with-num-cores=$(ALT_PARALLEL_COMPILE_JOBS) " >> $@.tmp |
|
96 |
endif |
|
97 |
ifdef ALT_BOOTDIR |
|
98 |
@$(ECHO) " --with-boot-jdk=$(call UnixPath,$(ALT_BOOTDIR)) " >> $@.tmp |
|
99 |
endif |
|
100 |
ifdef ALT_CUPS_HEADERS_PATH |
|
101 |
@$(ECHO) " --with-cups-include=$(call UnixPath,$(ALT_CUPS_HEADERS_PATH)) " >> $@.tmp |
|
102 |
endif |
|
103 |
ifdef ALT_FREETYPE_HEADERS_PATH |
|
104 |
@$(ECHO) " --with-freetype=$(call UnixPath,$(ALT_FREETYPE_HEADERS_PATH)/..) " >> $@.tmp |
|
105 |
endif |
|
106 |
ifdef ENABLE_SJAVAC |
|
107 |
@$(ECHO) " --enable-sjavac" >> $@.tmp |
|
108 |
endif |
|
109 |
ifeq ($(HOTSPOT_AVAILABLE),false) |
|
110 |
ifdef ALT_JDK_IMPORT_PATH |
|
111 |
@$(ECHO) " --with-import-hotspot=$(call UnixPath,$(ALT_JDK_IMPORT_PATH)) " >> $@.tmp |
|
112 |
endif |
|
113 |
endif |
|
114 |
ifeq ($(OPEN_BUILD),true) |
|
115 |
@$(ECHO) " --enable-openjdk-only " >> $@.tmp |
|
116 |
else |
|
117 |
# Todo: move to closed? |
|
118 |
ifdef ALT_MOZILLA_HEADERS_PATH |
|
119 |
@$(ECHO) " --with-mozilla-headers=$(call UnixPath,$(ALT_MOZILLA_HEADERS_PATH)) " >> $@.tmp |
|
120 |
endif |
|
121 |
ifdef ALT_JUNIT_DIR |
|
122 |
@$(ECHO) " --with-junit-dir=$(call UnixPath,$(ALT_JUNIT_DIR)) " >> $@.tmp |
|
123 |
endif |
|
124 |
ifdef ANT_HOME |
|
125 |
@$(ECHO) " --with-ant-home=$(call UnixPath,$(ANT_HOME)) " >> $@.tmp |
|
126 |
endif |
|
127 |
ifdef ALT_JAVAFX_ZIP_DIR |
|
128 |
@$(ECHO) " --with-javafx-zip-dir=$(call UnixPath,$(ALT_JAVAFX_ZIP_DIR)) " >> $@.tmp |
|
129 |
endif |
|
130 |
ifdef ALT_JMC_ZIP_DIR |
|
131 |
@$(ECHO) " --with-jmc-zip-dir=$(call UnixPath,$(ALT_JMC_ZIP_DIR)) " >> $@.tmp |
|
132 |
endif |
|
133 |
ifdef ALT_WIXDIR |
|
134 |
@$(ECHO) " --with-wix=$(call UnixPath,$(ALT_WIXDIR)) " >> $@.tmp |
|
135 |
endif |
|
136 |
ifdef ALT_INSTALL_LZMA_PATH |
|
137 |
@$(ECHO) " --with-lzma-path=$(call UnixPath,$(ALT_INSTALL_LZMA_PATH)) " >> $@.tmp |
|
138 |
endif |
|
139 |
ifdef ALT_INSTALL_UPX_PATH |
|
140 |
@$(ECHO) " --with-upx-path=$(call UnixPath,$(ALT_INSTALL_UPX_PATH)) " >> $@.tmp |
|
141 |
endif |
|
142 |
ifdef ALT_INSTALL_UPX_FILENAME |
|
143 |
@$(ECHO) " --with-upx-filename=$(call UnixPath,$(ALT_INSTALL_UPX_FILENAME)) " >> $@.tmp |
|
144 |
endif |
|
145 |
ifdef ALT_CCSS_SIGNING_DIR |
|
146 |
@$(ECHO) " --with-ccss-signing=$(call UnixPath,$(ALT_CCSS_SIGNING_DIR)) " >> $@.tmp |
|
147 |
endif |
|
148 |
ifdef ALT_SLASH_JAVA |
|
149 |
@$(ECHO) " --with-java-devtools=$(call UnixPath,$(ALT_SLASH_JAVA)/devtools) " >> $@.tmp |
|
150 |
endif |
|
151 |
ifdef ALT_SPARKLE_FRAMEWORK_DIR |
|
152 |
@$(ECHO) " --with-sparkle-framework=$(call UnixPath,$(ALT_SPARKLE_FRAMEWORK_DIR)) " >> $@.tmp |
|
153 |
endif |
|
154 |
endif |
|
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
155 |
@if [ -f $@ ] ; then \ |
20363 | 156 |
if ! $(CMP) $@ $@.tmp > /dev/null ; then \ |
157 |
$(CP) $@.tmp $@ ; \ |
|
158 |
fi ; \ |
|
159 |
else \ |
|
160 |
$(CP) $@.tmp $@ ; \ |
|
161 |
fi |
|
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
162 |
$(RM) $@.tmp |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
163 |
|
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
164 |
PHONY_LIST += bridge2configure bridgeBuild |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
165 |
|
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
166 |
########################################################################### |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
167 |
# JPRT targets |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
168 |
|
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
169 |
ifndef JPRT_ARCHIVE_BUNDLE |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
170 |
JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/j2sdk-image.zip |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
171 |
endif |
15083
0d22bc048353
8006797: build-infra JPRT builds need JPRT_ARCHIVE_INSTALL_BUNDLE in common/makefiles/Jprt.gmk
tbell
parents:
15082
diff
changeset
|
172 |
ifndef JPRT_ARCHIVE_INSTALL_BUNDLE |
20363 | 173 |
JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip |
15083
0d22bc048353
8006797: build-infra JPRT builds need JPRT_ARCHIVE_INSTALL_BUNDLE in common/makefiles/Jprt.gmk
tbell
parents:
15082
diff
changeset
|
174 |
endif |
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
175 |
|
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
176 |
# These targets execute in a SPEC free context, before calling bridgeBuild |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
177 |
# to generate the SPEC. |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
178 |
jprt_build_product: DEBUG_LEVEL=release |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
179 |
jprt_build_product: BUILD_DIRNAME=*-release |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
180 |
jprt_build_product: jprt_build_generic |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
181 |
|
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
182 |
jprt_build_fastdebug: DEBUG_LEVEL=fastdebug |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
183 |
jprt_build_fastdebug: BUILD_DIRNAME=*-fastdebug |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
184 |
jprt_build_fastdebug: jprt_build_generic |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
185 |
|
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
186 |
jprt_build_debug: DEBUG_LEVEL=slowdebug |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
187 |
jprt_build_debug: BUILD_DIRNAME=*-debug |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
188 |
jprt_build_debug: jprt_build_generic |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
189 |
|
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
190 |
jprt_build_generic: BRIDGE_TARGETS+=jprt_bundle |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
191 |
jprt_build_generic: bridgeBuild |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
192 |
|
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
193 |
# This target must be called in the context of a SPEC file |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
194 |
jprt_bundle: $(JPRT_ARCHIVE_BUNDLE) |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
195 |
@$(call CheckIfMakeAtEnd) |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
196 |
|
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
197 |
# This target must be called in the context of a SPEC file |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
198 |
$(JPRT_ARCHIVE_BUNDLE): bundles |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
199 |
$(MKDIR) -p $(@D) |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
200 |
$(RM) $@ |
15396 | 201 |
$(CP) $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip $@ |
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
202 |
|
20047
daafff583fd7
8023495: [infra] create 64-bit solaris bits with symlinks
ksrini
parents:
17667
diff
changeset
|
203 |
SRC_JDK_IMAGE_DIR := $(JDK_IMAGE_DIR) |
daafff583fd7
8023495: [infra] create 64-bit solaris bits with symlinks
ksrini
parents:
17667
diff
changeset
|
204 |
SRC_JRE_IMAGE_DIR := $(JRE_IMAGE_DIR) |
15396 | 205 |
SRC_JDK_BUNDLE_DIR := $(JDK_BUNDLE_DIR) |
206 |
SRC_JRE_BUNDLE_DIR := $(JRE_BUNDLE_DIR) |
|
207 |
||
208 |
# Bundle up the images |
|
209 |
bundles: all bundles-only |
|
210 |
bundles-only: start-make |
|
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
211 |
@$(call TargetEnter) |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
212 |
$(MKDIR) -p $(BUILD_OUTPUT)/bundles |
20047
daafff583fd7
8023495: [infra] create 64-bit solaris bits with symlinks
ksrini
parents:
17667
diff
changeset
|
213 |
$(CD) $(SRC_JDK_IMAGE_DIR) && $(ZIP) -y -q -r $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip . |
daafff583fd7
8023495: [infra] create 64-bit solaris bits with symlinks
ksrini
parents:
17667
diff
changeset
|
214 |
$(CD) $(SRC_JRE_IMAGE_DIR) && $(ZIP) -y -q -r $(BUILD_OUTPUT)/bundles/$(JRE_IMAGE_SUBDIR).zip . |
20363 | 215 |
if [ -d $(BUILD_OUTPUT)/install/bundles ] ; then \ |
216 |
$(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -y -q -r $(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \ |
|
217 |
fi |
|
15396 | 218 |
@$(call TargetExit) |
219 |
||
220 |
# Copy images to one unified location regardless of platform etc. |
|
221 |
final-images: all final-images-only |
|
222 |
final-images-only: start-make |
|
223 |
@$(call TargetEnter) |
|
224 |
$(RM) -r $(BUILD_OUTPUT)/final-images |
|
225 |
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR) |
|
226 |
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR) |
|
227 |
$(CP) -R -P $(SRC_JDK_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR)/ |
|
228 |
$(CP) -R -P $(SRC_JRE_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)/ |
|
20363 | 229 |
ifeq ($(OPENJDK_TARGET_OS),macosx) |
230 |
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR) |
|
231 |
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR) |
|
232 |
$(CP) -R -P $(SRC_JDK_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR)/ |
|
233 |
$(CP) -R -P $(SRC_JRE_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)/ |
|
234 |
endif |
|
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
235 |
@$(call TargetExit) |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
236 |
|
15396 | 237 |
|
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
238 |
# Keep track of phony targets |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
239 |
PHONY_LIST += jprt_build_product jprt_build_fastdebug jprt_build_debug \ |
20363 | 240 |
jprt_build_generic bundles jprt_bundle \ |
241 |
final-images final-images-only |
|
15053
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
242 |
|
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
243 |
########################################################################### |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
244 |
# Phony targets |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
245 |
.PHONY: $(PHONY_LIST) |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
246 |
|
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
247 |
# Force target |
64278cb83950
8005549: build-infra: Merge NewMakefile.gmk and common/makefiles/Makefile
erikj
parents:
diff
changeset
|
248 |
FRC: |