changeset 1198:e4198a8029d1

Compact profiles using jimages
author erikj
date Tue, 23 Sep 2014 12:40:52 +0200
parents 3d7b88817c42
children 4f388cda1cf2
files make/Images.gmk make/Main.gmk
diffstat 2 files changed, 72 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/make/Images.gmk	Tue Sep 23 11:05:40 2014 +0200
+++ b/make/Images.gmk	Tue Sep 23 12:40:52 2014 +0200
@@ -103,8 +103,36 @@
 	    $(MODULES_XML)
 	$(TOUCH) $@
 
+JRE_COMPACT1_IMAGE_DIR := $(JRE_IMAGE_DIR)-compact1
+JRE_COMPACT2_IMAGE_DIR := $(JRE_IMAGE_DIR)-compact2
+JRE_COMPACT3_IMAGE_DIR := $(JRE_IMAGE_DIR)-compact3
+
+$(IMAGES_OUTPUTDIR)/_jre-compact1-jimages-create.marker: $(DEPENDENCIES)
+	$(ECHO) Creating jre compact1 jimage
+	$(RM) -r $(JRE_COMPACT1_IMAGE_DIR)
+	$(JIMAGE_TOOL) --mods java.compact1 --output $(JRE_COMPACT1_IMAGE_DIR) \
+	    $(MODULES_XML)
+	$(TOUCH) $@
+
+$(IMAGES_OUTPUTDIR)/_jre-compact2-jimages-create.marker: $(DEPENDENCIES)
+	$(ECHO) Creating jre compact2 jimage
+	$(RM) -r $(JRE_IMAGE_DIR)-compact2
+	$(JIMAGE_TOOL) --mods java.compact2 --output $(JRE_COMPACT2_IMAGE_DIR) \
+	    $(MODULES_XML)
+	$(TOUCH) $@
+
+$(IMAGES_OUTPUTDIR)/_jre-compact3-jimages-create.marker: $(DEPENDENCIES)
+	$(ECHO) Creating jre compact3 jimage
+	$(RM) -r $(JRE_IMAGE_DIR)-compact3
+	$(JIMAGE_TOOL) --mods jdk.compact3 --output $(JRE_COMPACT3_IMAGE_DIR) \
+	    $(MODULES_XML)
+	$(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
 
 ################################################################################
 # /man dir
@@ -305,6 +333,9 @@
 
 JRE_INFO_FILE := $(JRE_IMAGE_DIR)/release
 JDK_INFO_FILE := $(JDK_IMAGE_DIR)/release
+JRE_COMPACT1_INFO_FILE := $(JRE_COMPACT1_IMAGE_DIR)/release
+JRE_COMPACT2_INFO_FILE := $(JRE_COMPACT2_IMAGE_DIR)/release
+JRE_COMPACT3_INFO_FILE := $(JRE_COMPACT3_IMAGE_DIR)/release
 
 # Common way to emit a line into the release or info file
 define info-file-item # name value
@@ -336,8 +367,26 @@
 	$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(call create-info-file)
 
+$(JRE_COMPACT1_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips
+	$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(call create-info-file)
+	$(call info-file-item, "JAVA_COMPACT", "compact1")
+
+$(JRE_COMPACT2_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips
+	$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(call create-info-file)
+	$(call info-file-item, "JAVA_COMPACT", "compact2")
+
+$(JRE_COMPACT3_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips
+	$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
+	$(call create-info-file)
+	$(call info-file-item, "JAVA_COMPACT", "compact3")
+
 JRE_TARGETS += $(JRE_INFO_FILE)
 JDK_TARGETS += $(JDK_INFO_FILE)
+JRE_COMPACT1_TARGETS += $(JRE_COMPACT1_INFO_FILE)
+JRE_COMPACT2_TARGETS += $(JRE_COMPACT2_INFO_FILE)
+JRE_COMPACT3_TARGETS += $(JRE_COMPACT3_INFO_FILE)
 
 ################################################################################
 # src.zip
@@ -382,9 +431,21 @@
 $(JRE_TARGETS): $(TOOL_JRE_TARGETS)
 $(JDK_TARGETS): $(TOOL_JDK_TARGETS)
 
-all: $(TOOL_JRE_TARGETS) $(TOOL_JDK_TARGETS) $(JRE_TARGETS) $(JDK_TARGETS)
+images: $(TOOL_JRE_TARGETS) $(TOOL_JDK_TARGETS) $(JRE_TARGETS) $(JDK_TARGETS)
 
-.PHONY: default all
+
+$(JRE_COMPACT1_TARGETS): $(TOOL_JRE_COMPACT1_TARGETS)
+$(JRE_COMPACT2_TARGETS): $(TOOL_JRE_COMPACT2_TARGETS)
+$(JRE_COMPACT3_TARGETS): $(TOOL_JRE_COMPACT3_TARGETS)
+
+profiles: $(TOOL_JRE_COMPACT1_TARGETS) \
+    $(TOOL_JRE_COMPACT2_TARGETS) \
+    $(TOOL_JRE_COMPACT3_TARGETS) \
+    $(JRE_COMPACT1_TARGETS) \
+    $(JRE_COMPACT2_TARGETS) \
+    $(JRE_COMPACT3_TARGETS)
+
+.PHONY: default all images profiles
 
 # Hook to include the corresponding custom file, if present.
 $(eval $(call IncludeCustomExtension, , Images-post.gmk))
--- a/make/Main.gmk	Tue Sep 23 11:05:40 2014 +0200
+++ b/make/Main.gmk	Tue Sep 23 12:40:52 2014 +0200
@@ -266,14 +266,17 @@
 	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f StripBinaries.gmk)
 
 jimages:
-	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk)
+	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk images)
+
+profiles:
+	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk profiles)
 
 mac-bundles:
 	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f MacBundles.gmk)
 
 ALL_TARGETS += source-tips security-jars nashorn-jar main-jars legacy-images \
     $(PROFILE_JARS_TARGETS) $(PROFILE_IMAGES_TARGETS) profiles-oscheck \
-    bootcycle-images zip-src strip-binaries jimages mac-bundles
+    bootcycle-images zip-src strip-binaries jimages profiles mac-bundles
 
 ################################################################################
 # Docs targets
@@ -419,6 +422,8 @@
 
   jimages: exploded-image zip-src strip-binaries source-tips demos samples
 
+  profiles: exploded-image strip-binaries source-tips
+
   mac-bundles: jimages
 
   bootcycle-images: legacy-images
@@ -503,14 +508,14 @@
 # Make each profile name a target that depends on it's images target.
 $(foreach p, $(ALL_PROFILES), $(eval $(p): $(p)-images $(p)-jars))
 
-profiles: $(ALL_PROFILES)
+legacy-profiles: $(ALL_PROFILES)
 
 docs: docs-javadoc docs-jvmtidoc
 
 ALL_TARGETS += buildtools gensrc gendata copy java rmic libs launchers \
     jdk.jdwp.agent-gensrc \
     $(ALL_MODULE_TARGETS) exploded-image jdk jars images \
-    $(ALL_PROFILES) profiles docs
+    $(ALL_PROFILES) legacy-profiles docs
 
 ################################################################################