8007094: Apply version to nashorn.jar manifest
authorjlaskey
Tue, 29 Jan 2013 14:25:39 -0400
changeset 16200 1c54dc374fe4
parent 16199 3722d034c582
child 16201 889ddb179cdf
8007094: Apply version to nashorn.jar manifest Reviewed-by: sundar Contributed-by: james.laskey@oracle.com
nashorn/makefiles/BuildNashorn.gmk
--- a/nashorn/makefiles/BuildNashorn.gmk	Tue Jan 29 19:57:25 2013 +0530
+++ b/nashorn/makefiles/BuildNashorn.gmk	Tue Jan 29 14:25:39 2013 -0400
@@ -39,7 +39,14 @@
 DYNALINK_JAR := $(NASHORN_TOPDIR)/build/dynalink/dynalink.jar
 
 NASHORN_JAR := $(NASHORN_DIST)/nashorn.jar
-NASHORN_VERSION := 0.1
+NASHORN_VERSION := $(JDK_VERSION)
+NASHORN_FULL_VERSION := $(FULL_VERSION)
+
+ifdef MILESTONE
+  ifeq ($(MILESTONE),internal)
+    NASHORN_VERSION = $(FULL_VERSION)
+  endif
+endif
 
 # Need to use source and target 7 for nasgen to work.
 $(eval $(call SetupJavaCompiler,COMPILER_SETUP,\
@@ -97,12 +104,12 @@
 $(VERSION_FILE): $(NASHORN_TOPDIR)/src/jdk/nashorn/internal/runtime/resources/version.properties-template
 	$(ECHO) Creating version.properties
 	$(MKDIR) -p $(@D)
-	$(CAT) $< | $(SED) -e 's/$$(FULL_VERSION)/$(NASHORN_VERSION)/g' \
+	$(CAT) $< | $(SED) -e 's/$$(FULL_VERSION)/$(NASHORN_FULL_VERSION)/g' \
 		-e 's/$$(RELEASE)/$(NASHORN_VERSION)/g' \
 		-e '/^#.*$$/d' -e '/^$$/d'  > $@
 
 
-MANIFEST_ATTRIBUTES:=Name: jdk/nashorn/\nImplementation-Title: Oracle Nashorn\nImplementation-Version: $(NASHORN_VERSION)
+MANIFEST_ATTRIBUTES:=Name: jdk/nashorn/\nImplementation-Title: Oracle Nashorn\nImplementation-Version: $(NASHORN_FULL_VERSION)
 
 # Create nashorn.jar from the final classes dir
 $(eval $(call SetupArchive,BUILD_NASHORN_JAR,\
@@ -117,5 +124,5 @@
     JAR:=$(NASHORN_JAR)))
 
 all: $(NASHORN_JAR)
-
+    
 .PHONY: all