make/BuildNashorn.gmk
changeset 47398 1fd27535bc57
parent 47364 6b3389375f31
--- a/make/BuildNashorn.gmk	Fri Oct 20 13:10:35 2017 +0200
+++ b/make/BuildNashorn.gmk	Fri Oct 20 13:33:35 2017 +0200
@@ -55,7 +55,18 @@
     MODULE := jdk.scripting.nashorn, \
     SRC := $(TOPDIR)/src/jdk.scripting.nashorn/share/classes, \
     COPY := .properties .js, \
-    BIN := $(SUPPORT_OUTPUTDIR)/special_classes))
+    BIN := $(SUPPORT_OUTPUTDIR)/special_classes, \
+    CREATE_API_DIGEST := true, \
+))
+
+# Declare dependencies between java compilations of different modules.
+# Since the other modules are declared in different invocations of this file,
+# use the macro to find the correct target file to depend on.
+# Only the javac compilation actually depends on other modules so limit
+# dependency declaration to that by using the *_COMPILE_TARGET variable.
+$(jdk.scripting.nashorn_COMPILE_TARGET): $(foreach d, $(call FindDepsForModule, jdk.scripting.nashorn), \
+    $(call SetupJavaCompilationApiTarget, $d, \
+        $(if $($d_BIN), $($d_BIN), $(JDK_OUTPUTDIR)/modules/$d)))
 
 NASGEN_SRC := $(TOPDIR)/make/nashorn/buildtools/nasgen/src
 ASM_SRC := $(TOPDIR)/src/java.base/share/classes/jdk/internal/org/objectweb/asm