changeset 1292:1040c124008e

Moved non image files out of images outputdir
author erikj
date Fri, 14 Nov 2014 15:24:33 +0100
parents e347139b6cc3
children 3613a502b149
files make/Images.gmk make/JrtfsJar.gmk
diffstat 2 files changed, 32 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/make/Images.gmk	Fri Nov 14 12:32:35 2014 +0100
+++ b/make/Images.gmk	Fri Nov 14 15:24:33 2014 +0100
@@ -33,7 +33,7 @@
 JRE_TARGETS :=
 
 # Hook to include the corresponding custom file, if present.
-$(eval $(call IncludeCustomExtension, , Images.gmk))
+$(eval $(call IncludeCustomExtension, , Images-pre.gmk))
 
 ############################################################################
 
@@ -75,11 +75,11 @@
 
 ################################################################################
 
-JRE_SORTED_MODULES := $(IMAGES_OUTPUTDIR)/jre-sorted-modules
-JDK_SORTED_MODULES := $(IMAGES_OUTPUTDIR)/jdk-sorted-modules
-JRE_COMPACT1_SORTED_MODULES := $(IMAGES_OUTPUTDIR)/compact1-sorted-modules
-JRE_COMPACT2_SORTED_MODULES := $(IMAGES_OUTPUTDIR)/compact2-sorted-modules
-JRE_COMPACT3_SORTED_MODULES := $(IMAGES_OUTPUTDIR)/compact3-sorted-modules
+JRE_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/jre-sorted-modules
+JDK_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/jdk-sorted-modules
+JRE_COMPACT1_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/compact1-sorted-modules
+JRE_COMPACT2_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/compact2-sorted-modules
+JRE_COMPACT3_SORTED_MODULES := $(SUPPORT_OUTPUTDIR)/compact3-sorted-modules
 
 
 MODULES_CMDS := $(SUPPORT_OUTPUTDIR)/modules_cmds-stripped
@@ -104,14 +104,17 @@
     $(MODULES_XML)
     #
 
-$(IMAGES_OUTPUTDIR)/_jdk-jimages-create.marker: $(DEPENDENCIES)
+# Use this file inside the image as target for make rule
+JIMAGE_TARGET_FILE := bin/java$(EXE_SUFFIX)
+
+$(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES)
 	$(ECHO) Creating jdk jimage
 	$(RM) -r $(JDK_IMAGE_DIR) $(JDK_SORTED_MODULES)
 	$(JIMAGE_TOOL) --mods $(JDK_MODULES_LIST) --output $(JDK_IMAGE_DIR) \
 	    $(MODULES_XML) >> $(JDK_SORTED_MODULES)
 	$(TOUCH) $@
 
-$(IMAGES_OUTPUTDIR)/_jre-jimages-create.marker: $(DEPENDENCIES)
+$(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES)
 	$(ECHO) Creating jre jimage
 	$(RM) -r $(JRE_IMAGE_DIR) $(JRE_SORTED_MODULES)
 	$(JIMAGE_TOOL) --mods $(JRE_MODULES_LIST) --output $(JRE_IMAGE_DIR) \
@@ -124,7 +127,7 @@
 
 COMPACT_EXTRA_MODULES := jdk.localedata jdk.crypto.pkcs11 jdk.crypto.ec
 
-$(IMAGES_OUTPUTDIR)/_jre-compact1-jimages-create.marker: $(DEPENDENCIES)
+$(JRE_COMPACT1_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES)
 	$(ECHO) Creating jre compact1 jimage
 	$(RM) -r $(JRE_COMPACT1_IMAGE_DIR) $(JRE_COMPACT1_SORTED_MODULES)
 	$(JIMAGE_TOOL) \
@@ -133,29 +136,29 @@
 	    $(MODULES_XML) >> $(JRE_COMPACT1_SORTED_MODULES)
 	$(TOUCH) $@
 
-$(IMAGES_OUTPUTDIR)/_jre-compact2-jimages-create.marker: $(DEPENDENCIES)
+$(JRE_COMPACT2_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES)
 	$(ECHO) Creating jre compact2 jimage
-	$(RM) -r $(JRE_IMAGE_DIR)-compact2 $(JRE_COMPACT2_SORTED_MODULES)
+	$(RM) -r $(JRE_COMPACT2_IMAGE_DIR) $(JRE_COMPACT2_SORTED_MODULES)
 	$(JIMAGE_TOOL) \
 	    --mods $(call SubstComma, java.compact2 $(COMPACT_EXTRA_MODULES)) \
 	    --output $(JRE_COMPACT2_IMAGE_DIR) \
 	    $(MODULES_XML) >> $(JRE_COMPACT2_SORTED_MODULES)
 	$(TOUCH) $@
 
-$(IMAGES_OUTPUTDIR)/_jre-compact3-jimages-create.marker: $(DEPENDENCIES)
+$(JRE_COMPACT3_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(DEPENDENCIES)
 	$(ECHO) Creating jre compact3 jimage
-	$(RM) -r $(JRE_IMAGE_DIR)-compact3 $(JRE_COMPACT3_SORTED_MODULES)
+	$(RM) -r $(JRE_COMPACT3_IMAGE_DIR) $(JRE_COMPACT3_SORTED_MODULES)
 	$(JIMAGE_TOOL) \
 	    --mods $(call SubstComma, $(JDK_COMPACT3_MODULES) $(COMPACT_EXTRA_MODULES)) \
 	    --output $(JRE_COMPACT3_IMAGE_DIR) \
 	    $(MODULES_XML) >> $(JRE_COMPACT3_SORTED_MODULES)
 	$(TOUCH) $@
 
-TOOL_JRE_TARGETS := $(IMAGES_OUTPUTDIR)/_jre-jimages-create.marker
-TOOL_JDK_TARGETS := $(IMAGES_OUTPUTDIR)/_jdk-jimages-create.marker
-TOOL_JRE_COMPACT1_TARGETS := $(IMAGES_OUTPUTDIR)/_jre-compact1-jimages-create.marker
-TOOL_JRE_COMPACT2_TARGETS := $(IMAGES_OUTPUTDIR)/_jre-compact2-jimages-create.marker
-TOOL_JRE_COMPACT3_TARGETS := $(IMAGES_OUTPUTDIR)/_jre-compact3-jimages-create.marker
+TOOL_JRE_TARGETS := $(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
+TOOL_JDK_TARGETS := $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
+TOOL_JRE_COMPACT1_TARGETS := $(JRE_COMPACT1_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
+TOOL_JRE_COMPACT2_TARGETS := $(JRE_COMPACT2_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
+TOOL_JRE_COMPACT3_TARGETS := $(JRE_COMPACT3_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
 
 ################################################################################
 # /man dir
@@ -431,7 +434,7 @@
 # directories will always trigger the rule for recompile since
 # _the.list_of_packages files are touched.
 ifneq ($(findstring images, $(MAKECMDGOALS)), )
-  $(JDK_IMAGE_DIR)/demo/%: $(IMAGES_OUTPUTDIR)/demo/%
+  $(JDK_IMAGE_DIR)/demo/%: $(SUPPORT_OUTPUTDIR)/demo/image/%
 	if [ ! -d "$@" ]; then \
 	  $(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'; \
 	  $(MKDIR) -p $(@D); \
@@ -439,9 +442,10 @@
 	fi
 
   # Find all files including directories
-  JDK_DEMO_TARGETS := $(if $(wildcard $(IMAGES_OUTPUTDIR)/demo), \
-      $(patsubst $(IMAGES_OUTPUTDIR)/demo/%, $(JDK_IMAGE_DIR)/demo/%, \
-      $(shell $(FIND) $(IMAGES_OUTPUTDIR)/demo ! \( -name "_the*" -o -name "javac_state" \) )))
+  JDK_DEMO_TARGETS := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/demo/image), \
+      $(patsubst $(SUPPORT_OUTPUTDIR)/demo/image/%, $(JDK_IMAGE_DIR)/demo/%, \
+      $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/demo/image \
+          ! \( -name "_the*" -o -name "javac_state" \) )))
 
   JDK_TARGETS += $(JDK_DEMO_TARGETS)
 endif
@@ -450,10 +454,10 @@
 # /sample dir
 
 $(eval $(call SetupCopyFiles,COPY_SAMPLES, \
-    SRC := $(IMAGES_OUTPUTDIR)/sample, \
+    SRC := $(SUPPORT_OUTPUTDIR)/sample, \
     DEST := $(JDK_IMAGE_DIR)/sample, \
-    FILES := $(if $(wildcard $(IMAGES_OUTPUTDIR)/sample), \
-        $(call CacheFind,$(IMAGES_OUTPUTDIR)/sample))))
+    FILES := $(if $(wildcard $(SUPPORT_OUTPUTDIR)/sample), \
+        $(call CacheFind,$(SUPPORT_OUTPUTDIR)/sample))))
 
 JDK_TARGETS += $(COPY_SAMPLES)
 
@@ -461,9 +465,9 @@
 # jrt-fs.jar
 
 $(eval $(call SetupCopyFiles,COPY_JRTFS_JAR, \
-    SRC := $(IMAGES_OUTPUTDIR), \
+    SRC := $(SUPPORT_OUTPUTDIR), \
     DEST := $(JDK_IMAGE_DIR), \
-    FILES := $(IMAGES_OUTPUTDIR)/jrt-fs.jar))
+    FILES := $(SUPPORT_OUTPUTDIR)/jrt-fs.jar))
 
 JDK_TARGETS += $(COPY_JRTFS_JAR)
 
--- a/make/JrtfsJar.gmk	Fri Nov 14 12:32:35 2014 +0100
+++ b/make/JrtfsJar.gmk	Fri Nov 14 15:24:33 2014 +0100
@@ -31,7 +31,7 @@
 
 $(eval $(call SetupArchive,JRTFS_JAR, , \
     SRCS := $(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes, \
-    JAR := $(IMAGES_OUTPUTDIR)/jrt-fs.jar, \
+    JAR := $(SUPPORT_OUTPUTDIR)/jrt-fs.jar, \
     MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf))
 
 all: $(JRTFS_JAR)