8003482: build-infra: Use correct manifest in security jars
authorerikj
Wed, 28 Nov 2012 14:10:00 +0100
changeset 14527 b2b7e2931859
parent 14526 a9ff17998eb7
child 14528 bc93357f4936
8003482: build-infra: Use correct manifest in security jars Reviewed-by: ohair, ohrstrom
jdk/makefiles/CreateJars.gmk
--- a/jdk/makefiles/CreateJars.gmk	Wed Nov 28 13:49:33 2012 +0100
+++ b/jdk/makefiles/CreateJars.gmk	Wed Nov 28 14:10:00 2012 +0100
@@ -420,6 +420,23 @@
 JARS+=$(IMAGES_OUTPUTDIR)/lib/jsse.jar
 
 ##########################################################################################
+# Create manifest for security jars
+
+#
+# Include these extra attributes for now, should probably take out.
+#
+JCE_MANIFEST := $(IMAGES_OUTPUTDIR)/lib/_the.security.manifest.mf
+$(JCE_MANIFEST): $(MAINMANIFEST)
+	$(MKDIR) -p $(@D)
+	$(RM) $@ $@.tmp
+	$(SED) -e "s#@@RELEASE@@#$(JDK_VERSION)#"       \
+               -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
+               $(MAINMANIFEST) >> $@.tmp
+	$(ECHO) "Extension-Name: javax.crypto" >> $@.tmp
+	$(ECHO) "Implementation-Vendor-Id: com.sun" >> $@.tmp
+	$(MV) $@.tmp $@
+
+##########################################################################################
 
 SUNPKCS11_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunpkcs11.jar
 
@@ -440,8 +457,11 @@
 	SUFFIXES:=.class,\
 	INCLUDES:=sun/security/pkcs11,\
 	JAR:=$(SUNPKCS11_JAR_DST), \
+        MANIFEST:=$(JCE_MANIFEST), \
 	SKIP_METAINF := true))
 
+    $(SUNPKCS11_JAR_DST): $(JCE_MANIFEST)
+
 endif
 
 JARS += $(SUNPKCS11_JAR_DST)
@@ -452,9 +472,9 @@
 
 ifndef OPENJDK
 
-SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar
+    SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar
 
-$(SUNEC_JAR_DST) : $(SUNEC_JAR_SRC)
+    $(SUNEC_JAR_DST) : $(SUNEC_JAR_SRC)
 	@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt SunEC provider..."
 	$(MKDIR) -p $(@D)
 	$(RM) $@
@@ -462,13 +482,16 @@
 
 else
 
-$(eval $(call SetupArchive,BUILD_SUNEC_JAR,,\
+    $(eval $(call SetupArchive,BUILD_SUNEC_JAR,,\
 		SRCS:=$(JDK_OUTPUTDIR)/classes, \
 		SUFFIXES:=.class,\
 		INCLUDES:=sun/security/ec,\
 		JAR:=$(SUNEC_JAR_DST), \
+                MANIFEST:=$(JCE_MANIFEST), \
 		SKIP_METAINF := true))
 
+    $(SUNEC_JAR_DST): $(JCE_MANIFEST)
+
 endif
 
 JARS += $(SUNEC_JAR_DST)
@@ -505,9 +528,11 @@
 		SUFFIXES:=.class,\
 		INCLUDES:= com/sun/crypto/provider,\
 		JAR:=$(SUNJCE_PROVIDER_JAR_DST), \
-		MANIFEST := $(JDK_TOPDIR)/make/tools/manifest.mf, \
-		EXTRA_MANIFEST_ATTR := Extension-Name: javax.crypto\nImplementation-Vendor-Id: com.sun, \
+                MANIFEST:=$(JCE_MANIFEST), \
 		SKIP_METAINF := true))
+
+    $(SUNJCE_PROVIDER_JAR_DST): $(JCE_MANIFEST)
+
 endif
 
 JARS += $(SUNJCE_PROVIDER_JAR_DST)
@@ -516,9 +541,9 @@
 
 ifndef OPENJDK
 
-JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
+    JCE_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
 
-$(JCE_JAR_DST) : $(JCE_JAR_SRC)
+    $(JCE_JAR_DST) : $(JCE_JAR_SRC)
 	@$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt jce.jar..."
 	$(MKDIR) -p $(@D)
 	$(RM) $@
@@ -526,14 +551,16 @@
 
 else
 
-$(eval $(call SetupArchive,BUILD_JCE_JAR,,\
+    $(eval $(call SetupArchive,BUILD_JCE_JAR,,\
 		SRCS:=$(JDK_OUTPUTDIR)/classes, \
 		SUFFIXES:=.class,\
 		INCLUDES:= javax/crypto sun/security/internal,\
 		JAR:=$(JCE_JAR_DST), \
-		MANIFEST := $(JDK_TOPDIR)/make/tools/manifest.mf, \
-		EXTRA_MANIFEST_ATTR := Extension-Name: javax.crypto\nImplementation-Vendor-Id: com.sun, \
+                MANIFEST:=$(JCE_MANIFEST), \
 		SKIP_METAINF := true))
+
+    $(JCE_JAR_DST): $(JCE_MANIFEST)
+
 endif
 
 JARS += $(JCE_JAR_DST)