--- a/nashorn/makefiles/BuildNashorn.gmk Mon Oct 21 09:56:06 2013 +0200
+++ b/nashorn/makefiles/BuildNashorn.gmk Mon Oct 21 15:00:56 2013 +0100
@@ -37,35 +37,35 @@
NASHORN_FULL_VERSION := $(FULL_VERSION)
ifdef MILESTONE
- ifeq ($(MILESTONE),internal)
+ ifeq ($(MILESTONE), internal)
NASHORN_VERSION = $(FULL_VERSION)
endif
endif
# Need to use source and target 7 for nasgen to work.
-$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE_DEBUG,\
- JVM:=$(JAVA),\
- JAVAC:=$(NEW_JAVAC),\
- FLAGS:=-g -source 7 -target 7 -bootclasspath $(JDK_CLASSES),\
- SERVER_DIR:=$(SJAVAC_SERVER_DIR),\
- SERVER_JVM:=$(SJAVAC_SERVER_JAVA)))
+$(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE_DEBUG, \
+ JVM := $(JAVA), \
+ JAVAC := $(NEW_JAVAC), \
+ FLAGS := -g -source 7 -target 7 -bootclasspath $(JDK_CLASSES), \
+ SERVER_DIR := $(SJAVAC_SERVER_DIR), \
+ SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
# Build nashorn into intermediate directory
-$(eval $(call SetupJavaCompilation,BUILD_NASHORN,\
- SETUP:=GENERATE_NEWBYTECODE_DEBUG,\
- SRC:=$(NASHORN_TOPDIR)/src,\
- COPY:=.properties .js,\
- BIN:=$(NASHORN_OUTPUTDIR)/nashorn_classes))
+$(eval $(call SetupJavaCompilation,BUILD_NASHORN, \
+ SETUP := GENERATE_NEWBYTECODE_DEBUG, \
+ SRC := $(NASHORN_TOPDIR)/src, \
+ COPY := .properties .js, \
+ BIN := $(NASHORN_OUTPUTDIR)/nashorn_classes))
NASGEN_SRC := $(NASHORN_TOPDIR)/buildtools/nasgen/src
ASM_SRC := $(JDK_TOPDIR)/src/share/classes/jdk/internal/org/objectweb/asm
# Build nasgen
-$(eval $(call SetupJavaCompilation,BUILD_NASGEN,\
- SETUP:=GENERATE_NEWBYTECODE_DEBUG,\
- SRC:=$(NASGEN_SRC) $(ASM_SRC), \
- BIN:=$(NASHORN_OUTPUTDIR)/nasgen_classes,\
- ADD_JAVAC_FLAGS:=-cp $(NASHORN_OUTPUTDIR)/nashorn_classes))
+$(eval $(call SetupJavaCompilation,BUILD_NASGEN, \
+ SETUP := GENERATE_NEWBYTECODE_DEBUG, \
+ SRC := $(NASGEN_SRC) $(ASM_SRC), \
+ BIN := $(NASHORN_OUTPUTDIR)/nasgen_classes, \
+ ADD_JAVAC_FLAGS := -cp $(NASHORN_OUTPUTDIR)/nashorn_classes))
# Nasgen needs nashorn classes
$(BUILD_NASGEN): $(BUILD_NASHORN)
@@ -77,35 +77,36 @@
$(RM) -rf $(@D)/jdk $(@D)/netscape
$(CP) -R -p $(NASHORN_OUTPUTDIR)/nashorn_classes/* $(@D)/
$(FIXPATH) $(JAVA) \
- -cp "$(NASHORN_OUTPUTDIR)/nasgen_classes$(PATH_SEP)$(NASHORN_OUTPUTDIR)/nashorn_classes" \
- jdk.nashorn.internal.tools.nasgen.Main $(@D) jdk.nashorn.internal.objects $(@D)
+ -cp "$(NASHORN_OUTPUTDIR)/nasgen_classes$(PATH_SEP)$(NASHORN_OUTPUTDIR)/nashorn_classes" \
+ jdk.nashorn.internal.tools.nasgen.Main $(@D) jdk.nashorn.internal.objects $(@D)
$(TOUCH) $@
# Version file needs to be processed with version numbers
VERSION_FILE := $(NASHORN_OUTPUTDIR)/classes/jdk/nashorn/internal/runtime/resources/version.properties
+
# Needs to happen after nasgen run since nasgen run deletes it
$(VERSION_FILE): $(NASHORN_OUTPUTDIR)/classes/_the.nasgen.run
$(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_FULL_VERSION)/g' \
- -e 's/$$(RELEASE)/$(NASHORN_VERSION)/g' \
- -e '/^#.*$$/d' -e '/^$$/d' > $@
+ -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: $(NASHORN_FULL_VERSION)
# Create nashorn.jar from the final classes dir
-$(eval $(call SetupArchive,BUILD_NASHORN_JAR,\
+$(eval $(call SetupArchive,BUILD_NASHORN_JAR, \
$(NASHORN_OUTPUTDIR)/classes/_the.nasgen.run \
- $(VERSION_FILE),\
- SRCS:=$(NASHORN_OUTPUTDIR)/classes,\
- SUFFIXES:=.class .js .properties Factory,\
- MANIFEST:=$(NASHORN_TOPDIR)/src/META-INF/MANIFEST.MF,\
- EXTRA_MANIFEST_ATTR:=$(MANIFEST_ATTRIBUTES),\
- SKIP_METAINF:=true,\
- JAR:=$(NASHORN_JAR)))
+ $(VERSION_FILE), \
+ SRCS := $(NASHORN_OUTPUTDIR)/classes, \
+ SUFFIXES := .class .js .properties Factory, \
+ MANIFEST := $(NASHORN_TOPDIR)/src/META-INF/MANIFEST.MF, \
+ EXTRA_MANIFEST_ATTR := $(MANIFEST_ATTRIBUTES), \
+ SKIP_METAINF := true, \
+ JAR := $(NASHORN_JAR)))
all: $(NASHORN_JAR)
-
+
.PHONY: all