From 7ba513fe635e2ed823f1cf9a43f66fa5475a3281 Mon Sep 17 00:00:00 2001 From: erikj Date: Mon, 14 Jan 2013 15:30:22 +0100 Subject: [PATCH] 8006100: build-infra: Bundle up the correct images in jprt Reviewed-by: tbell --- NewMakefile.gmk | 6 ++++-- common/makefiles/Jprt.gmk | 12 +++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/NewMakefile.gmk b/NewMakefile.gmk index dcd9287..ce711a8 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 69c7740..78e2096 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 -- GitLab