2
# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
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.
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).
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.
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
39
# On Windows tar frequently complains that "file changed as we read it" for
40
# some random source files. This seems to be cause by anti virus scanners and
41
# is most likely safe to ignore. When it happens, tar returns '1'.
42
ifeq ($(call isBuildOs, windows), true)
43
TAR_IGNORE_EXIT_VALUE := || test "$$$$?" = "1"
46
# Hook to include the corresponding custom file, if present.
47
$(eval $(call IncludeCustomExtension, Bundles-pre.gmk))
48
################################################################################
49
# BUNDLE : Name of bundle to create
50
# FILES : Files in BASE_DIRS to add to bundle
51
# SPECIAL_INCLUDES : List of directories inside BASE_DIRS to look for additional
52
# files in. These files will not get proper dependency handling. Use when
53
# files or directories may contain spaces.
54
# BASE_DIRS : Base directories for the root dir in the bundle.
55
# SUBDIR : Optional name of root dir in bundle.
56
# OUTPUTDIR : Optionally override output dir
57
SetupBundleFile = $(NamedParamsMacroTemplate)
58
define SetupBundleFileBody
60
$$(foreach d, $$($1_BASE_DIRS), \
61
$$(eval $1_$$d_RELATIVE_FILES := $$$$(patsubst $$d/%, %, \
62
$$$$(filter $$d/%, $$$$($1_FILES)))) \
63
$$(eval $1_$$d_LIST_FILE := \
64
$(SUPPORT_OUTPUTDIR)/bundles/_$1_$$$$(subst /,_,$$$$(patsubst $(OUTPUTDIR)/%,%,$$d)_files)) \
67
ifneq ($$(filter %.tar.gz, $$($1_BUNDLE_NAME)), )
69
else ifneq ($$(filter %.zip, $$($1_BUNDLE_NAME)), )
72
$$(error Unknown bundle type $$($1_BUNDLE_NAME))
75
$$(call SetIfEmpty, $1_UNZIP_DEBUGINFO, false)
77
$$(call SetIfEmpty, $1_OUTPUTDIR, $$(BUNDLES_OUTPUTDIR))
79
$$($1_OUTPUTDIR)/$$($1_BUNDLE_NAME): $$($1_FILES)
80
$$(call MakeTargetDir)
81
$$(call LogWarn, Creating $$($1_BUNDLE_NAME))
82
# If any of the files contain a space in the file name, FindFiles
83
# will have replaced it with ?. Tar does not accept that so need to
85
$$(foreach d, $$($1_BASE_DIRS), \
86
$$(eval $$(call ListPathsSafely, \
87
$1_$$d_RELATIVE_FILES, $$($1_$$d_LIST_FILE))) \
88
$$(CAT) $$($1_$$d_LIST_FILE) | $$(TR) '?' ' ' > $$($1_$$d_LIST_FILE).tmp \
89
&& $(MV) $$($1_$$d_LIST_FILE).tmp $$($1_$$d_LIST_FILE) $$(NEWLINE) \
91
ifneq ($$($1_SPECIAL_INCLUDES), )
92
$$(foreach i, $$($1_SPECIAL_INCLUDES), \
93
$$(foreach d, $$($1_BASE_DIRS), \
94
($(CD) $$d && $(FIND) $$i >> $$($1_$$d_LIST_FILE)) ; ))
96
ifeq ($$($1_SUBDIR)-$$($1_TYPE)-$$($1_UNZIP_DEBUGINFO), .-zip-false)
97
# If no subdir is specified, zip can be done directly from BASE_DIRS.
98
$$(foreach d, $$($1_BASE_DIRS), \
100
&& $(ZIPEXE) -qru $$@ . -i@$$($1_$$d_LIST_FILE) \
101
|| test "$$$$?" = "12" )$$(NEWLINE))
102
else ifeq ($$($1_SUBDIR)-$$($1_TYPE)-$$($1_UNZIP_DEBUGINFO)-$$(words $$($1_BASE_DIRS)), \
104
# If no subdir is specified and only one BASE_DIR, tar.gz can be done
105
# directly from BASE_DIR.
106
$(CD) $$($1_BASE_DIRS) \
108
-$(TAR_INCLUDE_PARAM) $$($1_$$($1_BASE_DIRS)_LIST_FILE) \
109
$(TAR_IGNORE_EXIT_VALUE) ) \
111
else ifeq ($$($1_TYPE)-$(TAR_SUPPORTS_TRANSFORM)-$$($1_UNZIP_DEBUGINFO)-$$(words $$($1_BASE_DIRS)), \
113
# If only one BASE_DIR, but with a SUBDIR set, tar.gz can use the
114
# transform option to create bundle directly from the BASE_DIR.
115
$(CD) $$($1_BASE_DIRS) \
117
-$(TAR_INCLUDE_PARAM) $$($1_$$($1_BASE_DIRS)_LIST_FILE) \
118
$$(if $$($1_SUBDIR), --transform 's|^|$$($1_SUBDIR)/|S') \
119
$(TAR_IGNORE_EXIT_VALUE) ) \
122
# In all other cases, need to copy all files into a temporary location
123
# before creation bundle.
124
$(RM) -r $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR)
125
$(MKDIR) -p $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR)
126
$$(foreach d, $$($1_BASE_DIRS), \
128
&& $(TAR) cf - -$(TAR_INCLUDE_PARAM) $$($1_$$d_LIST_FILE) \
129
$(TAR_IGNORE_EXIT_VALUE) ) \
130
| ( $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) && $(TAR) xf - )$$(NEWLINE) )
131
# Rename stripped pdb files
132
ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+public)
133
for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.stripped.pdb"`; do \
134
$(ECHO) Renaming $$$${f} to $$$${f%stripped.pdb}pdb $(LOG_INFO); \
135
$(MV) $$$${f} $$$${f%stripped.pdb}pdb; \
138
# Unzip any zipped debuginfo files
139
ifeq ($$($1_UNZIP_DEBUGINFO), true)
140
for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.diz"`; do \
141
$(CD) $$$${f%/*} && $(UNZIP) -q $$$${f} && $(RM) $$$${f}; \
144
ifeq ($$($1_TYPE), tar.gz)
145
$(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && \
147
$$(if $$($1_SUBDIR), $$($1_SUBDIR), .) $(TAR_IGNORE_EXIT_VALUE) ) \
149
else ifeq ($$($1_TYPE), zip)
150
$(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && $(ZIPEXE) -qr $$@ .
154
$1 += $$($1_OUTPUTDIR)/$$($1_BUNDLE_NAME)
158
################################################################################
160
# On Macosx, we bundle up the macosx specific images which already have the
161
# correct base directories.
162
ifeq ($(call isTargetOs, macosx)+$(DEBUG_LEVEL), true+release)
163
JDK_IMAGE_DIR := $(JDK_MACOSX_BUNDLE_DIR)
164
JRE_IMAGE_DIR := $(JRE_MACOSX_BUNDLE_DIR)
165
JDK_IMAGE_HOMEDIR := $(JDK_MACOSX_CONTENTS_DIR)/Home
166
JRE_IMAGE_HOMEDIR := $(JRE_MACOSX_CONTENTS_DIR)/Home
169
# In certain situations, the JDK_IMAGE_DIR points to an image without the
170
# the symbols and demos. If so, the symobls and demos can be found in a
171
# separate image. These variables allow for overriding from a custom makefile.
172
JDK_SYMBOLS_IMAGE_DIR ?= $(JDK_IMAGE_DIR)
173
JDK_DEMOS_IMAGE_DIR ?= $(JDK_IMAGE_DIR)
174
JDK_DEMOS_IMAGE_HOMEDIR ?= $(JDK_DEMOS_IMAGE_DIR)/$(JDK_MACOSX_CONTENTS_SUBDIR)/Home
176
JDK_IMAGE_HOMEDIR := $(JDK_IMAGE_DIR)
177
JRE_IMAGE_HOMEDIR := $(JRE_IMAGE_DIR)
178
JDK_BUNDLE_SUBDIR := jdk-$(VERSION_NUMBER)
179
JRE_BUNDLE_SUBDIR := jre-$(VERSION_NUMBER)
180
ifneq ($(DEBUG_LEVEL), release)
181
JDK_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
182
JRE_BUNDLE_SUBDIR := $(JRE_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
184
# In certain situations, the JDK_IMAGE_DIR points to an image without the
185
# the symbols and demos. If so, the symobls and demos can be found in a
186
# separate image. These variables allow for overriding from a custom makefile.
187
JDK_SYMBOLS_IMAGE_DIR ?= $(JDK_IMAGE_DIR)
188
JDK_DEMOS_IMAGE_DIR ?= $(JDK_IMAGE_DIR)
189
JDK_DEMOS_IMAGE_HOMEDIR ?= $(JDK_DEMOS_IMAGE_DIR)
192
################################################################################
194
ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
196
SYMBOLS_EXCLUDE_PATTERN := %.debuginfo %.diz %.map
198
# There may be files with spaces in the names, so use ShellFindFiles
200
ALL_JDK_FILES := $(call ShellFindFiles, $(JDK_IMAGE_DIR))
201
ifneq ($(JDK_IMAGE_DIR), $(JDK_SYMBOLS_IMAGE_DIR))
202
ALL_JDK_SYMBOLS_FILES := $(call ShellFindFiles, $(JDK_SYMBOLS_IMAGE_DIR))
204
ALL_JDK_SYMBOLS_FILES := $(ALL_JDK_FILES)
206
ifneq ($(JDK_IMAGE_DIR), $(JDK_DEMOS_IMAGE_DIR))
207
ALL_JDK_DEMOS_FILES := $(call ShellFindFiles, $(JDK_DEMOS_IMAGE_DIR))
209
ALL_JDK_DEMOS_FILES := $(ALL_JDK_FILES)
212
# Create special filter rules when dealing with unzipped .dSYM directories on
214
ifeq ($(call isTargetOs, macosx), true)
215
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
216
JDK_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
217
$(call containing, .dSYM/, $(patsubst $(JDK_IMAGE_DIR)/%, %, \
218
$(ALL_JDK_SYMBOLS_FILES))))
222
# Create special filter rules when dealing with debug symbols on windows
223
ifeq ($(call isTargetOs, windows), true)
224
ifeq ($(SHIP_DEBUG_SYMBOLS), )
225
JDK_SYMBOLS_EXCLUDE_PATTERN := %.pdb
227
ifeq ($(SHIP_DEBUG_SYMBOLS), public)
228
JDK_SYMBOLS_EXCLUDE_PATTERN := \
231
$(filter %.pdb, $(ALL_JDK_FILES)) \
237
JDK_BUNDLE_FILES := \
239
$(JDK_SYMBOLS_EXCLUDE_PATTERN) \
240
$(JDK_EXTRA_EXCLUDES) \
241
$(SYMBOLS_EXCLUDE_PATTERN) \
242
$(JDK_IMAGE_HOMEDIR)/demo/% \
247
JDK_SYMBOLS_BUNDLE_FILES := \
248
$(call FindFiles, $(SYMBOLS_IMAGE_DIR))
250
TEST_DEMOS_BUNDLE_FILES := $(filter $(JDK_DEMOS_IMAGE_HOMEDIR)/demo/%, \
251
$(ALL_JDK_DEMOS_FILES))
253
ALL_JRE_FILES := $(call ShellFindFiles, $(JRE_IMAGE_DIR))
255
# Create special filter rules when dealing with unzipped .dSYM directories on
257
ifeq ($(OPENJDK_TARGET_OS), macosx)
258
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
259
JRE_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
260
$(call containing, .dSYM/, $(patsubst $(JRE_IMAGE_DIR)/%, %, $(ALL_JRE_FILES))))
264
# Create special filter rules when dealing with debug symbols on windows
265
ifeq ($(call isTargetOs, windows), true)
266
ifeq ($(SHIP_DEBUG_SYMBOLS), )
267
JRE_SYMBOLS_EXCLUDE_PATTERN := %.pdb
269
ifeq ($(SHIP_DEBUG_SYMBOLS), public)
270
JRE_SYMBOLS_EXCLUDE_PATTERN := \
273
$(filter %.pdb, $(ALL_JRE_FILES)) \
279
JRE_BUNDLE_FILES := $(filter-out \
280
$(JRE_SYMBOLS_EXCLUDE_PATTERN) \
281
$(SYMBOLS_EXCLUDE_PATTERN), \
284
ifeq ($(MACOSX_CODESIGN_MODE), hardened)
285
# Macosx release build and code signing available.
287
################################################################################
289
$(eval $(call SetupCopyFiles, CREATE_JDK_BUNDLE_DIR_SIGNED, \
290
SRC := $(JDK_IMAGE_DIR), \
291
FILES := $(JDK_BUNDLE_FILES), \
292
DEST := $(JDK_MACOSX_BUNDLE_DIR_SIGNED), \
295
JDK_SIGNED_CODE_RESOURCES := \
296
$(JDK_MACOSX_BUNDLE_DIR_SIGNED)/$(JDK_MACOSX_CONTENTS_SUBDIR)/_CodeSignature/CodeResources
298
$(JDK_SIGNED_CODE_RESOURCES): $(CREATE_JDK_BUNDLE_DIR_SIGNED)
299
$(call LogWarn, Signing $(JDK_BUNDLE_NAME))
300
$(CODESIGN) -s "$(MACOSX_CODESIGN_IDENTITY)" \
301
--timestamp --options runtime --deep --force \
302
$(JDK_MACOSX_BUNDLE_DIR_SIGNED)/$(JDK_MACOSX_BUNDLE_TOP_DIR) $(LOG_DEBUG)
305
$(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
306
BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
308
$(CREATE_JDK_BUNDLE_DIR_SIGNED) \
309
$(JDK_SIGNED_CODE_RESOURCES), \
310
BASE_DIRS := $(JDK_MACOSX_BUNDLE_DIR_SIGNED), \
311
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
314
PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
316
################################################################################
318
$(eval $(call SetupCopyFiles, CREATE_JRE_BUNDLE_DIR_SIGNED, \
319
SRC := $(JRE_IMAGE_DIR), \
320
FILES := $(JRE_BUNDLE_FILES), \
321
DEST := $(JRE_MACOSX_BUNDLE_DIR_SIGNED), \
324
JRE_SIGNED_CODE_RESOURCES := \
325
$(JRE_MACOSX_BUNDLE_DIR_SIGNED)/$(JRE_MACOSX_CONTENTS_SUBDIR)/_CodeSignature/CodeResources
327
$(JRE_SIGNED_CODE_RESOURCES): $(CREATE_JRE_BUNDLE_DIR_SIGNED)
328
$(call LogWarn, Signing $(JRE_BUNDLE_NAME))
329
$(CODESIGN) -s "$(MACOSX_CODESIGN_IDENTITY)" \
330
--timestamp --options runtime --deep --force \
331
$(JRE_MACOSX_BUNDLE_DIR_SIGNED)/$(JRE_MACOSX_BUNDLE_TOP_DIR) $(LOG_DEBUG)
334
$(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
335
BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
337
$(CREATE_JRE_BUNDLE_DIR_SIGNED) \
338
$(JRE_SIGNED_CODE_RESOURCES), \
339
BASE_DIRS := $(JRE_MACOSX_BUNDLE_DIR_SIGNED), \
340
SUBDIR := $(JRE_BUNDLE_SUBDIR), \
343
LEGACY_TARGETS += $(BUILD_JRE_BUNDLE)
345
# Not a Macosx release build or code signing not available.
346
$(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
347
BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
348
FILES := $(JDK_BUNDLE_FILES), \
349
SPECIAL_INCLUDES := $(JDK_SPECIAL_INCLUDES), \
350
BASE_DIRS := $(JDK_IMAGE_DIR), \
351
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
354
PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
356
$(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
357
BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
358
FILES := $(JRE_BUNDLE_FILES), \
359
BASE_DIRS := $(JRE_IMAGE_DIR), \
360
SUBDIR := $(JRE_BUNDLE_SUBDIR), \
363
LEGACY_TARGETS += $(BUILD_JRE_BUNDLE)
366
ifeq ($(COPY_DEBUG_SYMBOLS), true)
367
$(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \
368
BUNDLE_NAME := $(JDK_SYMBOLS_BUNDLE_NAME), \
369
FILES := $(JDK_SYMBOLS_BUNDLE_FILES), \
370
BASE_DIRS := $(SYMBOLS_IMAGE_DIR), \
371
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
372
UNZIP_DEBUGINFO := true, \
375
PRODUCT_TARGETS += $(BUILD_JDK_SYMBOLS_BUNDLE)
378
# The demo bundle is only created to support client tests. Ideally it should
379
# be built with the main test bundle, but since the prerequisites match
380
# better with the product build, it makes more sense to keep it there for now.
381
$(eval $(call SetupBundleFile, BUILD_TEST_DEMOS_BUNDLE, \
382
BUNDLE_NAME := $(TEST_DEMOS_BUNDLE_NAME), \
383
FILES := $(TEST_DEMOS_BUNDLE_FILES), \
384
BASE_DIRS := $(JDK_DEMOS_IMAGE_DIR), \
385
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
388
PRODUCT_TARGETS += $(BUILD_TEST_DEMOS_BUNDLE)
391
################################################################################
393
ifneq ($(filter test-bundles, $(MAKECMDGOALS)), )
394
TEST_BUNDLE_FILES := $(call FindFiles, $(TEST_IMAGE_DIR))
396
$(eval $(call SetupBundleFile, BUILD_TEST_BUNDLE, \
397
BUNDLE_NAME := $(TEST_BUNDLE_NAME), \
398
FILES := $(TEST_BUNDLE_FILES), \
399
BASE_DIRS := $(TEST_IMAGE_DIR), \
402
TEST_TARGETS += $(BUILD_TEST_BUNDLE)
405
################################################################################
407
ifneq ($(filter docs-jdk-bundles, $(MAKECMDGOALS)), )
408
DOCS_JDK_BUNDLE_FILES := $(call FindFiles, $(DOCS_JDK_IMAGE_DIR))
410
$(eval $(call SetupBundleFile, BUILD_DOCS_JDK_BUNDLE, \
411
BUNDLE_NAME := $(DOCS_JDK_BUNDLE_NAME), \
412
FILES := $(DOCS_JDK_BUNDLE_FILES), \
413
BASE_DIRS := $(DOCS_JDK_IMAGE_DIR), \
417
DOCS_JDK_TARGETS += $(BUILD_DOCS_JDK_BUNDLE)
420
ifneq ($(filter docs-javase-bundles, $(MAKECMDGOALS)), )
421
DOCS_JAVASE_BUNDLE_FILES := $(call FindFiles, $(DOCS_JAVASE_IMAGE_DIR))
423
$(eval $(call SetupBundleFile, BUILD_DOCS_JAVASE_BUNDLE, \
424
BUNDLE_NAME := $(DOCS_JAVASE_BUNDLE_NAME), \
425
FILES := $(DOCS_JAVASE_BUNDLE_FILES), \
426
BASE_DIRS := $(DOCS_JAVASE_IMAGE_DIR), \
427
SUBDIR := docs-javase, \
430
DOCS_JAVASE_TARGETS += $(BUILD_DOCS_JAVASE_BUNDLE)
433
ifneq ($(filter docs-reference-bundles, $(MAKECMDGOALS)), )
434
DOCS_REFERENCE_BUNDLE_FILES := $(call FindFiles, $(DOCS_REFERENCE_IMAGE_DIR))
436
$(eval $(call SetupBundleFile, BUILD_DOCS_REFERENCE_BUNDLE, \
437
BUNDLE_NAME := $(DOCS_REFERENCE_BUNDLE_NAME), \
438
FILES := $(DOCS_REFERENCE_BUNDLE_FILES), \
439
BASE_DIRS := $(DOCS_REFERENCE_IMAGE_DIR), \
440
SUBDIR := docs-reference, \
443
DOCS_REFERENCE_TARGETS += $(BUILD_DOCS_REFERENCE_BUNDLE)
446
################################################################################
448
ifneq ($(filter jcov-bundles, $(MAKECMDGOALS)), )
449
JCOV_BUNDLE_FILES := $(call FindFiles, $(JCOV_IMAGE_DIR))
451
$(eval $(call SetupBundleFile, BUILD_JCOV_BUNDLE, \
452
BUNDLE_NAME := $(JCOV_BUNDLE_NAME), \
453
FILES := $(JCOV_BUNDLE_FILES), \
454
BASE_DIRS := $(JCOV_IMAGE_DIR), \
455
SUBDIR := jdk-$(VERSION_NUMBER), \
458
JCOV_TARGETS += $(BUILD_JCOV_BUNDLE)
461
################################################################################
463
ifneq ($(filter static-libs-bundles, $(MAKECMDGOALS)), )
464
STATIC_LIBS_BUNDLE_FILES := $(call FindFiles, $(STATIC_LIBS_IMAGE_DIR))
466
ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release)
467
STATIC_LIBS_BUNDLE_SUBDIR := $(JDK_MACOSX_CONTENTS_SUBDIR)/Home
469
STATIC_LIBS_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)
472
$(eval $(call SetupBundleFile, BUILD_STATIC_LIBS_BUNDLE, \
473
BUNDLE_NAME := $(STATIC_LIBS_BUNDLE_NAME), \
474
FILES := $(STATIC_LIBS_BUNDLE_FILES), \
475
BASE_DIRS := $(STATIC_LIBS_IMAGE_DIR), \
476
SUBDIR := $(STATIC_LIBS_BUNDLE_SUBDIR), \
479
STATIC_LIBS_TARGETS += $(BUILD_STATIC_LIBS_BUNDLE)
482
################################################################################
484
ifneq ($(filter static-libs-graal-bundles, $(MAKECMDGOALS)), )
485
STATIC_LIBS_GRAAL_BUNDLE_FILES := $(call FindFiles, $(STATIC_LIBS_GRAAL_IMAGE_DIR))
487
ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release)
488
STATIC_LIBS_GRAAL_BUNDLE_SUBDIR := $(JDK_MACOSX_CONTENTS_SUBDIR)/Home
490
STATIC_LIBS_GRAAL_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)
493
$(eval $(call SetupBundleFile, BUILD_STATIC_LIBS_GRAAL_BUNDLE, \
494
BUNDLE_NAME := $(STATIC_LIBS_GRAAL_BUNDLE_NAME), \
495
FILES := $(STATIC_LIBS_GRAAL_BUNDLE_FILES), \
496
BASE_DIRS := $(STATIC_LIBS_GRAAL_IMAGE_DIR), \
497
SUBDIR := $(STATIC_LIBS_GRAAL_BUNDLE_SUBDIR), \
500
STATIC_LIBS_GRAAL_TARGETS += $(BUILD_STATIC_LIBS_GRAAL_BUNDLE)
503
################################################################################
505
# Hook to include the corresponding custom file, if present.
506
$(eval $(call IncludeCustomExtension, Bundles.gmk))
508
################################################################################
510
product-bundles: $(PRODUCT_TARGETS)
511
legacy-bundles: $(LEGACY_TARGETS)
512
test-bundles: $(TEST_TARGETS)
513
docs-jdk-bundles: $(DOCS_JDK_TARGETS)
514
docs-javase-bundles: $(DOCS_JAVASE_TARGETS)
515
docs-reference-bundles: $(DOCS_REFERENCE_TARGETS)
516
static-libs-bundles: $(STATIC_LIBS_TARGETS)
517
static-libs-graal-bundles: $(STATIC_LIBS_GRAAL_TARGETS)
518
jcov-bundles: $(JCOV_TARGETS)
520
.PHONY: all default product-bundles test-bundles \
521
docs-jdk-bundles docs-javase-bundles docs-reference-bundles \
522
static-libs-bundles static-libs-graal-bundles jcov-bundles