author | erikj |
Wed, 21 Dec 2016 17:53:11 +0100 | |
changeset 42849 | fa0a0a987432 |
parent 42507 | a3499e58c108 |
child 43043 | bf14e07c9075 |
permissions | -rw-r--r-- |
37972 | 1 |
# |
2 |
# Copyright (c) 2016, Oracle and/or its affiliates. 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. Oracle designates this |
|
8 |
# particular file as subject to the "Classpath" exception as provided |
|
9 |
# by Oracle 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 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. |
|
24 |
# |
|
25 |
||
26 |
default: all |
|
27 |
||
28 |
include $(SPEC) |
|
29 |
include MakeBase.gmk |
|
30 |
||
31 |
PRODUCT_TARGETS := |
|
32 |
TEST_TARGETS := |
|
33 |
DOCS_TARGETS := |
|
34 |
||
35 |
# On Windows tar frequently complains that "file changed as we read it" for |
|
36 |
# some random source files. This seems to be cause by anti virus scanners and |
|
37 |
# is most likely safe to ignore. When it happens, tar returns '1'. |
|
38 |
ifeq ($(OPENJDK_BUILD_OS), windows) |
|
39 |
TAR_IGNORE_EXIT_VALUE := || test "$$$$?" = "1" |
|
40 |
endif |
|
41 |
||
42 |
# Hook to include the corresponding custom file, if present. |
|
43 |
$(eval $(call IncludeCustomExtension, , Bundles-pre.gmk)) |
|
44 |
################################################################################ |
|
45 |
# BUNDLE : Name of bundle to create |
|
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
46 |
# FILES : Files in BASE_DIRS to add to bundle |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
47 |
# SPECIAL_INCLUDES : List of directories inside BASE_DIRS to look for additional |
37972 | 48 |
# files in. These files will not get proper dependency handling. Use when |
49 |
# files or directories may contain spaces. |
|
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
50 |
# BASE_DIRS : Base directories for the root dir in the bundle. |
37972 | 51 |
# SUBDIR : Optional name of root dir in bundle. |
52 |
SetupBundleFile = $(NamedParamsMacroTemplate) |
|
53 |
define SetupBundleFileBody |
|
54 |
||
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
55 |
$$(foreach d, $$($1_BASE_DIRS), \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
56 |
$$(eval $1_$$d_RELATIVE_FILES := $$$$(patsubst $$d/%, %, \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
57 |
$$$$(filter $$d/%, $$$$($1_FILES)))) \ |
42507
a3499e58c108
8171167: Build fails in Mach 5 with "File name too long."
erikj
parents:
42506
diff
changeset
|
58 |
$$(eval $1_$$d_LIST_FILE := \ |
a3499e58c108
8171167: Build fails in Mach 5 with "File name too long."
erikj
parents:
42506
diff
changeset
|
59 |
$(SUPPORT_OUTPUTDIR)/bundles/_$1_$$$$(subst /,_,$$$$(patsubst $(TOPDIR)/%,%,$$d)_files)) \ |
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
60 |
) |
37972 | 61 |
|
62 |
ifneq ($$(filter %.tar.gz, $$($1_BUNDLE_NAME)), ) |
|
63 |
$1_TYPE := tar.gz |
|
64 |
else ifneq ($$(filter %.zip, $$($1_BUNDLE_NAME)), ) |
|
65 |
$1_TYPE := zip |
|
66 |
else |
|
67 |
$$(error Unknown bundle type $$($1_BUNDLE_NAME)) |
|
68 |
endif |
|
69 |
||
70 |
$$(call SetIfEmpty, $1_UNZIP_DEBUGINFO, false) |
|
71 |
||
72 |
$(BUNDLES_OUTPUTDIR)/$$($1_BUNDLE_NAME): $$($1_FILES) |
|
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
73 |
$$(foreach d, $$($1_BASE_DIRS), \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
74 |
$$(eval $$(call ListPathsSafely, \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
75 |
$1_$$d_RELATIVE_FILES, $$($1_$$d_LIST_FILE))) \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
76 |
) |
37972 | 77 |
$$(call MakeDir, $$(@D)) |
78 |
ifneq ($$($1_SPECIAL_INCLUDES), ) |
|
79 |
$$(foreach i, $$($1_SPECIAL_INCLUDES), \ |
|
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
80 |
$$(foreach d, $$d, \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
81 |
($(CD) $$d && $(FIND) $$i \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
82 |
>> $(SUPPORT_OUTPUTDIR)/bundles/_$1_files ) ; )) |
37972 | 83 |
endif |
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
84 |
ifeq ($$($1_SUBDIR)-$$($1_TYPE)-$$($1_UNZIP_DEBUGINFO), .-zip-false) |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
85 |
# If no subdir is specified, zip can be done directly from BASE_DIRS. |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
86 |
$$(foreach d, $$($1_BASE_DIRS), \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
87 |
( $(CD) $$d \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
88 |
&& $(ZIPEXE) -qru $$@ . -i@$$($1_$$d_LIST_FILE) \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
89 |
|| test "$$$$?" = "12" )$$(NEWLINE)) |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
90 |
else ifeq ($$($1_SUBDIR)-$$($1_TYPE)-$$($1_UNZIP_DEBUGINFO)-$$(words $$($1_BASE_DIRS)), \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
91 |
.-tar.gz-false-1) |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
92 |
# If no subdir is specified and only one BASE_DIR, tar.gz can be done |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
93 |
# directly from BASE_DIR. |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
94 |
$(CD) $$($1_BASE_DIRS) \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
95 |
&& ( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
96 |
-$(TAR_INCLUDE_PARAM) $$($1_$$($1_BASE_DIRS)_LIST_FILE) \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
97 |
$(TAR_IGNORE_EXIT_VALUE) ) \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
98 |
| $(GZIP) > $$@ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
99 |
else ifeq ($$($1_TYPE)-$(TAR_SUPPORTS_TRANSFORM)-$$($1_UNZIP_DEBUGINFO)-$$(words $$($1_BASE_DIRS)), \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
100 |
tar.gz-true-false-1) |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
101 |
# If only one BASE_DIR, but with a SUBDIR set, tar.gz can use the |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
102 |
# transform option to create bundle directly from the BASE_DIR. |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
103 |
$(CD) $$($1_BASE_DIRS) \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
104 |
&& ( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
105 |
-$(TAR_INCLUDE_PARAM) $$($1_$$($1_BASE_DIRS)_LIST_FILE) \ |
42849
fa0a0a987432
8171548: JDK bundles changes sym links incorrectly in the legal directory
erikj
parents:
42507
diff
changeset
|
106 |
$$(if $$($1_SUBDIR), --transform 's|^|$$($1_SUBDIR)/|S') \ |
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
107 |
$(TAR_IGNORE_EXIT_VALUE) ) \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
108 |
| $(GZIP) > $$@ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
109 |
else |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
110 |
# In all other cases, need to copy all files into a temporary location |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
111 |
# before creation bundle. |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
112 |
$(RM) -r $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
113 |
$(MKDIR) -p $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
114 |
$$(foreach d, $$($1_BASE_DIRS), \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
115 |
( $(CD) $$d \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
116 |
&& $(TAR) cf - -$(TAR_INCLUDE_PARAM) $$($1_$$d_LIST_FILE) \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
117 |
$(TAR_IGNORE_EXIT_VALUE) ) \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
118 |
| ( $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) && $(TAR) xf - )$$(NEWLINE) ) |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
119 |
# Unzip any zipped debuginfo files |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
120 |
ifeq ($$($1_UNZIP_DEBUGINFO), true) |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
121 |
for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.diz"`; do \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
122 |
$(CD) $$$${f%/*} && $(UNZIP) -q $$$${f} && $(RM) $$$${f}; \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
123 |
done |
37972 | 124 |
endif |
125 |
ifeq ($$($1_TYPE), tar.gz) |
|
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
126 |
$(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
127 |
( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
128 |
$$(if $$($1_SUBDIR), $$($1_SUBDIR), .) $(TAR_IGNORE_EXIT_VALUE) ) \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
129 |
| $(GZIP) > $$@ |
37972 | 130 |
else ifeq ($$($1_TYPE), zip) |
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
131 |
$(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && $(ZIPEXE) -qr $$@ . |
37972 | 132 |
endif |
133 |
endif |
|
134 |
||
135 |
$1 += $(BUNDLES_OUTPUTDIR)/$$($1_BUNDLE_NAME) |
|
136 |
||
137 |
endef |
|
138 |
||
139 |
################################################################################ |
|
140 |
||
141 |
# On Macosx, we bundle up the macosx specific images which already have the |
|
142 |
# correct base directories. |
|
37982
cd251f56161f
8157574: Mac fastdebug bundles have wrong directory layout
erikj
parents:
37972
diff
changeset
|
143 |
ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release) |
37972 | 144 |
JDK_IMAGE_DIR := $(JDK_MACOSX_BUNDLE_DIR) |
145 |
JRE_IMAGE_DIR := $(JRE_MACOSX_BUNDLE_DIR) |
|
146 |
JDK_IMAGE_HOMEDIR := $(JDK_MACOSX_CONTENTS_DIR)/Home |
|
147 |
JRE_IMAGE_HOMEDIR := $(JRE_MACOSX_CONTENTS_DIR)/Home |
|
148 |
JDK_BUNDLE_SUBDIR := |
|
149 |
JRE_BUNDLE_SUBDIR := |
|
150 |
else |
|
151 |
JDK_IMAGE_HOMEDIR := $(JDK_IMAGE_DIR) |
|
152 |
JRE_IMAGE_HOMEDIR := $(JRE_IMAGE_DIR) |
|
153 |
JDK_BUNDLE_SUBDIR := jdk-$(VERSION_NUMBER) |
|
154 |
JRE_BUNDLE_SUBDIR := jre-$(VERSION_NUMBER) |
|
155 |
ifneq ($(DEBUG_LEVEL), release) |
|
156 |
JDK_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)/$(DEBUG_LEVEL) |
|
157 |
JRE_BUNDLE_SUBDIR := $(JRE_BUNDLE_SUBDIR)/$(DEBUG_LEVEL) |
|
158 |
endif |
|
159 |
endif |
|
160 |
||
161 |
################################################################################ |
|
162 |
||
163 |
ifneq ($(filter product-bundles, $(MAKECMDGOALS)), ) |
|
164 |
$(eval $(call FillCacheFind, $(IMAGES_OUTPUTDIR))) |
|
165 |
||
166 |
SYMBOLS_EXCLUDE_PATTERN := %.debuginfo %.diz %.pdb %.map |
|
167 |
||
168 |
ALL_JDK_FILES := $(call CacheFind, $(JDK_IMAGE_DIR)) |
|
169 |
||
170 |
# Create special filter rules when dealing with unzipped .dSYM directories on |
|
171 |
# macosx |
|
172 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
173 |
ifeq ($(ZIP_DEBUGINFO_FILES), false) |
|
174 |
JDK_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \ |
|
175 |
$(call containing, .dSYM/, $(patsubst $(JDK_IMAGE_DIR)/%, %, $(ALL_JDK_FILES)))) |
|
176 |
endif |
|
177 |
endif |
|
178 |
||
179 |
JDK_BUNDLE_FILES := \ |
|
180 |
$(filter-out \ |
|
181 |
$(JDK_SYMBOLS_EXCLUDE_PATTERN) \ |
|
182 |
$(JDK_EXTRA_EXCLUDES) \ |
|
183 |
$(SYMBOLS_EXCLUDE_PATTERN) \ |
|
184 |
$(JDK_IMAGE_HOMEDIR)/demo/% $(JDK_IMAGE_HOMEDIR)/sample/% \ |
|
185 |
, \ |
|
186 |
$(ALL_JDK_FILES) \ |
|
187 |
) |
|
188 |
DEMOS_BUNDLE_FILES := \ |
|
189 |
$(filter-out \ |
|
190 |
$(JDK_SYMBOLS_EXCLUDE_PATTERN) \ |
|
191 |
$(SYMBOLS_EXCLUDE_PATTERN) \ |
|
192 |
, \ |
|
193 |
$(filter \ |
|
194 |
$(JDK_IMAGE_HOMEDIR)/demo/% $(JDK_IMAGE_HOMEDIR)/sample/% \ |
|
195 |
$(JDK_IMAGE_HOMEDIR)/release \ |
|
196 |
, \ |
|
197 |
$(ALL_JDK_FILES) \ |
|
198 |
) \ |
|
199 |
) |
|
200 |
JDK_SYMBOLS_BUNDLE_FILES := \ |
|
201 |
$(filter \ |
|
202 |
$(JDK_SYMBOLS_EXCLUDE_PATTERN) \ |
|
203 |
$(SYMBOLS_EXCLUDE_PATTERN) \ |
|
204 |
, \ |
|
39925
719d2be9b4de
8148548: [Linux/Solaris] debuginfo and fastdebuginfo bundle contains demo info
erikj
parents:
39111
diff
changeset
|
205 |
$(filter-out \ |
719d2be9b4de
8148548: [Linux/Solaris] debuginfo and fastdebuginfo bundle contains demo info
erikj
parents:
39111
diff
changeset
|
206 |
$(JDK_IMAGE_HOMEDIR)/demo/% $(JDK_IMAGE_HOMEDIR)/sample/% \ |
719d2be9b4de
8148548: [Linux/Solaris] debuginfo and fastdebuginfo bundle contains demo info
erikj
parents:
39111
diff
changeset
|
207 |
, \ |
719d2be9b4de
8148548: [Linux/Solaris] debuginfo and fastdebuginfo bundle contains demo info
erikj
parents:
39111
diff
changeset
|
208 |
$(ALL_JDK_FILES) \ |
719d2be9b4de
8148548: [Linux/Solaris] debuginfo and fastdebuginfo bundle contains demo info
erikj
parents:
39111
diff
changeset
|
209 |
) \ |
37972 | 210 |
) \ |
211 |
$(call CacheFind, $(SYMBOLS_IMAGE_DIR)) |
|
212 |
||
213 |
ALL_JRE_FILES := $(call CacheFind, $(JRE_IMAGE_DIR)) |
|
214 |
||
215 |
# Create special filter rules when dealing with unzipped .dSYM directories on |
|
216 |
# macosx |
|
217 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
218 |
ifeq ($(ZIP_DEBUGINFO_FILES), false) |
|
219 |
JRE_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \ |
|
220 |
$(call containing, .dSYM/, $(patsubst $(JRE_IMAGE_DIR)/%, %, $(ALL_JRE_FILES)))) |
|
221 |
endif |
|
222 |
endif |
|
223 |
||
224 |
JRE_BUNDLE_FILES := $(filter-out \ |
|
225 |
$(JRE_SYMBOLS_EXCLUDE_PATTERN) \ |
|
226 |
$(SYMBOLS_EXCLUDE_PATTERN), \ |
|
227 |
$(ALL_JRE_FILES)) |
|
228 |
JRE_SYMBOLS_BUNDLE_FILES := $(filter \ |
|
229 |
$(JRE_SYMBOLS_EXCLUDE_PATTERN) \ |
|
230 |
$(SYMBOLS_EXCLUDE_PATTERN), \ |
|
231 |
$(ALL_JRE_FILES)) |
|
232 |
||
233 |
$(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \ |
|
234 |
BUNDLE_NAME := $(JDK_BUNDLE_NAME), \ |
|
235 |
FILES := $(JDK_BUNDLE_FILES), \ |
|
236 |
SPECIAL_INCLUDES := $(JDK_SPECIAL_INCLUDES), \ |
|
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
237 |
BASE_DIRS := $(JDK_IMAGE_DIR), \ |
37972 | 238 |
SUBDIR := $(JDK_BUNDLE_SUBDIR), \ |
239 |
)) |
|
240 |
||
241 |
PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE) |
|
242 |
||
243 |
$(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \ |
|
244 |
BUNDLE_NAME := $(JRE_BUNDLE_NAME), \ |
|
245 |
FILES := $(JRE_BUNDLE_FILES), \ |
|
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
246 |
BASE_DIRS := $(JRE_IMAGE_DIR), \ |
37972 | 247 |
SUBDIR := $(JRE_BUNDLE_SUBDIR), \ |
248 |
)) |
|
249 |
||
250 |
PRODUCT_TARGETS += $(BUILD_JRE_BUNDLE) |
|
251 |
||
252 |
$(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \ |
|
253 |
BUNDLE_NAME := $(JDK_SYMBOLS_BUNDLE_NAME), \ |
|
254 |
FILES := $(JDK_SYMBOLS_BUNDLE_FILES), \ |
|
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
255 |
BASE_DIRS := $(JDK_IMAGE_DIR) $(wildcard $(SYMBOLS_IMAGE_DIR)), \ |
37972 | 256 |
SUBDIR := $(JDK_BUNDLE_SUBDIR), \ |
257 |
UNZIP_DEBUGINFO := true, \ |
|
258 |
)) |
|
259 |
||
260 |
PRODUCT_TARGETS += $(BUILD_JDK_SYMBOLS_BUNDLE) |
|
261 |
||
262 |
$(eval $(call SetupBundleFile, BUILD_JRE_SYMBOLS_BUNDLE, \ |
|
263 |
BUNDLE_NAME := $(JRE_SYMBOLS_BUNDLE_NAME), \ |
|
264 |
FILES := $(JRE_SYMBOLS_BUNDLE_FILES), \ |
|
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
265 |
BASE_DIRS := $(JRE_IMAGE_DIR), \ |
37972 | 266 |
SUBDIR := $(JRE_BUNDLE_SUBDIR), \ |
267 |
UNZIP_DEBUGINFO := true, \ |
|
268 |
)) |
|
269 |
||
270 |
PRODUCT_TARGETS += $(BUILD_JRE_SYMBOLS_BUNDLE) |
|
271 |
||
272 |
$(eval $(call SetupBundleFile, BUILD_DEMOS_BUNDLE, \ |
|
273 |
BUNDLE_NAME := $(DEMOS_BUNDLE_NAME), \ |
|
41875 | 274 |
FILES := $(DEMOS_BUNDLE_FILES), \ |
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
275 |
BASE_DIRS := $(JDK_IMAGE_DIR), \ |
37972 | 276 |
SUBDIR := $(JDK_BUNDLE_SUBDIR), \ |
277 |
)) |
|
278 |
||
279 |
PRODUCT_TARGETS += $(BUILD_DEMOS_BUNDLE) |
|
280 |
endif |
|
281 |
||
282 |
################################################################################ |
|
283 |
||
284 |
ifneq ($(filter test-bundles, $(MAKECMDGOALS)), ) |
|
285 |
TEST_BUNDLE_FILES := $(call CacheFind, $(TEST_IMAGE_DIR)) |
|
286 |
||
287 |
$(eval $(call SetupBundleFile, BUILD_TEST_BUNDLE, \ |
|
288 |
BUNDLE_NAME := $(TEST_BUNDLE_NAME), \ |
|
41875 | 289 |
FILES := $(TEST_BUNDLE_FILES), \ |
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
290 |
BASE_DIRS := $(TEST_IMAGE_DIR), \ |
37972 | 291 |
)) |
292 |
||
293 |
TEST_TARGETS += $(BUILD_TEST_BUNDLE) |
|
294 |
endif |
|
295 |
||
296 |
################################################################################ |
|
297 |
||
298 |
ifneq ($(filter docs-bundles, $(MAKECMDGOALS)), ) |
|
299 |
DOCS_BUNDLE_FILES := $(call CacheFind, $(DOCS_IMAGE_DIR)) |
|
300 |
||
301 |
$(eval $(call SetupBundleFile, BUILD_DOCS_BUNDLE, \ |
|
302 |
BUNDLE_NAME := $(DOCS_BUNDLE_NAME), \ |
|
303 |
FILES := $(DOCS_BUNDLE_FILES), \ |
|
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
304 |
BASE_DIRS := $(DOCS_IMAGE_DIR), \ |
37972 | 305 |
SUBDIR := docs, \ |
306 |
)) |
|
307 |
||
308 |
DOCS_TARGETS += $(BUILD_DOCS_BUNDLE) |
|
309 |
endif |
|
310 |
||
311 |
################################################################################ |
|
312 |
||
313 |
# Hook to include the corresponding custom file, if present. |
|
314 |
$(eval $(call IncludeCustomExtension, , Bundles.gmk)) |
|
315 |
||
316 |
################################################################################ |
|
317 |
||
318 |
product-bundles: $(PRODUCT_TARGETS) |
|
319 |
test-bundles: $(TEST_TARGETS) |
|
320 |
docs-bundles: $(DOCS_TARGETS) |
|
321 |
||
322 |
.PHONY: all default product-bundles test-bundles docs-bundles |