diff --git a/NewMakefile.gmk b/NewMakefile.gmk index dcd928718df9a27a9054089ea47bb5f8be35da4d..ce711a80b74dea5e805052fa7de18893254f988f 100644 --- a/NewMakefile.gmk +++ b/NewMakefile.gmk @@ -50,8 +50,6 @@ else endif root_dir:=$(dir $(makefile_path)) -include $(root_dir)/common/makefiles/Jprt.gmk - # ... and then we can include our helper functions include $(root_dir)/common/makefiles/MakeHelpers.gmk @@ -80,6 +78,10 @@ $(all_phony_targets): endif endif +# Include this after a potential spec file has been included so that the bundles target +# has access to the spec variables. +include $(root_dir)/common/makefiles/Jprt.gmk + # Here are "global" targets, i.e. targets that can be executed without specifying a single configuration. # If you addd more global targets, please update the variable global_targets in MakeHelpers. diff --git a/common/makefiles/Jprt.gmk b/common/makefiles/Jprt.gmk index 69c7740bd15e1622107a76309d9980831cec6c47..78e2096e5df81fb1af24760eb76edae42d6d69da 100644 --- a/common/makefiles/Jprt.gmk +++ b/common/makefiles/Jprt.gmk @@ -26,7 +26,8 @@ # This file is included by the root NewerMakefile and contains targets # and utilities needed by JPRT. -# Utilities used in this Makefile +# Utilities used in this Makefile. Most of this makefile executes without +# the context of a spec file from configure. CAT=cat CMP=cmp CP=cp @@ -177,8 +178,13 @@ $(JPRT_ARCHIVE_BUNDLE): bundles bundles: all @$(call TargetEnter) $(MKDIR) -p $(BUILD_OUTPUT)/bundles - $(CD) $(IMAGES_OUTPUTDIR)/j2sdk-image && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/j2sdk-image.zip . - $(CD) $(IMAGES_OUTPUTDIR)/j2re-image && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/j2re-image.zip . +ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_BITS),solaris-64) + $(CD) $(JDK_OVERLAY_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/j2sdk-image.zip . + $(CD) $(JRE_OVERLAY_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/j2re-image.zip . +else + $(CD) $(JDK_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/j2sdk-image.zip . + $(CD) $(JRE_IMAGE_DIR) && $(ZIP) -q -r $(BUILD_OUTPUT)/bundles/j2re-image.zip . +endif @$(call TargetExit) # Keep track of phony targets