< prev index next >

make/Bundles.gmk

Print this page




  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_DIR to add to bundle
  47 # SPECIAL_INCLUDES : List of directories inside BASE_DIR 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_DIR : Base directory for the root dir in the bundle.
  51 # SUBDIR : Optional name of root dir in bundle.
  52 SetupBundleFile = $(NamedParamsMacroTemplate)
  53 define SetupBundleFileBody
  54 
  55   $1_RELATIVE_FILES := $$(patsubst $$($1_BASE_DIR)/%, %, $$($1_FILES))




  56 
  57   ifneq ($$(filter %.tar.gz, $$($1_BUNDLE_NAME)), )
  58     $1_TYPE := tar.gz
  59   else ifneq ($$(filter %.zip, $$($1_BUNDLE_NAME)), )
  60     $1_TYPE := zip
  61   else
  62     $$(error Unknown bundle type $$($1_BUNDLE_NAME))
  63   endif
  64 
  65   $$(call SetIfEmpty, $1_UNZIP_DEBUGINFO, false)
  66 
  67   $(BUNDLES_OUTPUTDIR)/$$($1_BUNDLE_NAME): $$($1_FILES)

  68         $$(eval $$(call ListPathsSafely, \
  69             $1_RELATIVE_FILES, \
  70             $(SUPPORT_OUTPUTDIR)/bundles/_$1_files))
  71         $$(call MakeDir, $$(@D))
  72         ifneq ($$($1_SPECIAL_INCLUDES), )
  73           $$(foreach i, $$($1_SPECIAL_INCLUDES), \
  74               ($(CD) $$($1_BASE_DIR) && $(FIND) $$i \
  75                   >> $(SUPPORT_OUTPUTDIR)/bundles/_$1_files ) ; )
  76         endif
  77         ifneq ($$($1_SUBDIR), )
  78           ifeq ($$($1_TYPE)-$(TAR_SUPPORTS_TRANSFORM)-$$($1_UNZIP_DEBUGINFO), tar.gz-true-false)
  79             $(CD) $$($1_BASE_DIR) \


















  80                 && ( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \
  81                     -$(TAR_INCLUDE_PARAM) $(SUPPORT_OUTPUTDIR)/bundles/_$1_files \
  82                     --transform 's|^|$$($1_SUBDIR)/|' $(TAR_IGNORE_EXIT_VALUE) ) \

  83                 | $(GZIP) > $$@
  84           else
  85             # If a subdir has been specified, copy all files into a temporary
  86             # location with this subdir before creating the tar file
  87             $(RM) -r $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR)
  88             $(MKDIR) -p $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR)
  89             ( $(CD) $$($1_BASE_DIR) \
  90                 && $(TAR) cf - -$(TAR_INCLUDE_PARAM) $(SUPPORT_OUTPUTDIR)/bundles/_$1_files \

  91                     $(TAR_IGNORE_EXIT_VALUE) ) \
  92                 | ( $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) && $(TAR) xf - )
  93             # Unzip any zipped debuginfo files
  94             ifeq ($$($1_UNZIP_DEBUGINFO), true)
  95               for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.diz"`; do \
  96                 $(CD) $$$${f%/*} && $(UNZIP) -q $$$${f} && $(RM) $$$${f}; \
  97               done
  98             endif
  99             ifeq ($$($1_TYPE), tar.gz)
 100               $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && \
 101                   ( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) $$($1_SUBDIR) $(TAR_IGNORE_EXIT_VALUE) ) \

 102                   | $(GZIP) > $$@
 103             else ifeq ($$($1_TYPE), zip)
 104               $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && $(ZIPEXE) -qr $$@ .
 105             endif
 106           endif
 107         else
 108           ifeq ($$($1_TYPE), tar.gz)
 109             $(CD) $$($1_BASE_DIR) \
 110                 && ( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \
 111                     -$(TAR_INCLUDE_PARAM) $(SUPPORT_OUTPUTDIR)/bundles/_$1_files \
 112                     $(TAR_IGNORE_EXIT_VALUE) ) \
 113                 | $(GZIP) > $$@
 114           else ifeq ($$($1_TYPE), zip)
 115             $(CD) $$($1_BASE_DIR) \
 116                 && $(ZIPEXE) -qr $$@ . -i@$(SUPPORT_OUTPUTDIR)/bundles/_$1_files
 117           endif
 118         endif
 119 
 120   $1 += $(BUNDLES_OUTPUTDIR)/$$($1_BUNDLE_NAME)
 121 
 122 endef
 123 
 124 ################################################################################
 125 
 126 # On Macosx, we bundle up the macosx specific images which already have the
 127 # correct base directories.
 128 ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release)
 129   JDK_IMAGE_DIR := $(JDK_MACOSX_BUNDLE_DIR)
 130   JRE_IMAGE_DIR := $(JRE_MACOSX_BUNDLE_DIR)
 131   JDK_IMAGE_HOMEDIR := $(JDK_MACOSX_CONTENTS_DIR)/Home
 132   JRE_IMAGE_HOMEDIR := $(JRE_MACOSX_CONTENTS_DIR)/Home
 133   JDK_BUNDLE_SUBDIR :=
 134   JRE_BUNDLE_SUBDIR :=
 135 else
 136   JDK_IMAGE_HOMEDIR := $(JDK_IMAGE_DIR)
 137   JRE_IMAGE_HOMEDIR := $(JRE_IMAGE_DIR)
 138   JDK_BUNDLE_SUBDIR := jdk-$(VERSION_NUMBER)


 202   ifeq ($(OPENJDK_TARGET_OS), macosx)
 203     ifeq ($(ZIP_DEBUGINFO_FILES), false)
 204       JRE_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
 205           $(call containing, .dSYM/, $(patsubst $(JRE_IMAGE_DIR)/%, %, $(ALL_JRE_FILES))))
 206     endif
 207   endif
 208 
 209   JRE_BUNDLE_FILES := $(filter-out \
 210       $(JRE_SYMBOLS_EXCLUDE_PATTERN) \
 211       $(SYMBOLS_EXCLUDE_PATTERN), \
 212       $(ALL_JRE_FILES))
 213   JRE_SYMBOLS_BUNDLE_FILES := $(filter \
 214       $(JRE_SYMBOLS_EXCLUDE_PATTERN) \
 215       $(SYMBOLS_EXCLUDE_PATTERN), \
 216       $(ALL_JRE_FILES))
 217 
 218   $(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
 219       BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
 220       FILES := $(JDK_BUNDLE_FILES), \
 221       SPECIAL_INCLUDES := $(JDK_SPECIAL_INCLUDES), \
 222       BASE_DIR := $(JDK_IMAGE_DIR), \
 223       SUBDIR := $(JDK_BUNDLE_SUBDIR), \
 224   ))
 225 
 226   PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
 227 
 228   $(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
 229       BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
 230       FILES := $(JRE_BUNDLE_FILES), \
 231       BASE_DIR := $(JRE_IMAGE_DIR), \
 232       SUBDIR := $(JRE_BUNDLE_SUBDIR), \
 233   ))
 234 
 235   PRODUCT_TARGETS += $(BUILD_JRE_BUNDLE)
 236 
 237   $(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \
 238       BUNDLE_NAME := $(JDK_SYMBOLS_BUNDLE_NAME), \
 239       FILES := $(JDK_SYMBOLS_BUNDLE_FILES), \
 240       BASE_DIR := $(JDK_IMAGE_DIR), \
 241       SUBDIR := $(JDK_BUNDLE_SUBDIR), \
 242       UNZIP_DEBUGINFO := true, \
 243   ))
 244 
 245   PRODUCT_TARGETS += $(BUILD_JDK_SYMBOLS_BUNDLE)
 246 
 247   $(eval $(call SetupBundleFile, BUILD_JRE_SYMBOLS_BUNDLE, \
 248       BUNDLE_NAME := $(JRE_SYMBOLS_BUNDLE_NAME), \
 249       FILES := $(JRE_SYMBOLS_BUNDLE_FILES), \
 250       BASE_DIR := $(JRE_IMAGE_DIR), \
 251       SUBDIR := $(JRE_BUNDLE_SUBDIR), \
 252       UNZIP_DEBUGINFO := true, \
 253   ))
 254 
 255   PRODUCT_TARGETS += $(BUILD_JRE_SYMBOLS_BUNDLE)
 256 
 257   $(eval $(call SetupBundleFile, BUILD_DEMOS_BUNDLE, \
 258       BUNDLE_NAME := $(DEMOS_BUNDLE_NAME), \
 259       FILES := $(DEMOS_BUNDLE_FILES), \
 260       BASE_DIR := $(JDK_IMAGE_DIR), \
 261       SUBDIR := $(JDK_BUNDLE_SUBDIR), \
 262   ))
 263 
 264   PRODUCT_TARGETS += $(BUILD_DEMOS_BUNDLE)
 265 endif
 266 
 267 ################################################################################
 268 
 269 ifneq ($(filter test-bundles, $(MAKECMDGOALS)), )
 270   TEST_BUNDLE_FILES := $(call CacheFind, $(TEST_IMAGE_DIR))
 271 
 272   $(eval $(call SetupBundleFile, BUILD_TEST_BUNDLE, \
 273       BUNDLE_NAME := $(TEST_BUNDLE_NAME), \
 274       FILES := $(TEST_BUNDLE_FILES), \
 275       BASE_DIR := $(TEST_IMAGE_DIR), \
 276   ))
 277 
 278   TEST_TARGETS += $(BUILD_TEST_BUNDLE)
 279 endif
 280 
 281 ################################################################################
 282 
 283 ifneq ($(filter docs-bundles, $(MAKECMDGOALS)), )
 284   DOCS_BUNDLE_FILES := $(call CacheFind, $(DOCS_IMAGE_DIR))
 285 
 286   $(eval $(call SetupBundleFile, BUILD_DOCS_BUNDLE, \
 287       BUNDLE_NAME := $(DOCS_BUNDLE_NAME), \
 288       FILES := $(DOCS_BUNDLE_FILES), \
 289       BASE_DIR := $(DOCS_IMAGE_DIR), \
 290       SUBDIR := docs, \
 291   ))
 292 
 293   DOCS_TARGETS += $(BUILD_DOCS_BUNDLE)
 294 endif
 295 
 296 ################################################################################
 297 
 298 # Hook to include the corresponding custom file, if present.
 299 $(eval $(call IncludeCustomExtension, , Bundles.gmk))
 300 
 301 ################################################################################
 302 
 303 product-bundles: $(PRODUCT_TARGETS)
 304 test-bundles: $(TEST_TARGETS)
 305 docs-bundles: $(DOCS_TARGETS)
 306 
 307 .PHONY: all default product-bundles test-bundles docs-bundles


  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 := $(SUPPORT_OUTPUTDIR)/bundles/_$1_$$$$(subst /,_,$$d_files)) \
  59   )
  60 
  61   ifneq ($$(filter %.tar.gz, $$($1_BUNDLE_NAME)), )
  62     $1_TYPE := tar.gz
  63   else ifneq ($$(filter %.zip, $$($1_BUNDLE_NAME)), )
  64     $1_TYPE := zip
  65   else
  66     $$(error Unknown bundle type $$($1_BUNDLE_NAME))
  67   endif
  68 
  69   $$(call SetIfEmpty, $1_UNZIP_DEBUGINFO, false)
  70 
  71   $(BUNDLES_OUTPUTDIR)/$$($1_BUNDLE_NAME): $$($1_FILES)
  72         $$(foreach d, $$($1_BASE_DIRS), \
  73           $$(eval $$(call ListPathsSafely, \
  74               $1_$$d_RELATIVE_FILES, $$($1_$$d_LIST_FILE))) \
  75         )
  76         $$(call MakeDir, $$(@D))
  77         ifneq ($$($1_SPECIAL_INCLUDES), )
  78           $$(foreach i, $$($1_SPECIAL_INCLUDES), \
  79             $$(foreach d, $$d, \
  80               ($(CD) $$d && $(FIND) $$i \
  81                   >> $(SUPPORT_OUTPUTDIR)/bundles/_$1_files ) ; ))
  82         endif
  83         ifeq ($$($1_SUBDIR)-$$($1_TYPE)-$$($1_UNZIP_DEBUGINFO), .-zip-false)
  84           # If no subdir is specified, zip can be done directly from BASE_DIRS.
  85           $$(foreach d, $$($1_BASE_DIRS), \
  86             ( $(CD) $$d \
  87             && $(ZIPEXE) -qru $$@ . -i@$$($1_$$d_LIST_FILE) \
  88             || test "$$$$?" = "12" )$$(NEWLINE))
  89         else ifeq ($$($1_SUBDIR)-$$($1_TYPE)-$$($1_UNZIP_DEBUGINFO)-$$(words $$($1_BASE_DIRS)), \
  90             .-tar.gz-false-1)
  91           # If no subdir is specified and only one BASE_DIR, tar.gz can be done
  92           # directly from BASE_DIR.
  93           $(CD) $$($1_BASE_DIRS) \
  94               && ( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \
  95                   -$(TAR_INCLUDE_PARAM) $$($1_$$($1_BASE_DIRS)_LIST_FILE) \
  96                   $(TAR_IGNORE_EXIT_VALUE) ) \
  97               | $(GZIP) > $$@
  98         else ifeq ($$($1_TYPE)-$(TAR_SUPPORTS_TRANSFORM)-$$($1_UNZIP_DEBUGINFO)-$$(words $$($1_BASE_DIRS)), \
  99             tar.gz-true-false-1)
 100           # If only one BASE_DIR, but with a SUBDIR set, tar.gz can use the
 101           # transform option to create bundle directly from the BASE_DIR.
 102           $(CD) $$($1_BASE_DIRS) \
 103               && ( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \
 104                   -$(TAR_INCLUDE_PARAM) $$($1_$$($1_BASE_DIRS)_LIST_FILE) \
 105                   $$(if $$($1_SUBDIR), --transform 's|^|$$($1_SUBDIR)/|') \
 106                   $(TAR_IGNORE_EXIT_VALUE) ) \
 107               | $(GZIP) > $$@
 108         else
 109           # In all other cases, need to copy all files into a temporary location
 110           # before creation bundle.
 111           $(RM) -r $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR)
 112           $(MKDIR) -p $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR)
 113           $$(foreach d, $$($1_BASE_DIRS), \
 114             ( $(CD) $$d \
 115             && $(TAR) cf - -$(TAR_INCLUDE_PARAM) $$($1_$$d_LIST_FILE) \
 116                 $(TAR_IGNORE_EXIT_VALUE) ) \
 117             | ( $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) && $(TAR) xf - )$$(NEWLINE) )
 118           # Unzip any zipped debuginfo files
 119           ifeq ($$($1_UNZIP_DEBUGINFO), true)
 120             for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.diz"`; do \
 121               $(CD) $$$${f%/*} && $(UNZIP) -q $$$${f} && $(RM) $$$${f}; \
 122             done
 123           endif
 124           ifeq ($$($1_TYPE), tar.gz)
 125             $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && \
 126             ( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \
 127                 $$(if $$($1_SUBDIR), $$($1_SUBDIR), .) $(TAR_IGNORE_EXIT_VALUE) ) \
 128             | $(GZIP) > $$@
 129           else ifeq ($$($1_TYPE), zip)
 130             $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && $(ZIPEXE) -qr $$@ .
 131           endif
 132         endif












 133 
 134   $1 += $(BUNDLES_OUTPUTDIR)/$$($1_BUNDLE_NAME)
 135 
 136 endef
 137 
 138 ################################################################################
 139 
 140 # On Macosx, we bundle up the macosx specific images which already have the
 141 # correct base directories.
 142 ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release)
 143   JDK_IMAGE_DIR := $(JDK_MACOSX_BUNDLE_DIR)
 144   JRE_IMAGE_DIR := $(JRE_MACOSX_BUNDLE_DIR)
 145   JDK_IMAGE_HOMEDIR := $(JDK_MACOSX_CONTENTS_DIR)/Home
 146   JRE_IMAGE_HOMEDIR := $(JRE_MACOSX_CONTENTS_DIR)/Home
 147   JDK_BUNDLE_SUBDIR :=
 148   JRE_BUNDLE_SUBDIR :=
 149 else
 150   JDK_IMAGE_HOMEDIR := $(JDK_IMAGE_DIR)
 151   JRE_IMAGE_HOMEDIR := $(JRE_IMAGE_DIR)
 152   JDK_BUNDLE_SUBDIR := jdk-$(VERSION_NUMBER)


 216   ifeq ($(OPENJDK_TARGET_OS), macosx)
 217     ifeq ($(ZIP_DEBUGINFO_FILES), false)
 218       JRE_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
 219           $(call containing, .dSYM/, $(patsubst $(JRE_IMAGE_DIR)/%, %, $(ALL_JRE_FILES))))
 220     endif
 221   endif
 222 
 223   JRE_BUNDLE_FILES := $(filter-out \
 224       $(JRE_SYMBOLS_EXCLUDE_PATTERN) \
 225       $(SYMBOLS_EXCLUDE_PATTERN), \
 226       $(ALL_JRE_FILES))
 227   JRE_SYMBOLS_BUNDLE_FILES := $(filter \
 228       $(JRE_SYMBOLS_EXCLUDE_PATTERN) \
 229       $(SYMBOLS_EXCLUDE_PATTERN), \
 230       $(ALL_JRE_FILES))
 231 
 232   $(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
 233       BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
 234       FILES := $(JDK_BUNDLE_FILES), \
 235       SPECIAL_INCLUDES := $(JDK_SPECIAL_INCLUDES), \
 236       BASE_DIRS := $(JDK_IMAGE_DIR), \
 237       SUBDIR := $(JDK_BUNDLE_SUBDIR), \
 238   ))
 239 
 240   PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
 241 
 242   $(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
 243       BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
 244       FILES := $(JRE_BUNDLE_FILES), \
 245       BASE_DIRS := $(JRE_IMAGE_DIR), \
 246       SUBDIR := $(JRE_BUNDLE_SUBDIR), \
 247   ))
 248 
 249   PRODUCT_TARGETS += $(BUILD_JRE_BUNDLE)
 250 
 251   $(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \
 252       BUNDLE_NAME := $(JDK_SYMBOLS_BUNDLE_NAME), \
 253       FILES := $(JDK_SYMBOLS_BUNDLE_FILES), \
 254       BASE_DIRS := $(JDK_IMAGE_DIR) $(wildcard $(SYMBOLS_IMAGE_DIR)), \
 255       SUBDIR := $(JDK_BUNDLE_SUBDIR), \
 256       UNZIP_DEBUGINFO := true, \
 257   ))
 258 
 259   PRODUCT_TARGETS += $(BUILD_JDK_SYMBOLS_BUNDLE)
 260 
 261   $(eval $(call SetupBundleFile, BUILD_JRE_SYMBOLS_BUNDLE, \
 262       BUNDLE_NAME := $(JRE_SYMBOLS_BUNDLE_NAME), \
 263       FILES := $(JRE_SYMBOLS_BUNDLE_FILES), \
 264       BASE_DIRS := $(JRE_IMAGE_DIR), \
 265       SUBDIR := $(JRE_BUNDLE_SUBDIR), \
 266       UNZIP_DEBUGINFO := true, \
 267   ))
 268 
 269   PRODUCT_TARGETS += $(BUILD_JRE_SYMBOLS_BUNDLE)
 270 
 271   $(eval $(call SetupBundleFile, BUILD_DEMOS_BUNDLE, \
 272       BUNDLE_NAME := $(DEMOS_BUNDLE_NAME), \
 273       FILES := $(DEMOS_BUNDLE_FILES), \
 274       BASE_DIRS := $(JDK_IMAGE_DIR), \
 275       SUBDIR := $(JDK_BUNDLE_SUBDIR), \
 276   ))
 277 
 278   PRODUCT_TARGETS += $(BUILD_DEMOS_BUNDLE)
 279 endif
 280 
 281 ################################################################################
 282 
 283 ifneq ($(filter test-bundles, $(MAKECMDGOALS)), )
 284   TEST_BUNDLE_FILES := $(call CacheFind, $(TEST_IMAGE_DIR))
 285 
 286   $(eval $(call SetupBundleFile, BUILD_TEST_BUNDLE, \
 287       BUNDLE_NAME := $(TEST_BUNDLE_NAME), \
 288       FILES := $(TEST_BUNDLE_FILES), \
 289       BASE_DIRS := $(TEST_IMAGE_DIR), \
 290   ))
 291 
 292   TEST_TARGETS += $(BUILD_TEST_BUNDLE)
 293 endif
 294 
 295 ################################################################################
 296 
 297 ifneq ($(filter docs-bundles, $(MAKECMDGOALS)), )
 298   DOCS_BUNDLE_FILES := $(call CacheFind, $(DOCS_IMAGE_DIR))
 299 
 300   $(eval $(call SetupBundleFile, BUILD_DOCS_BUNDLE, \
 301       BUNDLE_NAME := $(DOCS_BUNDLE_NAME), \
 302       FILES := $(DOCS_BUNDLE_FILES), \
 303       BASE_DIRS := $(DOCS_IMAGE_DIR), \
 304       SUBDIR := docs, \
 305   ))
 306 
 307   DOCS_TARGETS += $(BUILD_DOCS_BUNDLE)
 308 endif
 309 
 310 ################################################################################
 311 
 312 # Hook to include the corresponding custom file, if present.
 313 $(eval $(call IncludeCustomExtension, , Bundles.gmk))
 314 
 315 ################################################################################
 316 
 317 product-bundles: $(PRODUCT_TARGETS)
 318 test-bundles: $(TEST_TARGETS)
 319 docs-bundles: $(DOCS_TARGETS)
 320 
 321 .PHONY: all default product-bundles test-bundles docs-bundles
< prev index next >