author | bpb |
Thu, 08 Feb 2018 10:54:01 -0800 | |
changeset 48765 | 46d915180ad2 |
parent 47933 | 19122c10fc52 |
child 49979 | b70281f5146e |
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. |
|
47314 | 43 |
$(eval $(call IncludeCustomExtension, Bundles-pre.gmk)) |
37972 | 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 := \ |
47253
92fd0e04e0e1
8187544: Replace BUILD_OUTPUT and OUTPUT_ROOT with OUTPUTDIR
ihse
parents:
47217
diff
changeset
|
59 |
$(SUPPORT_OUTPUTDIR)/bundles/_$1_$$$$(subst /,_,$$$$(patsubst $(OUTPUTDIR)/%,%,$$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) |
|
47334
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
47314
diff
changeset
|
73 |
# If any of the files contain a space in the file name, CacheFind |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
47314
diff
changeset
|
74 |
# will have replaced it with ?. Tar does not accept that so need to |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
47314
diff
changeset
|
75 |
# switch it back. |
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
76 |
$$(foreach d, $$($1_BASE_DIRS), \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
77 |
$$(eval $$(call ListPathsSafely, \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
78 |
$1_$$d_RELATIVE_FILES, $$($1_$$d_LIST_FILE))) \ |
47334
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
47314
diff
changeset
|
79 |
$$(CAT) $$($1_$$d_LIST_FILE) | $$(TR) '?' ' ' > $$($1_$$d_LIST_FILE).tmp \ |
09d386ddaa42
8189095: Import JMC from artifactory using Jib and main makefiles
erikj
parents:
47314
diff
changeset
|
80 |
&& $(MV) $$($1_$$d_LIST_FILE).tmp $$($1_$$d_LIST_FILE) $$(NEWLINE) \ |
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
81 |
) |
37972 | 82 |
$$(call MakeDir, $$(@D)) |
83 |
ifneq ($$($1_SPECIAL_INCLUDES), ) |
|
84 |
$$(foreach i, $$($1_SPECIAL_INCLUDES), \ |
|
43051
6b8a8764b1fe
8172577: Builds for OS X after build 149 does not include Java Mission Control.app
erikj
parents:
43043
diff
changeset
|
85 |
$$(foreach d, $$($1_BASE_DIRS), \ |
6b8a8764b1fe
8172577: Builds for OS X after build 149 does not include Java Mission Control.app
erikj
parents:
43043
diff
changeset
|
86 |
($(CD) $$d && $(FIND) $$i >> $$($1_$$d_LIST_FILE)) ; )) |
37972 | 87 |
endif |
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
88 |
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
|
89 |
# 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
|
90 |
$$(foreach d, $$($1_BASE_DIRS), \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
91 |
( $(CD) $$d \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
92 |
&& $(ZIPEXE) -qru $$@ . -i@$$($1_$$d_LIST_FILE) \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
93 |
|| test "$$$$?" = "12" )$$(NEWLINE)) |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
94 |
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
|
95 |
.-tar.gz-false-1) |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
96 |
# 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
|
97 |
# directly from BASE_DIR. |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
98 |
$(CD) $$($1_BASE_DIRS) \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
99 |
&& ( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
100 |
-$(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
|
101 |
$(TAR_IGNORE_EXIT_VALUE) ) \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
102 |
| $(GZIP) > $$@ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
103 |
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
|
104 |
tar.gz-true-false-1) |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
105 |
# 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
|
106 |
# 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
|
107 |
$(CD) $$($1_BASE_DIRS) \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
108 |
&& ( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
109 |
-$(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
|
110 |
$$(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
|
111 |
$(TAR_IGNORE_EXIT_VALUE) ) \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
112 |
| $(GZIP) > $$@ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
113 |
else |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
114 |
# 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
|
115 |
# before creation bundle. |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
116 |
$(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
|
117 |
$(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
|
118 |
$$(foreach d, $$($1_BASE_DIRS), \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
119 |
( $(CD) $$d \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
120 |
&& $(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
|
121 |
$(TAR_IGNORE_EXIT_VALUE) ) \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
122 |
| ( $(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
|
123 |
# Unzip any zipped debuginfo files |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
124 |
ifeq ($$($1_UNZIP_DEBUGINFO), true) |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
125 |
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
|
126 |
$(CD) $$$${f%/*} && $(UNZIP) -q $$$${f} && $(RM) $$$${f}; \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
127 |
done |
37972 | 128 |
endif |
129 |
ifeq ($$($1_TYPE), tar.gz) |
|
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
130 |
$(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
131 |
( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
132 |
$$(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
|
133 |
| $(GZIP) > $$@ |
37972 | 134 |
else ifeq ($$($1_TYPE), zip) |
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
135 |
$(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && $(ZIPEXE) -qr $$@ . |
37972 | 136 |
endif |
137 |
endif |
|
138 |
||
139 |
$1 += $(BUNDLES_OUTPUTDIR)/$$($1_BUNDLE_NAME) |
|
140 |
||
141 |
endef |
|
142 |
||
143 |
################################################################################ |
|
144 |
||
145 |
# On Macosx, we bundle up the macosx specific images which already have the |
|
146 |
# correct base directories. |
|
37982
cd251f56161f
8157574: Mac fastdebug bundles have wrong directory layout
erikj
parents:
37972
diff
changeset
|
147 |
ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release) |
37972 | 148 |
JDK_IMAGE_DIR := $(JDK_MACOSX_BUNDLE_DIR) |
149 |
JRE_IMAGE_DIR := $(JRE_MACOSX_BUNDLE_DIR) |
|
150 |
JDK_IMAGE_HOMEDIR := $(JDK_MACOSX_CONTENTS_DIR)/Home |
|
151 |
JRE_IMAGE_HOMEDIR := $(JRE_MACOSX_CONTENTS_DIR)/Home |
|
152 |
JDK_BUNDLE_SUBDIR := |
|
153 |
JRE_BUNDLE_SUBDIR := |
|
154 |
else |
|
155 |
JDK_IMAGE_HOMEDIR := $(JDK_IMAGE_DIR) |
|
156 |
JRE_IMAGE_HOMEDIR := $(JRE_IMAGE_DIR) |
|
157 |
JDK_BUNDLE_SUBDIR := jdk-$(VERSION_NUMBER) |
|
158 |
JRE_BUNDLE_SUBDIR := jre-$(VERSION_NUMBER) |
|
43043
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
159 |
JRE_COMPACT1_BUNDLE_SUBDIR := jre-$(VERSION_NUMBER)-compact1 |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
160 |
JRE_COMPACT2_BUNDLE_SUBDIR := jre-$(VERSION_NUMBER)-compact2 |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
161 |
JRE_COMPACT3_BUNDLE_SUBDIR := jre-$(VERSION_NUMBER)-compact3 |
37972 | 162 |
ifneq ($(DEBUG_LEVEL), release) |
163 |
JDK_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)/$(DEBUG_LEVEL) |
|
164 |
JRE_BUNDLE_SUBDIR := $(JRE_BUNDLE_SUBDIR)/$(DEBUG_LEVEL) |
|
165 |
endif |
|
166 |
endif |
|
167 |
||
168 |
################################################################################ |
|
169 |
||
170 |
ifneq ($(filter product-bundles, $(MAKECMDGOALS)), ) |
|
171 |
$(eval $(call FillCacheFind, $(IMAGES_OUTPUTDIR))) |
|
172 |
||
173 |
SYMBOLS_EXCLUDE_PATTERN := %.debuginfo %.diz %.pdb %.map |
|
174 |
||
175 |
ALL_JDK_FILES := $(call CacheFind, $(JDK_IMAGE_DIR)) |
|
176 |
||
177 |
# Create special filter rules when dealing with unzipped .dSYM directories on |
|
178 |
# macosx |
|
179 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
47933
19122c10fc52
8191205: Set native-debug-symbols default to "external"
ihse
parents:
47440
diff
changeset
|
180 |
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false) |
37972 | 181 |
JDK_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \ |
182 |
$(call containing, .dSYM/, $(patsubst $(JDK_IMAGE_DIR)/%, %, $(ALL_JDK_FILES)))) |
|
183 |
endif |
|
184 |
endif |
|
185 |
||
186 |
JDK_BUNDLE_FILES := \ |
|
187 |
$(filter-out \ |
|
188 |
$(JDK_SYMBOLS_EXCLUDE_PATTERN) \ |
|
189 |
$(JDK_EXTRA_EXCLUDES) \ |
|
190 |
$(SYMBOLS_EXCLUDE_PATTERN) \ |
|
45097
607a19971bd9
8180129: Bundles.gmk:181: *** unterminated call to function 'filter-out': missing ')'. Stop.
tbell
parents:
45096
diff
changeset
|
191 |
$(JDK_IMAGE_HOMEDIR)/demo/% \ |
37972 | 192 |
, \ |
193 |
$(ALL_JDK_FILES) \ |
|
194 |
) |
|
195 |
JDK_SYMBOLS_BUNDLE_FILES := \ |
|
196 |
$(filter \ |
|
197 |
$(JDK_SYMBOLS_EXCLUDE_PATTERN) \ |
|
198 |
$(SYMBOLS_EXCLUDE_PATTERN) \ |
|
199 |
, \ |
|
39925
719d2be9b4de
8148548: [Linux/Solaris] debuginfo and fastdebuginfo bundle contains demo info
erikj
parents:
39111
diff
changeset
|
200 |
$(filter-out \ |
44724
8efb5c82a573
8173801: Modify makefiles to not build demos and samples bundles.
shurailine
parents:
43051
diff
changeset
|
201 |
$(JDK_IMAGE_HOMEDIR)/demo/% \ |
39925
719d2be9b4de
8148548: [Linux/Solaris] debuginfo and fastdebuginfo bundle contains demo info
erikj
parents:
39111
diff
changeset
|
202 |
, \ |
719d2be9b4de
8148548: [Linux/Solaris] debuginfo and fastdebuginfo bundle contains demo info
erikj
parents:
39111
diff
changeset
|
203 |
$(ALL_JDK_FILES) \ |
719d2be9b4de
8148548: [Linux/Solaris] debuginfo and fastdebuginfo bundle contains demo info
erikj
parents:
39111
diff
changeset
|
204 |
) \ |
37972 | 205 |
) \ |
206 |
$(call CacheFind, $(SYMBOLS_IMAGE_DIR)) |
|
207 |
||
47440
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47334
diff
changeset
|
208 |
TEST_DEMOS_BUNDLE_FILES := $(filter $(JDK_IMAGE_HOMEDIR)/demo/%, $(ALL_JDK_FILES)) |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47334
diff
changeset
|
209 |
|
37972 | 210 |
ALL_JRE_FILES := $(call CacheFind, $(JRE_IMAGE_DIR)) |
211 |
||
212 |
# Create special filter rules when dealing with unzipped .dSYM directories on |
|
213 |
# macosx |
|
214 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
47933
19122c10fc52
8191205: Set native-debug-symbols default to "external"
ihse
parents:
47440
diff
changeset
|
215 |
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false) |
37972 | 216 |
JRE_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \ |
217 |
$(call containing, .dSYM/, $(patsubst $(JRE_IMAGE_DIR)/%, %, $(ALL_JRE_FILES)))) |
|
218 |
endif |
|
219 |
endif |
|
220 |
||
221 |
JRE_BUNDLE_FILES := $(filter-out \ |
|
222 |
$(JRE_SYMBOLS_EXCLUDE_PATTERN) \ |
|
223 |
$(SYMBOLS_EXCLUDE_PATTERN), \ |
|
224 |
$(ALL_JRE_FILES)) |
|
225 |
JRE_SYMBOLS_BUNDLE_FILES := $(filter \ |
|
226 |
$(JRE_SYMBOLS_EXCLUDE_PATTERN) \ |
|
227 |
$(SYMBOLS_EXCLUDE_PATTERN), \ |
|
228 |
$(ALL_JRE_FILES)) |
|
229 |
||
230 |
$(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \ |
|
231 |
BUNDLE_NAME := $(JDK_BUNDLE_NAME), \ |
|
232 |
FILES := $(JDK_BUNDLE_FILES), \ |
|
233 |
SPECIAL_INCLUDES := $(JDK_SPECIAL_INCLUDES), \ |
|
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
234 |
BASE_DIRS := $(JDK_IMAGE_DIR), \ |
37972 | 235 |
SUBDIR := $(JDK_BUNDLE_SUBDIR), \ |
236 |
)) |
|
237 |
||
238 |
PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE) |
|
239 |
||
240 |
$(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \ |
|
241 |
BUNDLE_NAME := $(JRE_BUNDLE_NAME), \ |
|
242 |
FILES := $(JRE_BUNDLE_FILES), \ |
|
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
243 |
BASE_DIRS := $(JRE_IMAGE_DIR), \ |
37972 | 244 |
SUBDIR := $(JRE_BUNDLE_SUBDIR), \ |
245 |
)) |
|
246 |
||
247 |
PRODUCT_TARGETS += $(BUILD_JRE_BUNDLE) |
|
248 |
||
249 |
$(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \ |
|
250 |
BUNDLE_NAME := $(JDK_SYMBOLS_BUNDLE_NAME), \ |
|
251 |
FILES := $(JDK_SYMBOLS_BUNDLE_FILES), \ |
|
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
252 |
BASE_DIRS := $(JDK_IMAGE_DIR) $(wildcard $(SYMBOLS_IMAGE_DIR)), \ |
37972 | 253 |
SUBDIR := $(JDK_BUNDLE_SUBDIR), \ |
254 |
UNZIP_DEBUGINFO := true, \ |
|
255 |
)) |
|
256 |
||
257 |
PRODUCT_TARGETS += $(BUILD_JDK_SYMBOLS_BUNDLE) |
|
258 |
||
259 |
$(eval $(call SetupBundleFile, BUILD_JRE_SYMBOLS_BUNDLE, \ |
|
260 |
BUNDLE_NAME := $(JRE_SYMBOLS_BUNDLE_NAME), \ |
|
261 |
FILES := $(JRE_SYMBOLS_BUNDLE_FILES), \ |
|
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
262 |
BASE_DIRS := $(JRE_IMAGE_DIR), \ |
37972 | 263 |
SUBDIR := $(JRE_BUNDLE_SUBDIR), \ |
264 |
UNZIP_DEBUGINFO := true, \ |
|
265 |
)) |
|
266 |
||
267 |
PRODUCT_TARGETS += $(BUILD_JRE_SYMBOLS_BUNDLE) |
|
268 |
||
47440
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47334
diff
changeset
|
269 |
# The demo bundle is only created to support client tests. Ideally it should |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47334
diff
changeset
|
270 |
# be built with the main test bundle, but since the prerequisites match |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47334
diff
changeset
|
271 |
# better with the product build, it makes more sense to keep it there for now. |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47334
diff
changeset
|
272 |
$(eval $(call SetupBundleFile, BUILD_TEST_DEMOS_BUNDLE, \ |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47334
diff
changeset
|
273 |
BUNDLE_NAME := $(TEST_DEMOS_BUNDLE_NAME), \ |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47334
diff
changeset
|
274 |
FILES := $(TEST_DEMOS_BUNDLE_FILES), \ |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47334
diff
changeset
|
275 |
BASE_DIRS := $(JDK_IMAGE_DIR), \ |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47334
diff
changeset
|
276 |
SUBDIR := $(JDK_BUNDLE_SUBDIR), \ |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47334
diff
changeset
|
277 |
)) |
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47334
diff
changeset
|
278 |
|
963f70aa578d
8189682: JDK demos/tests should be in a separate bundle than hotspot ones
erikj
parents:
47334
diff
changeset
|
279 |
PRODUCT_TARGETS += $(BUILD_TEST_DEMOS_BUNDLE) |
37972 | 280 |
endif |
281 |
||
282 |
################################################################################ |
|
283 |
||
43043
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
284 |
ifneq ($(filter profiles-bundles, $(MAKECMDGOALS)), ) |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
285 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
286 |
$(error Creating compact profiles bundles on macosx is unsupported) |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
287 |
endif |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
288 |
|
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
289 |
define GenerateCompactProfilesBundles |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
290 |
ALL_JRE_COMPACT$1_FILES := $$(call CacheFind, $$(JRE_COMPACT$1_IMAGE_DIR)) |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
291 |
|
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
292 |
JRE_COMPACT$1_BUNDLE_FILES := $$(filter-out \ |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
293 |
$$(SYMBOLS_EXCLUDE_PATTERN), \ |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
294 |
$$(ALL_JRE_COMPACT$1_FILES)) |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
295 |
|
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
296 |
$$(eval $$(call SetupBundleFile, BUILD_JRE_COMPACT$1_BUNDLE, \ |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
297 |
BUNDLE_NAME := $$(JRE_COMPACT$1_BUNDLE_NAME), \ |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
298 |
FILES := $$(JRE_COMPACT$1_BUNDLE_FILES), \ |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
299 |
BASE_DIRS := $$(JRE_COMPACT$1_IMAGE_DIR), \ |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
300 |
SUBDIR := $$(JRE_COMPACT$1_BUNDLE_SUBDIR), \ |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
301 |
)) |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
302 |
|
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
303 |
PROFILES_TARGETS += $$(BUILD_JRE_COMPACT$1_BUNDLE) |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
304 |
endef |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
305 |
|
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
306 |
$(eval $(call GenerateCompactProfilesBundles,1)) |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
307 |
$(eval $(call GenerateCompactProfilesBundles,2)) |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
308 |
$(eval $(call GenerateCompactProfilesBundles,3)) |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
309 |
endif |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
310 |
|
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
311 |
################################################################################ |
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
312 |
|
37972 | 313 |
ifneq ($(filter test-bundles, $(MAKECMDGOALS)), ) |
314 |
TEST_BUNDLE_FILES := $(call CacheFind, $(TEST_IMAGE_DIR)) |
|
315 |
||
316 |
$(eval $(call SetupBundleFile, BUILD_TEST_BUNDLE, \ |
|
317 |
BUNDLE_NAME := $(TEST_BUNDLE_NAME), \ |
|
41875 | 318 |
FILES := $(TEST_BUNDLE_FILES), \ |
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
319 |
BASE_DIRS := $(TEST_IMAGE_DIR), \ |
37972 | 320 |
)) |
321 |
||
322 |
TEST_TARGETS += $(BUILD_TEST_BUNDLE) |
|
323 |
endif |
|
324 |
||
325 |
################################################################################ |
|
326 |
||
327 |
ifneq ($(filter docs-bundles, $(MAKECMDGOALS)), ) |
|
328 |
DOCS_BUNDLE_FILES := $(call CacheFind, $(DOCS_IMAGE_DIR)) |
|
329 |
||
330 |
$(eval $(call SetupBundleFile, BUILD_DOCS_BUNDLE, \ |
|
331 |
BUNDLE_NAME := $(DOCS_BUNDLE_NAME), \ |
|
332 |
FILES := $(DOCS_BUNDLE_FILES), \ |
|
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42136
diff
changeset
|
333 |
BASE_DIRS := $(DOCS_IMAGE_DIR), \ |
37972 | 334 |
SUBDIR := docs, \ |
335 |
)) |
|
336 |
||
337 |
DOCS_TARGETS += $(BUILD_DOCS_BUNDLE) |
|
338 |
endif |
|
339 |
||
340 |
################################################################################ |
|
341 |
||
342 |
# Hook to include the corresponding custom file, if present. |
|
47314 | 343 |
$(eval $(call IncludeCustomExtension, Bundles.gmk)) |
37972 | 344 |
|
345 |
################################################################################ |
|
346 |
||
347 |
product-bundles: $(PRODUCT_TARGETS) |
|
43043
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
348 |
profiles-bundles: $(PROFILES_TARGETS) |
37972 | 349 |
test-bundles: $(TEST_TARGETS) |
350 |
docs-bundles: $(DOCS_TARGETS) |
|
351 |
||
43043
bf14e07c9075
8172241: Cleanup mistakes in jib publish support change
erikj
parents:
42849
diff
changeset
|
352 |
.PHONY: all default product-bundles profiles-bundles test-bundles docs-bundles |