--- a/nashorn/makefiles/BuildNashorn.gmk Fri Oct 11 03:09:54 2013 -0700
+++ b/nashorn/makefiles/BuildNashorn.gmk Wed Oct 16 12:05:13 2013 -0700
@@ -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
--- a/nashorn/makefiles/Makefile Fri Oct 11 03:09:54 2013 -0700
+++ b/nashorn/makefiles/Makefile Wed Oct 16 12:05:13 2013 -0700
@@ -24,19 +24,19 @@
#
# Locate this Makefile
-ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
- makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
+ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))), )
+ makefile_path := $(CURDIR)/$(lastword $(MAKEFILE_LIST))
else
- makefile_path:=$(lastword $(MAKEFILE_LIST))
+ makefile_path := $(lastword $(MAKEFILE_LIST))
endif
-repo_dir:=$(patsubst %/makefiles/Makefile,%,$(makefile_path))
+repo_dir := $(patsubst %/makefiles/Makefile, %, $(makefile_path))
# What is the name of this subsystem (langtools, corba, etc)?
-subsystem_name:=$(notdir $(repo_dir))
+subsystem_name := $(notdir $(repo_dir))
# Try to locate top-level makefile
-top_level_makefile:=$(repo_dir)/../common/makefiles/Makefile
-ifneq ($(wildcard $(top_level_makefile)),)
+top_level_makefile := $(repo_dir)/../common/makefiles/Makefile
+ifneq ($(wildcard $(top_level_makefile)), )
$(info Will run $(subsystem_name) target on top-level Makefile)
$(info WARNING: This is a non-recommended way of building!)
$(info ===================================================)