make/BuildNashorn.gmk
changeset 47217 72e3ae9a25eb
parent 47216 71c04702a3d5
child 47274 0e67ab18b511
--- a/make/BuildNashorn.gmk	Tue Sep 12 19:03:39 2017 +0200
+++ b/make/BuildNashorn.gmk	Tue Sep 12 19:03:56 2017 +0200
@@ -32,18 +32,17 @@
 include JavaCompilation.gmk
 include SetupJavaCompilers.gmk
 include TextFileProcessing.gmk
+include Modules.gmk
 
 JDK_CLASSES := $(call PathList, $(strip $(addprefix $(JDK_OUTPUTDIR)/modules/, \
       java.base java.logging java.scripting jdk.dynalink)))
 
-MODULESOURCEPATH := $(NASHORN_TOPDIR)/src/*/share/classes
-
 # Need to use source and target 8 for nasgen to work.
 $(eval $(call SetupJavaCompiler, GENERATE_NEWBYTECODE_DEBUG, \
     JVM := $(JAVA_JAVAC), \
     JAVAC := $(NEW_JAVAC), \
     FLAGS := -g -source 9 -target 9 --upgrade-module-path "$(JDK_OUTPUTDIR)/modules/" \
-         --system none --module-source-path "$(MODULESOURCEPATH)", \
+         --system none --module-source-path $(call GetModuleSrcPath), \
     SERVER_DIR := $(SJAVAC_SERVER_DIR), \
     SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
 
@@ -54,12 +53,12 @@
 $(eval $(call SetupJavaCompilation, jdk.scripting.nashorn, \
     SETUP := GENERATE_NEWBYTECODE_DEBUG, \
     MODULE := jdk.scripting.nashorn, \
-    SRC := $(NASHORN_TOPDIR)/src/jdk.scripting.nashorn/share/classes, \
+    SRC := $(TOPDIR)/src/jdk.scripting.nashorn/share/classes, \
     COPY := .properties .js, \
     BIN := $(SUPPORT_OUTPUTDIR)/special_classes))
 
-NASGEN_SRC := $(NASHORN_TOPDIR)/buildtools/nasgen/src
-ASM_SRC := $(JDK_TOPDIR)/src/java.base/share/classes/jdk/internal/org/objectweb/asm
+NASGEN_SRC := $(TOPDIR)/make/nashorn/buildtools/nasgen/src
+ASM_SRC := $(TOPDIR)/src/java.base/share/classes/jdk/internal/org/objectweb/asm
 
 # Build nasgen
 $(eval $(call SetupJavaCompilation, BUILD_NASGEN, \
@@ -94,7 +93,7 @@
 
 # Version file needs to be processed with version numbers
 $(eval $(call SetupTextFileProcessing, BUILD_VERSION_FILE, \
-  SOURCE_FILES := $(NASHORN_TOPDIR)/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/version.properties.template, \
+  SOURCE_FILES := $(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) ; \