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
46 # FILES : Files in BASE_DIRS to add to bundle
47 # SPECIAL_INCLUDES : List of directories inside BASE_DIRS to look for additional
48 # files in. These files will not get proper dependency handling. Use when
49 # files or directories may contain spaces.
50 # BASE_DIRS : Base directories for the root dir in the bundle.
51 # SUBDIR : Optional name of root dir in bundle.
52 SetupBundleFile = $(NamedParamsMacroTemplate)
53 define SetupBundleFileBody
54
55 $$(foreach d, $$($1_BASE_DIRS), \
56 $$(eval $1_$$d_RELATIVE_FILES := $$$$(patsubst $$d/%, %, \
57 $$$$(filter $$d/%, $$$$($1_FILES)))) \
58 $$(eval $1_$$d_LIST_FILE := \
59 $(SUPPORT_OUTPUTDIR)/bundles/_$1_$$$$(subst /,_,$$$$(patsubst $(OUTPUTDIR)/%,%,$$d)_files)) \
60 )
61
62 ifneq ($$(filter %.tar.gz, $$($1_BUNDLE_NAME)), )
63 $1_TYPE := tar.gz
305 endif
306
307 ################################################################################
308
309 ifneq ($(filter docs-bundles, $(MAKECMDGOALS)), )
310 DOCS_BUNDLE_FILES := $(call CacheFind, $(DOCS_IMAGE_DIR))
311
312 $(eval $(call SetupBundleFile, BUILD_DOCS_BUNDLE, \
313 BUNDLE_NAME := $(DOCS_BUNDLE_NAME), \
314 FILES := $(DOCS_BUNDLE_FILES), \
315 BASE_DIRS := $(DOCS_IMAGE_DIR), \
316 SUBDIR := docs, \
317 ))
318
319 DOCS_TARGETS += $(BUILD_DOCS_BUNDLE)
320 endif
321
322 ################################################################################
323
324 # Hook to include the corresponding custom file, if present.
325 $(eval $(call IncludeCustomExtension, , Bundles.gmk))
326
327 ################################################################################
328
329 product-bundles: $(PRODUCT_TARGETS)
330 profiles-bundles: $(PROFILES_TARGETS)
331 test-bundles: $(TEST_TARGETS)
332 docs-bundles: $(DOCS_TARGETS)
333
334 .PHONY: all default product-bundles profiles-bundles test-bundles docs-bundles
|
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
46 # FILES : Files in BASE_DIRS to add to bundle
47 # SPECIAL_INCLUDES : List of directories inside BASE_DIRS to look for additional
48 # files in. These files will not get proper dependency handling. Use when
49 # files or directories may contain spaces.
50 # BASE_DIRS : Base directories for the root dir in the bundle.
51 # SUBDIR : Optional name of root dir in bundle.
52 SetupBundleFile = $(NamedParamsMacroTemplate)
53 define SetupBundleFileBody
54
55 $$(foreach d, $$($1_BASE_DIRS), \
56 $$(eval $1_$$d_RELATIVE_FILES := $$$$(patsubst $$d/%, %, \
57 $$$$(filter $$d/%, $$$$($1_FILES)))) \
58 $$(eval $1_$$d_LIST_FILE := \
59 $(SUPPORT_OUTPUTDIR)/bundles/_$1_$$$$(subst /,_,$$$$(patsubst $(OUTPUTDIR)/%,%,$$d)_files)) \
60 )
61
62 ifneq ($$(filter %.tar.gz, $$($1_BUNDLE_NAME)), )
63 $1_TYPE := tar.gz
305 endif
306
307 ################################################################################
308
309 ifneq ($(filter docs-bundles, $(MAKECMDGOALS)), )
310 DOCS_BUNDLE_FILES := $(call CacheFind, $(DOCS_IMAGE_DIR))
311
312 $(eval $(call SetupBundleFile, BUILD_DOCS_BUNDLE, \
313 BUNDLE_NAME := $(DOCS_BUNDLE_NAME), \
314 FILES := $(DOCS_BUNDLE_FILES), \
315 BASE_DIRS := $(DOCS_IMAGE_DIR), \
316 SUBDIR := docs, \
317 ))
318
319 DOCS_TARGETS += $(BUILD_DOCS_BUNDLE)
320 endif
321
322 ################################################################################
323
324 # Hook to include the corresponding custom file, if present.
325 $(eval $(call IncludeCustomExtension, Bundles.gmk))
326
327 ################################################################################
328
329 product-bundles: $(PRODUCT_TARGETS)
330 profiles-bundles: $(PROFILES_TARGETS)
331 test-bundles: $(TEST_TARGETS)
332 docs-bundles: $(DOCS_TARGETS)
333
334 .PHONY: all default product-bundles profiles-bundles test-bundles docs-bundles
|