8080630: Stop doing sed manipulation of manifest files in SetupJavaCompilation

Reviewed-by: erikj
This commit is contained in:
Magnus Ihse Bursie 2015-05-19 10:03:48 +02:00
parent ef28a587f7
commit eeaa0923e4
2 changed files with 15 additions and 6 deletions

View File

@ -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)

View File

@ -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), \