changeset 1293:3613a502b149

Cleaned up create-info-file macro
author erikj
date Fri, 14 Nov 2014 15:49:58 +0100
parents 1040c124008e
children 14f1a5e532d4
files make/Images.gmk make/Main.gmk
diffstat 2 files changed, 11 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/make/Images.gmk	Fri Nov 14 15:24:33 2014 +0100
+++ b/make/Images.gmk	Fri Nov 14 15:49:58 2014 +0100
@@ -367,7 +367,9 @@
 	$(PRINTF) '%s="%s"\n' $1 $2 >> $@
 endef
 
+# Param 1 - The file containing the MODULES list
 define create-info-file
+	$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $(@D)
 	$(RM) $@
 	$(call info-file-item, "JAVA_VERSION", "$(JDK_VERSION)")
@@ -377,6 +379,7 @@
 	$(if $(JDK_ARCH_ABI_PROP_NAME), \
 	  $(call info-file-item, "SUN_ARCH_ABI", "$(JDK_ARCH_ABI_PROP_NAME)"))
 	$(call info-file-item, "SOURCE", "$(ALL_SOURCE_TIPS)")
+	$(call info-file-item, "MODULES", "`$(CAT) $1`")
 endef
 
 ALL_SOURCE_TIPS = $(shell \
@@ -385,31 +388,21 @@
     fi)
 
 $(JRE_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, "MODULES", "`$(CAT) $(JRE_SORTED_MODULES)`")
+	$(call create-info-file, $(JRE_SORTED_MODULES))
 
 $(JDK_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, "MODULES", "`$(CAT) $(JDK_SORTED_MODULES)`")
+	$(call create-info-file, $(JDK_SORTED_MODULES))
 
 $(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, "MODULES", "`$(CAT) $(JRE_COMPACT1_SORTED_MODULES)`")
+	$(call create-info-file, $(JRE_COMPACT1_SORTED_MODULES))
 	$(call info-file-item, "JAVA_PROFILE", "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, "MODULES", "`$(CAT) $(JRE_COMPACT2_SORTED_MODULES)`")
+	$(call create-info-file, $(JRE_COMPACT2_SORTED_MODULES))
 	$(call info-file-item, "JAVA_PROFILE", "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, "MODULES", "`$(CAT) $(JRE_COMPACT3_SORTED_MODULES)`")
+	$(call create-info-file, $(JRE_COMPACT3_SORTED_MODULES))
 	$(call info-file-item, "JAVA_PROFILE", "compact3")
 
 JRE_TARGETS += $(JRE_INFO_FILE)
@@ -476,7 +469,7 @@
 $(JRE_TARGETS): $(TOOL_JRE_TARGETS)
 $(JDK_TARGETS): $(TOOL_JDK_TARGETS)
 
-images: $(TOOL_JRE_TARGETS) $(TOOL_JDK_TARGETS) $(JRE_TARGETS) $(JDK_TARGETS)
+jimages: $(TOOL_JRE_TARGETS) $(TOOL_JDK_TARGETS) $(JRE_TARGETS) $(JDK_TARGETS)
 
 
 $(JRE_COMPACT1_TARGETS): $(TOOL_JRE_COMPACT1_TARGETS)
@@ -490,7 +483,7 @@
     $(JRE_COMPACT2_TARGETS) \
     $(JRE_COMPACT3_TARGETS)
 
-.PHONY: default all images profiles
+.PHONY: default all jimages profiles
 
 # Hook to include the corresponding custom file, if present.
 $(eval $(call IncludeCustomExtension, , Images-post.gmk))
--- a/make/Main.gmk	Fri Nov 14 15:24:33 2014 +0100
+++ b/make/Main.gmk	Fri Nov 14 15:49:58 2014 +0100
@@ -230,7 +230,7 @@
 	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f JrtfsJar.gmk)
 
 jimages:
-	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk images)
+	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk jimages)
 
 profiles:
 	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk profiles)