# HG changeset patch # User jjg # Date 1361833691 28800 # Node ID 5b0b6ef58dbf034d0eb40303aa19b691a1a484e1 # Parent b70196e01c539ed799eada0d3ecb90521bb138b3 8008914: Add nashorn to the tl build Reviewed-by: mr, tbell, jjh Contributed-by: erik.joelsson@oracle.com, james.laskey@oracle.com diff -r b70196e01c53 -r 5b0b6ef58dbf Makefile --- a/Makefile Thu Feb 21 17:39:58 2013 -0800 +++ b/Makefile Mon Feb 25 15:08:11 2013 -0800 @@ -90,6 +90,7 @@ include ./make/jaxp-rules.gmk include ./make/jaxws-rules.gmk include ./make/jdk-rules.gmk +include ./make/nashorn-rules.gmk include ./make/install-rules.gmk include ./make/sponsors-rules.gmk include ./make/deploy-rules.gmk @@ -174,6 +175,11 @@ clobber:: jdk-clobber endif +ifeq ($(BUILD_NASHORN), true) + generic_build_repo_series:: $(NASHORN) + clobber:: nashorn-clobber +endif + ifeq ($(BUILD_DEPLOY), true) generic_build_repo_series:: $(DEPLOY) clobber:: deploy-clobber @@ -336,6 +342,7 @@ BUILD_HOTSPOT=false \ BUILD_JDK=false \ BUILD_LANGTOOLS=false \ + BUILD_NASHORN=false \ BUILD_CORBA=false \ BUILD_JAXP=false \ BUILD_JAXWS=false \ diff -r b70196e01c53 -r 5b0b6ef58dbf common/autoconf/generated-configure.sh --- a/common/autoconf/generated-configure.sh Thu Feb 21 17:39:58 2013 -0800 +++ b/common/autoconf/generated-configure.sh Mon Feb 25 15:08:11 2013 -0800 @@ -747,6 +747,7 @@ OVERRIDE_SRC_ROOT ADD_SRC_ROOT JDK_TOPDIR +NASHORN_TOPDIR HOTSPOT_TOPDIR JAXWS_TOPDIR JAXP_TOPDIR @@ -15663,6 +15664,7 @@ JAXP_TOPDIR="$SRC_ROOT/jaxp" JAXWS_TOPDIR="$SRC_ROOT/jaxws" HOTSPOT_TOPDIR="$SRC_ROOT/hotspot" +NASHORN_TOPDIR="$SRC_ROOT/nashorn" JDK_TOPDIR="$SRC_ROOT/jdk" @@ -15673,6 +15675,7 @@ + ############################################################################### # # Pickup additional source for a component from outside of the source root @@ -15903,6 +15906,19 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; } fi +if test "x$with_override_nashorn" != x; then + CURDIR="$PWD" + cd "$with_override_nashorn" + NASHORN_TOPDIR="`pwd`" + cd "$CURDIR" + if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then + as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5 +$as_echo_n "checking if nashorn should be overridden... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5 +$as_echo "yes with $NASHORN_TOPDIR" >&6; } +fi if test "x$with_override_jdk" != x; then CURDIR="$PWD" cd "$with_override_jdk" diff -r b70196e01c53 -r 5b0b6ef58dbf common/autoconf/source-dirs.m4 --- a/common/autoconf/source-dirs.m4 Thu Feb 21 17:39:58 2013 -0800 +++ b/common/autoconf/source-dirs.m4 Mon Feb 25 15:08:11 2013 -0800 @@ -33,12 +33,14 @@ JAXP_TOPDIR="$SRC_ROOT/jaxp" JAXWS_TOPDIR="$SRC_ROOT/jaxws" HOTSPOT_TOPDIR="$SRC_ROOT/hotspot" +NASHORN_TOPDIR="$SRC_ROOT/nashorn" JDK_TOPDIR="$SRC_ROOT/jdk" AC_SUBST(LANGTOOLS_TOPDIR) AC_SUBST(CORBA_TOPDIR) AC_SUBST(JAXP_TOPDIR) AC_SUBST(JAXWS_TOPDIR) AC_SUBST(HOTSPOT_TOPDIR) +AC_SUBST(NASHORN_TOPDIR) AC_SUBST(JDK_TOPDIR) ]) @@ -233,7 +235,18 @@ fi AC_MSG_CHECKING([if hotspot should be overridden]) AC_MSG_RESULT([yes with $HOTSPOT_TOPDIR]) -fi +fi +if test "x$with_override_nashorn" != x; then + CURDIR="$PWD" + cd "$with_override_nashorn" + NASHORN_TOPDIR="`pwd`" + cd "$CURDIR" + if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then + AC_MSG_ERROR([You have to override nashorn with a full nashorn repo!]) + fi + AC_MSG_CHECKING([if nashorn should be overridden]) + AC_MSG_RESULT([yes with $NASHORN_TOPDIR]) +fi if test "x$with_override_jdk" != x; then CURDIR="$PWD" cd "$with_override_jdk" diff -r b70196e01c53 -r 5b0b6ef58dbf common/autoconf/spec.gmk.in --- a/common/autoconf/spec.gmk.in Thu Feb 21 17:39:58 2013 -0800 +++ b/common/autoconf/spec.gmk.in Mon Feb 25 15:08:11 2013 -0800 @@ -141,6 +141,7 @@ JAXP_TOPDIR:=@JAXP_TOPDIR@ JAXWS_TOPDIR:=@JAXWS_TOPDIR@ HOTSPOT_TOPDIR:=@HOTSPOT_TOPDIR@ +NASHORN_TOPDIR:=@NASHORN_TOPDIR@ COPYRIGHT_YEAR:=@COPYRIGHT_YEAR@ # Location where build customization files may be found @@ -230,6 +231,7 @@ JAXWS_OUTPUTDIR=$(BUILD_OUTPUT)/jaxws HOTSPOT_OUTPUTDIR=$(BUILD_OUTPUT)/hotspot JDK_OUTPUTDIR=$(BUILD_OUTPUT)/jdk +NASHORN_OUTPUTDIR=$(BUILD_OUTPUT)/nashorn IMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/images JCE_OUTPUTDIR=$(BUILD_OUTPUT)/jce-release @@ -238,6 +240,7 @@ JAXP_DIST=$(JAXP_OUTPUTDIR)/dist JAXWS_DIST=$(JAXWS_OUTPUTDIR)/dist HOTSPOT_DIST=@HOTSPOT_DIST@ +NASHORN_DIST=$(NASHORN_OUTPUTDIR)/dist BUILD_HOTSPOT=@BUILD_HOTSPOT@ diff -r b70196e01c53 -r 5b0b6ef58dbf common/bin/hgforest.sh --- a/common/bin/hgforest.sh Thu Feb 21 17:39:58 2013 -0800 +++ b/common/bin/hgforest.sh Mon Feb 25 15:08:11 2013 -0800 @@ -96,7 +96,7 @@ repos="" repos_extra="" if [ "${command}" = "clone" -o "${command}" = "fclone" ] ; then - subrepos="corba jaxp jaxws langtools jdk hotspot" + subrepos="corba jaxp jaxws langtools jdk hotspot nashorn" if [ -f .hg/hgrc ] ; then pull_default=`hg paths default` if [ "${pull_default}" = "" ] ; then diff -r b70196e01c53 -r 5b0b6ef58dbf common/makefiles/Main.gmk --- a/common/makefiles/Main.gmk Thu Feb 21 17:39:58 2013 -0800 +++ b/common/makefiles/Main.gmk Mon Feb 25 15:08:11 2013 -0800 @@ -123,6 +123,12 @@ @($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk $(JDK_TARGET)) @$(call TargetExit) +nashorn: jdk nashorn-only +nashorn-only: start-make + @$(call TargetEnter) + @($(CD) $(NASHORN_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildNashorn.gmk) + @$(call TargetExit) + demos: jdk demos-only demos-only: start-make @$(call TargetEnter) @@ -131,7 +137,7 @@ # Note: This double-colon rule is intentional, to support # custom make file integration. -images:: source-tips demos images-only +images:: source-tips demos nashorn images-only images-only: start-make @$(call TargetEnter) @($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk images) @@ -193,7 +199,7 @@ # Remove everything, except the output from configure. -clean: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-images clean-overlay-images clean-bootcycle-build clean-docs +clean: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-nashorn clean-images clean-overlay-images clean-bootcycle-build clean-docs @($(CD) $(OUTPUT_ROOT) && $(RM) -r tmp source_tips build.log* build-trace*.log*) @$(ECHO) Cleaned all build artifacts. @@ -223,6 +229,8 @@ $(call CleanComponent,hotspot) clean-jdk: $(call CleanComponent,jdk) +clean-nashorn: + $(call CleanComponent,nashorn) clean-images: $(call CleanComponent,images) clean-overlay-images: @@ -233,10 +241,10 @@ $(call CleanComponent,docs) $(call CleanComponent,docstemp) -.PHONY: langtools corba jaxp jaxws hotspot jdk images overlay-images install -.PHONY: langtools-only corba-only jaxp-only jaxws-only hotspot-only jdk-only images-only overlay-images-only install-only +.PHONY: langtools corba jaxp jaxws hotspot jdk nashorn images overlay-images install +.PHONY: langtools-only corba-only jaxp-only jaxws-only hotspot-only jdk-only nashorn-only images-only overlay-images-only install-only .PHONY: all test clean dist-clean bootcycle-images start-make -.PHONY: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-images clean-overlay-images clean-bootcycle-build +.PHONY: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-nashorn clean-images clean-overlay-images clean-bootcycle-build .PHONY: profiles profiles-only profiles-oscheck FRC: # Force target diff -r b70196e01c53 -r 5b0b6ef58dbf common/makefiles/MakeBase.gmk --- a/common/makefiles/MakeBase.gmk Thu Feb 21 17:39:58 2013 -0800 +++ b/common/makefiles/MakeBase.gmk Mon Feb 25 15:08:11 2013 -0800 @@ -51,8 +51,9 @@ -e 's|X98|$(OUTPUT_ROOT)|g' -e 's|X97|$(SRC_ROOT)|g' \ -e 's|X00|X|g' | tr '\n' '$2' +# Subst in an extra $ to prevent it from disappearing. define ListPathsSafely_If - $(if $(word $3,$($1)),$(eval $1_LPS$3:=$(call compress_paths,$(wordlist $3,$4,$($1))))) + $(if $(word $3,$($1)),$(eval $1_LPS$3:=$(call compress_paths,$(subst $$,$$$$,$(wordlist $3,$4,$($1)))))) endef define ListPathsSafely_Printf diff -r b70196e01c53 -r 5b0b6ef58dbf make/Defs-internal.gmk --- a/make/Defs-internal.gmk Thu Feb 21 17:39:58 2013 -0800 +++ b/make/Defs-internal.gmk Mon Feb 25 15:08:11 2013 -0800 @@ -100,6 +100,7 @@ ABS_JAXWS_TOPDIR:=$(call OptFullPath,"$(JAXWS_TOPDIR)") ABS_JDK_TOPDIR:=$(call OptFullPath,"$(JDK_TOPDIR)") ABS_HOTSPOT_TOPDIR:=$(call OptFullPath,"$(HOTSPOT_TOPDIR)") +ABS_NASHORN_TOPDIR:=$(call OptFullPath,"$(NASHORN_TOPDIR)") ABS_INSTALL_TOPDIR:=$(call OptFullPath,"$(INSTALL_TOPDIR)") ABS_SPONSORS_TOPDIR:=$(call OptFullPath,"$(SPONSORS_TOPDIR)") ABS_DEPLOY_TOPDIR:=$(call OptFullPath,"$(DEPLOY_TOPDIR)") @@ -165,6 +166,15 @@ endif endif +NASHORN_SRC_AVAILABLE := $(call MkExists,$(NASHORN_TOPDIR)/make/Makefile) +ifndef BUILD_NASHORN + ifdef ALT_NASHORN_DIST + BUILD_NASHORN := false + else + BUILD_NASHORN := $(NASHORN_SRC_AVAILABLE) + endif +endif + DEPLOY_SRC_AVAILABLE := $(call MkExists,$(DEPLOY_TOPDIR)/make/Makefile) ifndef BUILD_DEPLOY BUILD_DEPLOY := $(DEPLOY_SRC_AVAILABLE) @@ -308,6 +318,10 @@ JAXWS_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxws ABS_JAXWS_DIST = $(JAXWS_OUTPUTDIR)/dist endif +ifndef ALT_NASHORN_DIST + NASHORN_OUTPUTDIR = $(ABS_OUTPUTDIR)/nashorn + ABS_NASHORN_DIST = $(NASHORN_OUTPUTDIR)/dist +endif # Common make arguments (supplied to all component builds) COMMON_BUILD_ARGUMENTS = \ diff -r b70196e01c53 -r 5b0b6ef58dbf make/jdk-rules.gmk --- a/make/jdk-rules.gmk Thu Feb 21 17:39:58 2013 -0800 +++ b/make/jdk-rules.gmk Mon Feb 25 15:08:11 2013 -0800 @@ -62,6 +62,9 @@ ifeq ($(BUILD_JAXWS), true) JDK_BUILD_ARGUMENTS += ALT_JAXWS_DIST=$(ABS_JAXWS_DIST) endif +ifeq ($(BUILD_NASHORN), true) + JDK_BUILD_ARGUMENTS += ALT_NASHORN_DIST=$(ABS_NASHORN_DIST) +endif ifeq ($(BUILD_HOTSPOT), true) JDK_BUILD_ARGUMENTS += ALT_HOTSPOT_IMPORT_PATH=$(HOTSPOT_DIR)/import diff -r b70196e01c53 -r 5b0b6ef58dbf make/sanity-rules.gmk --- a/make/sanity-rules.gmk Thu Feb 21 17:39:58 2013 -0800 +++ b/make/sanity-rules.gmk Mon Feb 25 15:08:11 2013 -0800 @@ -182,6 +182,14 @@ "" >> $(WARNING_FILE) endif endif +ifeq ($(NASHORN_SRC_AVAILABLE), true) + ifneq ($(BUILD_NASHORN), true) + @$(ECHO) "WARNING: You are not building the NASHORN sources.\n" \ + " The nashorn files will be obtained from \n" \ + " the location set in ALT_JDK_IMPORT_PATH. \n" \ + "" >> $(WARNING_FILE) + endif +endif ifeq ($(DEPLOY_SRC_AVAILABLE), true) ifneq ($(BUILD_DEPLOY), true) @$(ECHO) "WARNING: You are not building the DEPLOY sources.\n" \ @@ -268,6 +276,9 @@ ifeq ($(JDK_SRC_AVAILABLE), true) @$(ECHO) " JDK_TOPDIR = $(JDK_TOPDIR)" >> $(MESSAGE_FILE) endif +ifeq ($(NASHORN_SRC_AVAILABLE), true) + @$(ECHO) " NASHORN_TOPDIR = $(NASHORN_TOPDIR)" >> $(MESSAGE_FILE) +endif ifeq ($(DEPLOY_SRC_AVAILABLE), true) @$(ECHO) " DEPLOY_TOPDIR = $(DEPLOY_TOPDIR)" >> $(MESSAGE_FILE) endif @@ -303,6 +314,9 @@ ifeq ($(JDK_SRC_AVAILABLE), true) @$(ECHO) " BUILD_JDK = $(BUILD_JDK) " >> $(MESSAGE_FILE) endif +ifeq ($(NASHORN_SRC_AVAILABLE), true) + @$(ECHO) " BUILD_NASHORN = $(BUILD_NASHORN) " >> $(MESSAGE_FILE) +endif ifeq ($(DEPLOY_SRC_AVAILABLE), true) @$(ECHO) " BUILD_DEPLOY = $(BUILD_DEPLOY) " >> $(MESSAGE_FILE) endif diff -r b70196e01c53 -r 5b0b6ef58dbf make/scripts/hgforest.sh --- a/make/scripts/hgforest.sh Thu Feb 21 17:39:58 2013 -0800 +++ b/make/scripts/hgforest.sh Mon Feb 25 15:08:11 2013 -0800 @@ -40,7 +40,7 @@ repos="" repos_extra="" if [ "${command}" = "clone" -o "${command}" = "fclone" ] ; then - subrepos="corba jaxp jaxws langtools jdk hotspot" + subrepos="corba jaxp jaxws langtools jdk hotspot nashorn" if [ -f .hg/hgrc ] ; then pull_default=`hg paths default` if [ "${pull_default}" = "" ] ; then