diff --git a/Makefile b/Makefile index f9162f0b6413edfb1fc1058b094121aaeb459413..f7b9d1b35e3ae0b1c2fae5701cc5519f7e00e018 100644 --- a/Makefile +++ b/Makefile @@ -90,6 +90,7 @@ include ./make/corba-rules.gmk 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 @@ ifeq ($(BUILD_JDK), true) 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 @@ deploy_fastdebug_only: BUILD_HOTSPOT=false \ BUILD_JDK=false \ BUILD_LANGTOOLS=false \ + BUILD_NASHORN=false \ BUILD_CORBA=false \ BUILD_JAXP=false \ BUILD_JAXWS=false \ diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index 741160eab1d8bd1a084fee1841f0192cd9d5400f..00d5093259b4901b3e972f16fde3cdabb866d4b9 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -747,6 +747,7 @@ BUILD_OUTPUT OVERRIDE_SRC_ROOT ADD_SRC_ROOT JDK_TOPDIR +NASHORN_TOPDIR HOTSPOT_TOPDIR JAXWS_TOPDIR JAXP_TOPDIR @@ -15663,6 +15664,7 @@ CORBA_TOPDIR="$SRC_ROOT/corba" 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 @@ JDK_TOPDIR="$SRC_ROOT/jdk" + ############################################################################### # # Pickup additional source for a component from outside of the source root @@ -15903,6 +15906,19 @@ $as_echo_n "checking if hotspot should be overridden... " >&6; } { $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 --git a/common/autoconf/source-dirs.m4 b/common/autoconf/source-dirs.m4 index eacd056066b38c8039f0b20f24ec8e19cc8651d1..bb0aba1b826d8e00f315781aefbaaff29dfcf339 100644 --- a/common/autoconf/source-dirs.m4 +++ b/common/autoconf/source-dirs.m4 @@ -33,12 +33,14 @@ CORBA_TOPDIR="$SRC_ROOT/corba" 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 @@ if test "x$with_override_hotspot" != x; then 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 --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in index ec47d0364fde55548d1f13a04e33ad15f6bec462..3d6cac27e7b7042f2266732058f183a0a5d713e5 100644 --- a/common/autoconf/spec.gmk.in +++ b/common/autoconf/spec.gmk.in @@ -141,6 +141,7 @@ CORBA_TOPDIR:=@CORBA_TOPDIR@ 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 @@ JAXP_OUTPUTDIR=$(BUILD_OUTPUT)/jaxp 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 @@ CORBA_DIST=$(CORBA_OUTPUTDIR)/dist JAXP_DIST=$(JAXP_OUTPUTDIR)/dist JAXWS_DIST=$(JAXWS_OUTPUTDIR)/dist HOTSPOT_DIST=@HOTSPOT_DIST@ +NASHORN_DIST=$(NASHORN_OUTPUTDIR)/dist BUILD_HOTSPOT=@BUILD_HOTSPOT@ diff --git a/common/bin/hgforest.sh b/common/bin/hgforest.sh index 29e80301a0655aedc2fbea403094b44d65d9c7f3..9f0db97d578446d90de4b7623f6515bf2920f6a5 100644 --- a/common/bin/hgforest.sh +++ b/common/bin/hgforest.sh @@ -96,7 +96,7 @@ pull_default="" 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 --git a/common/makefiles/Main.gmk b/common/makefiles/Main.gmk index 1fce2e25dc68043e2fac9e257ea22cc831040486..c43f590707c33b24ebaf6384a8e43c9231de39ca 100644 --- a/common/makefiles/Main.gmk +++ b/common/makefiles/Main.gmk @@ -123,6 +123,12 @@ jdk-only: start-make @($(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 @@ demos-only: start-make # 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 @@ $(OUTPUT_ROOT)/source_tips: FRC # 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 @@ clean-hotspot: $(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 @@ clean-docs: $(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 --git a/common/makefiles/MakeBase.gmk b/common/makefiles/MakeBase.gmk index 708cbada08545fb08ede049c74387710bb624b1e..4c1ecc8c8b7e2842dd13b3d64fe7b09667e6befe 100644 --- a/common/makefiles/MakeBase.gmk +++ b/common/makefiles/MakeBase.gmk @@ -51,8 +51,9 @@ decompress_paths=$(SED) -f $(SRC_ROOT)/common/makefiles/support/ListPathsSafely- -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 --git a/make/Defs-internal.gmk b/make/Defs-internal.gmk index 6f40f763bc9014588ecbea4883f888e05960e920..15374ff7c51d96692f0c6e99799bf42b40b68027 100644 --- a/make/Defs-internal.gmk +++ b/make/Defs-internal.gmk @@ -100,6 +100,7 @@ ABS_JAXP_TOPDIR:=$(call OptFullPath,"$(JAXP_TOPDIR)") 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 @@ ifeq ($(JDK_SRC_AVAILABLE),true) 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 @@ ifndef ALT_JAXWS_DIST 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 --git a/make/jdk-rules.gmk b/make/jdk-rules.gmk index 42ba6adf627f20e6c297c7d68f92431e78e8bc1e..dc6b5556dd06934c27b4a428b8a9c2fc1ec8a601 100644 --- a/make/jdk-rules.gmk +++ b/make/jdk-rules.gmk @@ -62,6 +62,9 @@ endif 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 --git a/make/sanity-rules.gmk b/make/sanity-rules.gmk index 544dba10ffd57df000dca43d8bfc6033364ff63e..ee3d6f88ab19b25f0ded59cae4ba9d23e27d34b3 100644 --- a/make/sanity-rules.gmk +++ b/make/sanity-rules.gmk @@ -182,6 +182,14 @@ ifeq ($(JDK_SRC_AVAILABLE), true) "" >> $(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 @@ endif 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 @@ endif 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 --git a/make/scripts/hgforest.sh b/make/scripts/hgforest.sh index ed937f3711e6ca58309893f8aa81aed524ae5357..f30d3eb77689263c6388e715cdcfb64e8982e7e6 100644 --- a/make/scripts/hgforest.sh +++ b/make/scripts/hgforest.sh @@ -40,7 +40,7 @@ pull_default="" 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