8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation
authorihse
Tue, 19 May 2015 10:05:02 +0200
changeset 30654 3c2e826aa5ea
parent 30653 6ef1144fd561
child 30655 d83f50188ca9
8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation Reviewed-by: erikj
jdk/make/CompileDemos.gmk
--- a/jdk/make/CompileDemos.gmk	Tue May 19 09:09:09 2015 +0800
+++ b/jdk/make/CompileDemos.gmk	Tue May 19 10:05:02 2015 +0200
@@ -30,6 +30,7 @@
 include JavaCompilation.gmk
 include NativeCompilation.gmk
 include SetupJavaCompilers.gmk
+include TextFileProcessing.gmk
 
 # Prepare the find cache.
 $(eval $(call FillCacheFind, $(JDK_TOPDIR)/src))
@@ -49,6 +50,15 @@
 
 ##################################################################################################
 
+# This rule will be depended on due to the MANIFEST line
+$(eval $(call SetupTextFileProcessing, BUILD_JAVA_MANIFEST, \
+  SOURCE_FILES := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \
+  OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/demo/java-main-manifest.mf, \
+  REPLACEMENTS := \
+      @@RELEASE@@ => $(RELEASE) ; \
+      @@COMPANY_NAME@@ => $(COMPANY_NAME) , \
+))
+
 define SetupAppletDemo
   $$(eval $$(call SetupJavaCompilation,BUILD_DEMO_APPLET_$1, \
       SETUP := GENERATE_USINGJDKBYTECODE, \
@@ -122,7 +132,7 @@
         COPY := $(PATTERNS_TO_COPY) $(10), \
         JAR := $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/$$($1_JARFILE), \
         JARMAIN := $4, \
-        MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \
+        MANIFEST := $(SUPPORT_OUTPUTDIR)/demo/java-main-manifest.mf, \
         EXTRA_MANIFEST_ATTR := $(11), \
         SRCZIP := $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/src.zip, \
         EXCLUDE_FILES := $9, \
@@ -290,7 +300,7 @@
         COPY := $(PATTERNS_TO_COPY), \
         JAR := $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/$1.jar, \
         EXTRA_MANIFEST_ATTR := Main-Class: \n, \
-        MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf))
+        MANIFEST := $(SUPPORT_OUTPUTDIR)/demo/java-main-manifest.mf))
 
     BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/$1.jar
   endif
@@ -382,7 +392,7 @@
       BIN := $(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller, \
       HEADERS := $(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller, \
       JAR := $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/Poller.jar, \
-      MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \
+      MANIFEST := $(SUPPORT_OUTPUTDIR)/demo/java-main-manifest.mf, \
       SRCZIP := $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/src.zip, \
       COPY := README.txt Poller.c, \
       JARMAIN := Client))