changeset 11980:12931f7ace25

8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation Reviewed-by: erikj
author ihse
date Tue, 19 May 2015 10:05:02 +0200
parents c9ffd40e80b9
children a5f2abfa5a15
files make/CompileDemos.gmk
diffstat 1 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/make/CompileDemos.gmk	Tue May 19 09:09:09 2015 +0800
+++ b/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))