Merge
This commit is contained in:
commit
0c347421d9
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -30,19 +30,12 @@ default: all
|
|||||||
include MakeBase.gmk
|
include MakeBase.gmk
|
||||||
include JavaCompilation.gmk
|
include JavaCompilation.gmk
|
||||||
include SetupJavaCompilers.gmk
|
include SetupJavaCompilers.gmk
|
||||||
|
include TextFileProcessing.gmk
|
||||||
|
|
||||||
JDK_CLASSES := $(call PathList, $(strip $(addprefix $(JDK_OUTPUTDIR)/modules/, \
|
JDK_CLASSES := $(call PathList, $(strip $(addprefix $(JDK_OUTPUTDIR)/modules/, \
|
||||||
java.base java.logging java.scripting)))
|
java.base java.logging java.scripting)))
|
||||||
|
|
||||||
NASHORN_JAR := $(IMAGES_OUTPUTDIR)/nashorn.jar
|
NASHORN_JAR := $(IMAGES_OUTPUTDIR)/nashorn.jar
|
||||||
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 8 for nasgen to work.
|
# Need to use source and target 8 for nasgen to work.
|
||||||
$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE_DEBUG, \
|
$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE_DEBUG, \
|
||||||
@ -92,25 +85,23 @@ $(NASGEN_RUN_FILE): $(BUILD_NASGEN)
|
|||||||
$(TOUCH) $@
|
$(TOUCH) $@
|
||||||
|
|
||||||
# Version file needs to be processed with version numbers
|
# Version file needs to be processed with version numbers
|
||||||
VERSION_FILE := $(JDK_OUTPUTDIR)/modules/jdk.scripting.nashorn/jdk/nashorn/internal/runtime/resources/version.properties
|
$(eval $(call SetupTextFileProcessing, BUILD_VERSION_FILE, \
|
||||||
VERSION_SRC := $(NASHORN_TOPDIR)/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/version.properties-template
|
SOURCE_FILES := $(NASHORN_TOPDIR)/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/version.properties.template, \
|
||||||
|
OUTPUT_FILE := $(JDK_OUTPUTDIR)/modules/jdk.scripting.nashorn/jdk/nashorn/internal/runtime/resources/version.properties, \
|
||||||
|
REPLACEMENTS := \
|
||||||
|
@@VERSION_STRING@@ => $(VERSION_STRING) ; \
|
||||||
|
@@VERSION_SHORT@@ => $(VERSION_SHORT) , \
|
||||||
|
))
|
||||||
|
|
||||||
# Needs to happen after nasgen run since nasgen run deletes it
|
# Version processing needs to happen after nasgen run since nasgen run deletes it
|
||||||
$(VERSION_FILE): $(NASGEN_RUN_FILE)
|
$(BUILD_VERSION_FILE): $(NASGEN_RUN_FILE)
|
||||||
$(VERSION_FILE): $(VERSION_SRC)
|
|
||||||
$(ECHO) Creating version.properties
|
|
||||||
$(MKDIR) -p $(@D)
|
|
||||||
$(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_FULL_VERSION)
|
MANIFEST_ATTRIBUTES := Name: jdk/nashorn/\nImplementation-Title: Oracle Nashorn\nImplementation-Version: $(VERSION_SHORT)
|
||||||
|
|
||||||
# Create nashorn.jar from the final classes dir
|
# Create nashorn.jar from the final classes dir
|
||||||
$(eval $(call SetupArchive,BUILD_NASHORN_JAR, \
|
$(eval $(call SetupArchive,BUILD_NASHORN_JAR, \
|
||||||
DEPENDENCIES := $(NASGEN_RUN_FILE) \
|
DEPENDENCIES := $(NASGEN_RUN_FILE) $(BUILD_VERSION_FILE), \
|
||||||
$(VERSION_FILE), \
|
|
||||||
SRCS := $(NASHORN_CLASSES_DIR), \
|
SRCS := $(NASHORN_CLASSES_DIR), \
|
||||||
SUFFIXES := .class .js .properties Factory, \
|
SUFFIXES := .class .js .properties Factory, \
|
||||||
MANIFEST := $(NASHORN_TOPDIR)/src/jdk.scripting.nashorn/share/classes/META-INF/MANIFEST.MF, \
|
MANIFEST := $(NASHORN_TOPDIR)/src/jdk.scripting.nashorn/share/classes/META-INF/MANIFEST.MF, \
|
||||||
@ -118,7 +109,7 @@ $(eval $(call SetupArchive,BUILD_NASHORN_JAR, \
|
|||||||
SKIP_METAINF := true, \
|
SKIP_METAINF := true, \
|
||||||
JAR := $(NASHORN_JAR)))
|
JAR := $(NASHORN_JAR)))
|
||||||
|
|
||||||
compile: $(NASHORN_RUN_FILE) $(VERSION_FILE)
|
compile: $(NASHORN_RUN_FILE) $(BUILD_VERSION_FILE)
|
||||||
all: $(NASHORN_JAR)
|
all: $(NASHORN_JAR)
|
||||||
|
|
||||||
.PHONY: compile all
|
.PHONY: compile all
|
||||||
|
@ -158,9 +158,9 @@
|
|||||||
<copy file="${nashorn.module.src.dir}/jdk/internal/dynalink/support/messages.properties" todir="${build.classes.dir}/jdk/internal/dynalink/support"/>
|
<copy file="${nashorn.module.src.dir}/jdk/internal/dynalink/support/messages.properties" todir="${build.classes.dir}/jdk/internal/dynalink/support"/>
|
||||||
<copy file="${nashorn.module.src.dir}/jdk/nashorn/internal/codegen/anchor.properties" todir="${build.classes.dir}/jdk/nashorn/internal/codegen"/>
|
<copy file="${nashorn.module.src.dir}/jdk/nashorn/internal/codegen/anchor.properties" todir="${build.classes.dir}/jdk/nashorn/internal/codegen"/>
|
||||||
|
|
||||||
<echo message="full=${nashorn.fullversion}" file="${build.classes.dir}/jdk/nashorn/internal/runtime/resources/version.properties"/>
|
<echo message="version_string=${nashorn.fullversion}" file="${build.classes.dir}/jdk/nashorn/internal/runtime/resources/version.properties"/>
|
||||||
<echo file="${build.classes.dir}/jdk/nashorn/internal/runtime/resources/version.properties" append="true">${line.separator}</echo>
|
<echo file="${build.classes.dir}/jdk/nashorn/internal/runtime/resources/version.properties" append="true">${line.separator}</echo>
|
||||||
<echo message="release=${nashorn.version}" file="${build.classes.dir}/jdk/nashorn/internal/runtime/resources/version.properties" append="true"/>
|
<echo message="version_short=${nashorn.version}" file="${build.classes.dir}/jdk/nashorn/internal/runtime/resources/version.properties" append="true"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="jar" depends="compile, run-nasgen, generate-cc-template" description="Creates nashorn.jar" unless="compile.suppress.jar">
|
<target name="jar" depends="compile, run-nasgen, generate-cc-template" description="Creates nashorn.jar" unless="compile.suppress.jar">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -41,7 +41,7 @@ public final class Version {
|
|||||||
* @return version string
|
* @return version string
|
||||||
*/
|
*/
|
||||||
public static String version() {
|
public static String version() {
|
||||||
return version("release"); // mm.nn.oo[-milestone]
|
return version("version_short"); // E.g. "9-internal" or "9.1.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -49,7 +49,7 @@ public final class Version {
|
|||||||
* @return full version string
|
* @return full version string
|
||||||
*/
|
*/
|
||||||
public static String fullVersion() {
|
public static String fullVersion() {
|
||||||
return version("full"); // mm.mm.oo[-milestone]-build
|
return version("version_string"); // E.g. "9.1.2.3-ea-4+nashorn-testing"
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String VERSION_RB_NAME = "jdk.nashorn.internal.runtime.resources.version";
|
private static final String VERSION_RB_NAME = "jdk.nashorn.internal.runtime.resources.version";
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@ -23,5 +23,5 @@
|
|||||||
# questions.
|
# questions.
|
||||||
#
|
#
|
||||||
|
|
||||||
full=$(FULL_VERSION)
|
version_short=@@VERSION_SHORT@@
|
||||||
release=$(RELEASE)
|
version_string=@@VERSION_STRING@@
|
Loading…
x
Reference in New Issue
Block a user