From eeaa0923e4ff77ae9f6a093ba6413dc191aabc48 Mon Sep 17 00:00:00 2001 From: Magnus Ihse Bursie Date: Tue, 19 May 2015 10:03:48 +0200 Subject: [PATCH] 8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation Reviewed-by: erikj --- make/JrtfsJar.gmk | 14 ++++++++++++-- make/common/JavaCompilation.gmk | 7 +++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/make/JrtfsJar.gmk b/make/JrtfsJar.gmk index 2adf6c9dca5..d4e9bc2731d 100644 --- a/make/JrtfsJar.gmk +++ b/make/JrtfsJar.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -28,10 +28,20 @@ default: all include $(SPEC) include MakeBase.gmk include JavaCompilation.gmk +include TextFileProcessing.gmk + +# 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)/java-main-manifest.mf, \ + REPLACEMENTS := \ + @@RELEASE@@ => $(RELEASE) ; \ + @@COMPANY_NAME@@ => $(COMPANY_NAME) , \ +)) $(eval $(call SetupArchive,JRTFS_JAR, , \ SRCS := $(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes, \ JAR := $(SUPPORT_OUTPUTDIR)/jrt-fs.jar, \ - MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf)) + MANIFEST := $(SUPPORT_OUTPUTDIR)/java-main-manifest.mf)) all: $(JRTFS_JAR) diff --git a/make/common/JavaCompilation.gmk b/make/common/JavaCompilation.gmk index f79f05f21e4..297a3c1b248 100644 --- a/make/common/JavaCompilation.gmk +++ b/make/common/JavaCompilation.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -265,7 +265,7 @@ define SetupArchiveBody endif # Include all variables of significance in the vardeps file - $1_VARDEPS := $(JAR) $$($1_JAR_CREATE_OPTIONS) $$($1_MANIFEST) $(RELEASE) $(COMPANY_NAME) \ + $1_VARDEPS := $(JAR) $$($1_JAR_CREATE_OPTIONS) $$($1_MANIFEST) \ $$($1_JARMAIN) $$($1_EXTRA_MANIFEST_ATTR) $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, $$(dir $$($1_JAR))_the.$$($1_JARNAME).vardeps) @@ -280,8 +280,7 @@ define SetupArchiveBody # potential changes. $$(if $$(filter $$($1_VARDEPS_FILE) $$($1_MANIFEST), $$?), \ $$(if $$($1_MANIFEST), \ - $(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \ - -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $$($1_MANIFEST) > $$($1_MANIFEST_FILE) $$(NEWLINE) \ + $(CP) $$($1_MANIFEST) $$($1_MANIFEST_FILE) $$(NEWLINE) \ , \ $(RM) $$($1_MANIFEST_FILE) && $(TOUCH) $$($1_MANIFEST_FILE) $$(NEWLINE)) \ $$(if $$($1_JARMAIN), \