8232572: Add hooks for custom output dir in Bundles.gmk
authorerikj
Mon, 21 Oct 2019 09:26:14 -0700
changeset 58720 ae0af9fb3dbb
parent 58713 ad69fd32778e
child 58722 cba8afa5cfed
8232572: Add hooks for custom output dir in Bundles.gmk Reviewed-by: tbell
make/Bundles.gmk
--- a/make/Bundles.gmk	Mon Oct 21 15:38:26 2019 +0200
+++ b/make/Bundles.gmk	Mon Oct 21 09:26:14 2019 -0700
@@ -50,6 +50,7 @@
 #     files or directories may contain spaces.
 # BASE_DIRS : Base directories for the root dir in the bundle.
 # SUBDIR : Optional name of root dir in bundle.
+# OUTPUTDIR : Optionally override output dir
 SetupBundleFile = $(NamedParamsMacroTemplate)
 define SetupBundleFileBody
 
@@ -70,8 +71,11 @@
 
   $$(call SetIfEmpty, $1_UNZIP_DEBUGINFO, false)
 
-  $(BUNDLES_OUTPUTDIR)/$$($1_BUNDLE_NAME): $$($1_FILES)
+  $$(call SetIfEmpty, $1_OUTPUTDIR, $$(BUNDLES_OUTPUTDIR))
+
+  $$($1_OUTPUTDIR)/$$($1_BUNDLE_NAME): $$($1_FILES)
 	$$(call MakeTargetDir)
+	$$(call LogWarn, Creating $$($1_BUNDLE_NAME))
         # If any of the files contain a space in the file name, FindFiles
         # will have replaced it with ?. Tar does not accept that so need to
         # switch it back.
@@ -137,7 +141,7 @@
           endif
         endif
 
-  $1 += $(BUNDLES_OUTPUTDIR)/$$($1_BUNDLE_NAME)
+  $1 += $$($1_OUTPUTDIR)/$$($1_BUNDLE_NAME)
 
 endef
 
@@ -165,7 +169,7 @@
 
 ################################################################################
 
-ifneq ($(filter product-bundles legacy-bundles, $(MAKECMDGOALS)), )
+ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
 
   SYMBOLS_EXCLUDE_PATTERN := %.debuginfo %.diz %.pdb %.map