< prev index next >

make/Bundles.gmk

Print this page


   1 #
   2 # Copyright (c) 2016, 2019, 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 LEGACY_TARGETS :=
  33 TEST_TARGETS :=
  34 DOCS_TARGETS :=
  35 
  36 # On Windows tar frequently complains that "file changed as we read it" for
  37 # some random source files. This seems to be cause by anti virus scanners and
  38 # is most likely safe to ignore. When it happens, tar returns '1'.
  39 ifeq ($(call isBuildOs, windows), true)
  40   TAR_IGNORE_EXIT_VALUE := || test "$$$$?" = "1"
  41 endif
  42 
  43 # Hook to include the corresponding custom file, if present.
  44 $(eval $(call IncludeCustomExtension, Bundles-pre.gmk))
  45 ################################################################################
  46 # BUNDLE : Name of bundle to create
  47 # FILES : Files in BASE_DIRS to add to bundle
  48 # SPECIAL_INCLUDES : List of directories inside BASE_DIRS to look for additional
  49 #     files in. These files will not get proper dependency handling. Use when
  50 #     files or directories may contain spaces.
  51 # BASE_DIRS : Base directories for the root dir in the bundle.
  52 # SUBDIR : Optional name of root dir in bundle.
  53 SetupBundleFile = $(NamedParamsMacroTemplate)
  54 define SetupBundleFileBody
  55 
  56   $$(foreach d, $$($1_BASE_DIRS), \
  57     $$(eval $1_$$d_RELATIVE_FILES := $$$$(patsubst $$d/%, %, \
  58         $$$$(filter $$d/%, $$$$($1_FILES)))) \
  59     $$(eval $1_$$d_LIST_FILE := \
  60         $(SUPPORT_OUTPUTDIR)/bundles/_$1_$$$$(subst /,_,$$$$(patsubst $(OUTPUTDIR)/%,%,$$d)_files)) \
  61   )
  62 
  63   ifneq ($$(filter %.tar.gz, $$($1_BUNDLE_NAME)), )
  64     $1_TYPE := tar.gz
  65   else ifneq ($$(filter %.zip, $$($1_BUNDLE_NAME)), )
  66     $1_TYPE := zip
  67   else
  68     $$(error Unknown bundle type $$($1_BUNDLE_NAME))
  69   endif
  70 
  71   $$(call SetIfEmpty, $1_UNZIP_DEBUGINFO, false)
  72 
  73   $(BUNDLES_OUTPUTDIR)/$$($1_BUNDLE_NAME): $$($1_FILES)
  74         $$(call MakeTargetDir)
  75         # If any of the files contain a space in the file name, FindFiles
  76         # will have replaced it with ?. Tar does not accept that so need to
  77         # switch it back.
  78         $$(foreach d, $$($1_BASE_DIRS), \
  79           $$(eval $$(call ListPathsSafely, \
  80               $1_$$d_RELATIVE_FILES, $$($1_$$d_LIST_FILE))) \
  81           $$(CAT) $$($1_$$d_LIST_FILE) | $$(TR) '?' ' ' > $$($1_$$d_LIST_FILE).tmp \
  82               && $(MV) $$($1_$$d_LIST_FILE).tmp $$($1_$$d_LIST_FILE) $$(NEWLINE) \
  83         )
  84         ifneq ($$($1_SPECIAL_INCLUDES), )
  85           $$(foreach i, $$($1_SPECIAL_INCLUDES), \
  86             $$(foreach d, $$($1_BASE_DIRS), \
  87               ($(CD) $$d && $(FIND) $$i >> $$($1_$$d_LIST_FILE)) ; ))
  88         endif
  89         ifeq ($$($1_SUBDIR)-$$($1_TYPE)-$$($1_UNZIP_DEBUGINFO), .-zip-false)
  90           # If no subdir is specified, zip can be done directly from BASE_DIRS.
  91           $$(foreach d, $$($1_BASE_DIRS), \
  92             ( $(CD) $$d \
  93             && $(ZIPEXE) -qru $$@ . -i@$$($1_$$d_LIST_FILE) \
  94             || test "$$$$?" = "12" )$$(NEWLINE))
  95         else ifeq ($$($1_SUBDIR)-$$($1_TYPE)-$$($1_UNZIP_DEBUGINFO)-$$(words $$($1_BASE_DIRS)), \


 128             done
 129           endif
 130           ifeq ($$($1_TYPE), tar.gz)
 131             $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && \
 132             ( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \
 133                 $$(if $$($1_SUBDIR), $$($1_SUBDIR), .) $(TAR_IGNORE_EXIT_VALUE) ) \
 134             | $(GZIP) > $$@
 135           else ifeq ($$($1_TYPE), zip)
 136             $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && $(ZIPEXE) -qr $$@ .
 137           endif
 138         endif
 139 
 140   $1 += $(BUNDLES_OUTPUTDIR)/$$($1_BUNDLE_NAME)
 141 
 142 endef
 143 
 144 ################################################################################
 145 
 146 # On Macosx, we bundle up the macosx specific images which already have the
 147 # correct base directories.
 148 ifeq ($(call isTargetOs, macosx)+$(DEBUG_LEVEL), true+release)
 149   JDK_IMAGE_DIR := $(JDK_MACOSX_BUNDLE_DIR)
 150   JRE_IMAGE_DIR := $(JRE_MACOSX_BUNDLE_DIR)
 151   JDK_IMAGE_HOMEDIR := $(JDK_MACOSX_CONTENTS_DIR)/Home
 152   JRE_IMAGE_HOMEDIR := $(JRE_MACOSX_CONTENTS_DIR)/Home
 153   JDK_BUNDLE_SUBDIR :=
 154   JRE_BUNDLE_SUBDIR :=
 155 else
 156   JDK_IMAGE_HOMEDIR := $(JDK_IMAGE_DIR)
 157   JRE_IMAGE_HOMEDIR := $(JRE_IMAGE_DIR)
 158   JDK_BUNDLE_SUBDIR := jdk-$(VERSION_NUMBER)
 159   JRE_BUNDLE_SUBDIR := jre-$(VERSION_NUMBER)
 160   ifneq ($(DEBUG_LEVEL), release)
 161     JDK_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
 162     JRE_BUNDLE_SUBDIR := $(JRE_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
 163   endif
 164 endif
 165 
 166 ################################################################################
 167 
 168 ifneq ($(filter product-bundles legacy-bundles, $(MAKECMDGOALS)), )

 169 
 170   SYMBOLS_EXCLUDE_PATTERN := %.debuginfo %.diz %.pdb %.map
 171 
 172   # There may be files with spaces in the names, so use ShellFindFiles
 173   # explicitly.
 174   ALL_JDK_FILES := $(call ShellFindFiles, $(JDK_IMAGE_DIR))
 175 
 176   # Create special filter rules when dealing with unzipped .dSYM directories on
 177   # macosx
 178   ifeq ($(call isTargetOs, macosx), true)
 179     ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
 180       JDK_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
 181           $(call containing, .dSYM/, $(patsubst $(JDK_IMAGE_DIR)/%, %, $(ALL_JDK_FILES))))
 182     endif
 183   endif
 184 
 185   JDK_BUNDLE_FILES := \
 186       $(filter-out \
 187           $(JDK_SYMBOLS_EXCLUDE_PATTERN) \
 188           $(JDK_EXTRA_EXCLUDES) \
 189           $(SYMBOLS_EXCLUDE_PATTERN) \
 190           $(JDK_IMAGE_HOMEDIR)/demo/% \
 191           , \
 192           $(ALL_JDK_FILES) \
 193       )
 194   JDK_SYMBOLS_BUNDLE_FILES := \
 195       $(filter \
 196           $(JDK_SYMBOLS_EXCLUDE_PATTERN) \
 197           $(SYMBOLS_EXCLUDE_PATTERN) \
 198           , \
 199           $(filter-out \
 200               $(JDK_IMAGE_HOMEDIR)/demo/% \
 201               , \
 202               $(ALL_JDK_FILES) \
 203           ) \
 204       ) \
 205       $(call FindFiles, $(SYMBOLS_IMAGE_DIR))
 206 
 207   TEST_DEMOS_BUNDLE_FILES := $(filter $(JDK_IMAGE_HOMEDIR)/demo/%, $(ALL_JDK_FILES))
 208 
 209   ALL_JRE_FILES := $(call ShellFindFiles, $(JRE_IMAGE_DIR))
 210 
 211   # Create special filter rules when dealing with unzipped .dSYM directories on
 212   # macosx
 213   ifeq ($(OPENJDK_TARGET_OS), macosx)
 214     ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
 215       JRE_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
 216           $(call containing, .dSYM/, $(patsubst $(JRE_IMAGE_DIR)/%, %, $(ALL_JRE_FILES))))
 217     endif
 218   endif
 219 
 220   JRE_BUNDLE_FILES := $(filter-out \
 221       $(JRE_SYMBOLS_EXCLUDE_PATTERN) \
 222       $(SYMBOLS_EXCLUDE_PATTERN), \
 223       $(ALL_JRE_FILES))
 224 
 225   $(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
 226       BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
 227       FILES := $(JDK_BUNDLE_FILES), \
 228       SPECIAL_INCLUDES := $(JDK_SPECIAL_INCLUDES), \
 229       BASE_DIRS := $(JDK_IMAGE_DIR), \
 230       SUBDIR := $(JDK_BUNDLE_SUBDIR), \
 231   ))
 232 
 233   PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
 234 
 235   $(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
 236       BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
 237       FILES := $(JRE_BUNDLE_FILES), \
 238       BASE_DIRS := $(JRE_IMAGE_DIR), \
 239       SUBDIR := $(JRE_BUNDLE_SUBDIR), \
 240   ))
 241 
 242   LEGACY_TARGETS += $(BUILD_JRE_BUNDLE)
 243 
 244   $(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \
 245       BUNDLE_NAME := $(JDK_SYMBOLS_BUNDLE_NAME), \
 246       FILES := $(JDK_SYMBOLS_BUNDLE_FILES), \
 247       BASE_DIRS := $(JDK_IMAGE_DIR) $(wildcard $(SYMBOLS_IMAGE_DIR)), \
 248       SUBDIR := $(JDK_BUNDLE_SUBDIR), \
 249       UNZIP_DEBUGINFO := true, \
 250   ))
 251 
 252   PRODUCT_TARGETS += $(BUILD_JDK_SYMBOLS_BUNDLE)
 253 
 254   # The demo bundle is only created to support client tests. Ideally it should
 255   # be built with the main test bundle, but since the prerequisites match
 256   # better with the product build, it makes more sense to keep it there for now.
 257   $(eval $(call SetupBundleFile, BUILD_TEST_DEMOS_BUNDLE, \
 258       BUNDLE_NAME := $(TEST_DEMOS_BUNDLE_NAME), \
 259       FILES := $(TEST_DEMOS_BUNDLE_FILES), \
 260       BASE_DIRS := $(JDK_IMAGE_DIR), \
 261       SUBDIR := $(JDK_BUNDLE_SUBDIR), \
 262   ))
 263 
 264   PRODUCT_TARGETS += $(BUILD_TEST_DEMOS_BUNDLE)
 265 endif
 266 
 267 ################################################################################
 268 
 269 ifneq ($(filter test-bundles, $(MAKECMDGOALS)), )
 270   TEST_BUNDLE_FILES := $(call FindFiles, $(TEST_IMAGE_DIR))
 271 
 272   $(eval $(call SetupBundleFile, BUILD_TEST_BUNDLE, \
 273       BUNDLE_NAME := $(TEST_BUNDLE_NAME), \
 274       FILES := $(TEST_BUNDLE_FILES), \
 275       BASE_DIRS := $(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 FindFiles, $(DOCS_IMAGE_DIR))
 285 
 286   $(eval $(call SetupBundleFile, BUILD_DOCS_BUNDLE, \
 287       BUNDLE_NAME := $(DOCS_BUNDLE_NAME), \
 288       FILES := $(DOCS_BUNDLE_FILES), \
 289       BASE_DIRS := $(DOCS_IMAGE_DIR), \
 290       SUBDIR := docs, \
 291   ))
 292 
 293   DOCS_TARGETS += $(BUILD_DOCS_BUNDLE)
 294 endif
 295 
 296 ################################################################################
 297 
 298 ifneq ($(filter jcov-bundles, $(MAKECMDGOALS)), )
 299   JCOV_BUNDLE_FILES := $(call FindFiles, $(JCOV_IMAGE_DIR))
 300 
 301   $(eval $(call SetupBundleFile, BUILD_JCOV_BUNDLE, \
 302       BUNDLE_NAME := $(JCOV_BUNDLE_NAME), \
 303       FILES := $(JCOV_BUNDLE_FILES), \
 304       BASE_DIRS := $(JCOV_IMAGE_DIR), \
 305       SUBDIR := $(JDK_BUNDLE_SUBDIR), \
 306   ))
 307 
 308   JCOV_TARGETS += $(BUILD_JCOV_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 legacy-bundles: $(LEGACY_TARGETS)
 320 test-bundles: $(TEST_TARGETS)
 321 docs-bundles: $(DOCS_TARGETS)
 322 jcov-bundles: $(JCOV_TARGETS)
 323 
 324 .PHONY: all default product-bundles test-bundles docs-bundles jcov-bundles
   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
  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
  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)
  73         $$(call MakeTargetDir)
  74         # If any of the files contain a space in the file name, CacheFind
  75         # will have replaced it with ?. Tar does not accept that so need to
  76         # switch it back.
  77         $$(foreach d, $$($1_BASE_DIRS), \
  78           $$(eval $$(call ListPathsSafely, \
  79               $1_$$d_RELATIVE_FILES, $$($1_$$d_LIST_FILE))) \
  80           $$(CAT) $$($1_$$d_LIST_FILE) | $$(TR) '?' ' ' > $$($1_$$d_LIST_FILE).tmp \
  81               && $(MV) $$($1_$$d_LIST_FILE).tmp $$($1_$$d_LIST_FILE) $$(NEWLINE) \
  82         )
  83         ifneq ($$($1_SPECIAL_INCLUDES), )
  84           $$(foreach i, $$($1_SPECIAL_INCLUDES), \
  85             $$(foreach d, $$($1_BASE_DIRS), \
  86               ($(CD) $$d && $(FIND) $$i >> $$($1_$$d_LIST_FILE)) ; ))
  87         endif
  88         ifeq ($$($1_SUBDIR)-$$($1_TYPE)-$$($1_UNZIP_DEBUGINFO), .-zip-false)
  89           # If no subdir is specified, zip can be done directly from BASE_DIRS.
  90           $$(foreach d, $$($1_BASE_DIRS), \
  91             ( $(CD) $$d \
  92             && $(ZIPEXE) -qru $$@ . -i@$$($1_$$d_LIST_FILE) \
  93             || test "$$$$?" = "12" )$$(NEWLINE))
  94         else ifeq ($$($1_SUBDIR)-$$($1_TYPE)-$$($1_UNZIP_DEBUGINFO)-$$(words $$($1_BASE_DIRS)), \


 127             done
 128           endif
 129           ifeq ($$($1_TYPE), tar.gz)
 130             $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && \
 131             ( $(TAR) cf - $(TAR_CREATE_EXTRA_PARAM) \
 132                 $$(if $$($1_SUBDIR), $$($1_SUBDIR), .) $(TAR_IGNORE_EXIT_VALUE) ) \
 133             | $(GZIP) > $$@
 134           else ifeq ($$($1_TYPE), zip)
 135             $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1 && $(ZIPEXE) -qr $$@ .
 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.
 147 ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release)
 148   JDK_IMAGE_DIR := $(JDK_MACOSX_BUNDLE_DIR)

 149   JDK_IMAGE_HOMEDIR := $(JDK_MACOSX_CONTENTS_DIR)/Home

 150   JDK_BUNDLE_SUBDIR :=

 151 else
 152   JDK_IMAGE_HOMEDIR := $(JDK_IMAGE_DIR)

 153   JDK_BUNDLE_SUBDIR := jdk-$(VERSION_NUMBER)

 154   ifneq ($(DEBUG_LEVEL), release)
 155     JDK_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)

 156   endif
 157 endif
 158 
 159 ################################################################################
 160 
 161 ifneq ($(filter product-bundles, $(MAKECMDGOALS)), )
 162   $(eval $(call FillCacheFind, $(IMAGES_OUTPUTDIR)))
 163 
 164   SYMBOLS_EXCLUDE_PATTERN := %.debuginfo %.diz %.pdb %.map
 165 
 166   ALL_JDK_FILES := $(call CacheFind, $(JDK_IMAGE_DIR))


 167 
 168   # Create special filter rules when dealing with unzipped .dSYM directories on
 169   # macosx
 170   ifeq ($(OPENJDK_TARGET_OS), macosx)
 171     ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
 172       JDK_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
 173           $(call containing, .dSYM/, $(patsubst $(JDK_IMAGE_DIR)/%, %, $(ALL_JDK_FILES))))
 174     endif
 175   endif
 176 
 177   JDK_BUNDLE_FILES := \
 178       $(filter-out \
 179           $(JDK_SYMBOLS_EXCLUDE_PATTERN) \
 180           $(JDK_EXTRA_EXCLUDES) \
 181           $(SYMBOLS_EXCLUDE_PATTERN) \
 182           $(JDK_IMAGE_HOMEDIR)/demo/% \
 183           , \
 184           $(ALL_JDK_FILES) \
 185       )
 186   JDK_SYMBOLS_BUNDLE_FILES := \
 187       $(filter \
 188           $(JDK_SYMBOLS_EXCLUDE_PATTERN) \
 189           $(SYMBOLS_EXCLUDE_PATTERN) \
 190           , \
 191           $(filter-out \
 192               $(JDK_IMAGE_HOMEDIR)/demo/% \
 193               , \
 194               $(ALL_JDK_FILES) \
 195           ) \
 196       ) \
 197       $(call CacheFind, $(SYMBOLS_IMAGE_DIR))
 198 
 199   TEST_DEMOS_BUNDLE_FILES := $(filter $(JDK_IMAGE_HOMEDIR)/demo/%, $(ALL_JDK_FILES))
 200 
















 201   $(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
 202       BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
 203       FILES := $(JDK_BUNDLE_FILES), \
 204       SPECIAL_INCLUDES := $(JDK_SPECIAL_INCLUDES), \
 205       BASE_DIRS := $(JDK_IMAGE_DIR), \
 206       SUBDIR := $(JDK_BUNDLE_SUBDIR), \
 207   ))
 208 
 209   PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
 210 









 211   $(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \
 212       BUNDLE_NAME := $(JDK_SYMBOLS_BUNDLE_NAME), \
 213       FILES := $(JDK_SYMBOLS_BUNDLE_FILES), \
 214       BASE_DIRS := $(JDK_IMAGE_DIR) $(wildcard $(SYMBOLS_IMAGE_DIR)), \
 215       SUBDIR := $(JDK_BUNDLE_SUBDIR), \
 216       UNZIP_DEBUGINFO := true, \
 217   ))
 218 
 219   PRODUCT_TARGETS += $(BUILD_JDK_SYMBOLS_BUNDLE)
 220 
 221   # The demo bundle is only created to support client tests. Ideally it should
 222   # be built with the main test bundle, but since the prerequisites match
 223   # better with the product build, it makes more sense to keep it there for now.
 224   $(eval $(call SetupBundleFile, BUILD_TEST_DEMOS_BUNDLE, \
 225       BUNDLE_NAME := $(TEST_DEMOS_BUNDLE_NAME), \
 226       FILES := $(TEST_DEMOS_BUNDLE_FILES), \
 227       BASE_DIRS := $(JDK_IMAGE_DIR), \
 228       SUBDIR := $(JDK_BUNDLE_SUBDIR), \
 229   ))
 230 
 231   PRODUCT_TARGETS += $(BUILD_TEST_DEMOS_BUNDLE)
 232 endif
 233 
 234 ################################################################################
 235 
 236 ifneq ($(filter test-bundles, $(MAKECMDGOALS)), )
 237   TEST_BUNDLE_FILES := $(call CacheFind, $(TEST_IMAGE_DIR))
 238 
 239   $(eval $(call SetupBundleFile, BUILD_TEST_BUNDLE, \
 240       BUNDLE_NAME := $(TEST_BUNDLE_NAME), \
 241       FILES := $(TEST_BUNDLE_FILES), \
 242       BASE_DIRS := $(TEST_IMAGE_DIR), \
 243   ))
 244 
 245   TEST_TARGETS += $(BUILD_TEST_BUNDLE)
 246 endif
 247 
 248 ################################################################################
 249 
 250 ifneq ($(filter docs-bundles, $(MAKECMDGOALS)), )
 251   DOCS_BUNDLE_FILES := $(call CacheFind, $(DOCS_IMAGE_DIR))
 252 
 253   $(eval $(call SetupBundleFile, BUILD_DOCS_BUNDLE, \
 254       BUNDLE_NAME := $(DOCS_BUNDLE_NAME), \
 255       FILES := $(DOCS_BUNDLE_FILES), \
 256       BASE_DIRS := $(DOCS_IMAGE_DIR), \
 257       SUBDIR := docs, \
 258   ))
 259 
 260   DOCS_TARGETS += $(BUILD_DOCS_BUNDLE)
 261 endif
 262 
 263 ################################################################################
 264 















 265 # Hook to include the corresponding custom file, if present.
 266 $(eval $(call IncludeCustomExtension, Bundles.gmk))
 267 
 268 ################################################################################
 269 
 270 product-bundles: $(PRODUCT_TARGETS)

 271 test-bundles: $(TEST_TARGETS)
 272 docs-bundles: $(DOCS_TARGETS)

 273 
 274 .PHONY: all default product-bundles test-bundles docs-bundles
< prev index next >