8009021: nasgen should be run on boot jdk rather than currenly built jdk
authorsundar
Tue, 26 Feb 2013 22:57:51 +0530
changeset 16265 bd8e2707574a
parent 16264 e0c3c97cd93e
child 16266 5ddfc1208ef3
child 16267 cd471d62bb6a
8009021: nasgen should be run on boot jdk rather than currenly built jdk Reviewed-by: jlaskey
nashorn/makefiles/BuildNashorn.gmk
--- a/nashorn/makefiles/BuildNashorn.gmk	Mon Feb 25 16:51:04 2013 +0100
+++ b/nashorn/makefiles/BuildNashorn.gmk	Tue Feb 26 22:57:51 2013 +0530
@@ -57,10 +57,13 @@
     COPY:=.properties .js,\
     BIN:=$(NASHORN_OUTPUTDIR)/nashorn_classes))
 
+NASGEN_SRC := $(FIXPATH) $(NASHORN_TOPDIR)/buildtools/nasgen/src
+ASM_SRC := $(FIXPATH) $(JDK_TOPDIR)/src/share/classes/jdk/internal/org/objectweb/asm
+
 # Build nasgen
 $(eval $(call SetupJavaCompilation,BUILD_NASGEN,\
     SETUP:=GENERATE_NEWBYTECODE_DEBUG,\
-    SRC:=$(NASHORN_TOPDIR)/buildtools/nasgen/src,\
+    SRC:=$(NASGEN_SRC) $(ASM_SRC), \
     BIN:=$(NASHORN_OUTPUTDIR)/nasgen_classes,\
     ADD_JAVAC_FLAGS:=-cp $(NASHORN_OUTPUTDIR)/nashorn_classes))
 
@@ -74,7 +77,7 @@
 	$(MKDIR) -p $(@D)
 	$(RM) -rf $(@D)/jdk $(@D)/netscape
 	$(CP) -R -p $(NASHORN_OUTPUTDIR)/nashorn_classes/* $(@D)/
-	$(FIXPATH) $(JDK_OUTPUTDIR)/bin/java \
+	$(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)
 	for f in `$(FIND) $(@D)/jdk/nashorn/internal/objects/ -name "*.class"`; do \