changeset 1638:29cf60874856

Merge
author amurillo
date Thu, 10 Sep 2015 14:55:18 -0700
parents 4fb0ae864a1d (diff) 81140a77ebd8 (current diff)
children b45c22d42940
files common/autoconf/spec.gmk.in make/CompileJavaModules.gmk
diffstat 7 files changed, 45 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue Sep 08 16:10:09 2015 +0200
+++ b/.hgtags	Thu Sep 10 14:55:18 2015 -0700
@@ -322,3 +322,4 @@
 7972dc8f2a47f0c4cd8f02fa5662af41f028aa14 jdk9-b77
 8c40d4143ee13bdf8170c68cc384c36ab1e9fadb jdk9-b78
 ba08a9f79b9849716bae1f39f71333d47f604012 jdk9-b79
+f7c5ae2933c0b8510a420d1713a955e4ffc7ad0b jdk9-b80
--- a/common/autoconf/spec.gmk.in	Tue Sep 08 16:10:09 2015 +0200
+++ b/common/autoconf/spec.gmk.in	Thu Sep 10 14:55:18 2015 -0700
@@ -30,25 +30,6 @@
 #   (called @OPENJDK_BUILD_AUTOCONF_NAME@ by autoconf)
 # using 'configure @CONFIGURE_COMMAND_LINE@'
 
-# When calling macros, the spaces between arguments are
-# often semantically important! Sometimes we need to subst
-# spaces and commas, therefore we need the following macros.
-X:=
-SPACE:=$(X) $(X)
-COMMA:=,
-DOLLAR:=$$
-HASH:=\#
-LEFT_PAREN:=(
-RIGHT_PAREN:=)
-SQUOTE:='
-#'
-DQUOTE:="
-#"
-define NEWLINE
-
-
-endef
-
 # The command line given to configure.
 CONFIGURE_COMMAND_LINE:=@CONFIGURE_COMMAND_LINE@
 
--- a/make/CompileJavaModules.gmk	Tue Sep 08 16:10:09 2015 +0200
+++ b/make/CompileJavaModules.gmk	Thu Sep 10 14:55:18 2015 -0700
@@ -527,8 +527,7 @@
     ## Service types are required in the classpath when compiing module-info
     $1_CLASSPATH := $$($1_CLASSPATH) $$(addprefix $(JDK_OUTPUTDIR)/modules/,jdk.hotspot.agent)
   endif
-  $1_CLASSPATH := $$(subst $$(SPACE),$$(PATH_SEP),$$($1_CLASSPATH))
-  $1_JAVAC_FLAGS := -bootclasspath $(EMPTY_DIR) -extdirs $(EMPTY_DIR) -endorseddirs $(EMPTY_DIR) -classpath "$$($1_CLASSPATH)" $$($1_ADD_JAVAC_FLAGS)
+  $1_JAVAC_FLAGS := -bootclasspath $(EMPTY_DIR) -extdirs $(EMPTY_DIR) -endorseddirs $(EMPTY_DIR) $$($1_ADD_JAVAC_FLAGS)
 
   $$(eval $$(call SetupJavaCompilation,$1, \
       SETUP := $$(if $$($1_SETUP), $$($1_SETUP), GENERATE_JDKBYTECODE), \
@@ -536,6 +535,7 @@
       INCLUDES := $(JDK_USER_DEFINED_FILTER),\
       BIN := $$(if $$($1_BIN), $$($1_BIN), $(JDK_OUTPUTDIR)/modules/$1), \
       HEADERS := $(SUPPORT_OUTPUTDIR)/headers/$1, \
+      CLASSPATH := $$($1_CLASSPATH), \
       ADD_JAVAC_FLAGS := $$($1_ADD_JAVAC_FLAGS) $$($1_JAVAC_FLAGS)))
 
   $1: $$($1) $$($1_COPY_EXTRA)
--- a/make/Init.gmk	Tue Sep 08 16:10:09 2015 +0200
+++ b/make/Init.gmk	Thu Sep 10 14:55:18 2015 -0700
@@ -50,7 +50,7 @@
   include $(topdir)/make/Help.gmk
 
   # Targets provided by Init.gmk.
-  ALL_INIT_TARGETS := print-modules print-targets reconfigure
+  ALL_INIT_TARGETS := print-modules print-targets print-configuration reconfigure
 
   # CALLED_TARGETS is the list of targets that the user provided,
   # or "default" if unspecified.
@@ -228,6 +228,9 @@
 	    $(MAKE) $(MAKE_ARGS) -j 1 -f make/Main.gmk $(USER_MAKE_VARS) \
 	    NO_RECIPES=true print-targets )
 
+  print-configuration:
+	  $(ECHO) $(CONFIGURE_COMMAND_LINE)
+
   reconfigure:
         ifneq ($(CONFIGURE_COMMAND_LINE), )
 	  $(ECHO) "Re-running configure using arguments '$(CONFIGURE_COMMAND_LINE)'"
--- a/make/common/JavaCompilation.gmk	Tue Sep 08 16:10:09 2015 +0200
+++ b/make/common/JavaCompilation.gmk	Thu Sep 10 14:55:18 2015 -0700
@@ -403,6 +403,7 @@
 #   SRC:=one or more directories to search for sources. The order of the source roots
 #        is significant. The first found file of a certain name has priority.
 #   BIN:=store classes here
+#   CLASSPATH:=a list of additional entries to set as classpath to javac
 #   INCLUDES:=myapp.foo means will only compile java files in myapp.foo or any of its sub-packages.
 #   EXCLUDES:=myapp.foo means will do not compile java files in myapp.foo or any of its sub-packages.
 #   COPY:=.prp means copy all prp files to the corresponding package in BIN.
@@ -428,6 +429,9 @@
   $1_JVM := $$($$($1_SETUP)_JVM)
   $1_JAVAC := $$($$($1_SETUP)_JAVAC)
   $1_FLAGS := $$($$($1_SETUP)_FLAGS) $(JAVAC_FLAGS) $$($1_ADD_JAVAC_FLAGS)
+  ifneq ($$($1_CLASSPATH), )
+    $1_FLAGS += -cp $$(call PathList, $$($1_CLASSPATH))
+  endif
   ifeq ($$($1_JAVAC),)
     $$(error The Java compilation $1 refers to a non-existant java compiler setup $$($1_SETUP))
   endif
@@ -482,7 +486,7 @@
       $$(addprefix -i ,$$(addsuffix /*,$$($1_INCLUDES))) \
       $$(addprefix -xf *,$$(strip $$($1_EXCLUDE_FILES) $$($1_SJAVAC_EXCLUDE_FILES))) \
       $$(addprefix -if *,$$(strip $$($1_INCLUDE_FILES))) \
-      -src "$$(subst $$(SPACE),$$(PATH_SEP),$$(strip $$($1_SRC)))"
+      -src $$(call PathList, $$($1_SRC))
 
   # All files below META-INF are always copied.
   $1_ALL_COPIES := $$(filter $$(addsuffix /META-INF%,$$($1_SRC)),$$($1_ALL_SRCS))
--- a/make/common/MakeBase.gmk	Tue Sep 08 16:10:09 2015 +0200
+++ b/make/common/MakeBase.gmk	Thu Sep 10 14:55:18 2015 -0700
@@ -41,6 +41,29 @@
 # next make invocation.
 .DELETE_ON_ERROR:
 
+################################################################################
+# Definitions for special characters
+################################################################################
+
+# When calling macros, the spaces between arguments are
+# often semantically important! Sometimes we need to subst
+# spaces and commas, therefore we need the following macros.
+X:=
+SPACE:=$(X) $(X)
+COMMA:=,
+DOLLAR:=$$
+HASH:=\#
+LEFT_PAREN:=(
+RIGHT_PAREN:=)
+SQUOTE:='
+#'
+DQUOTE:="
+#"
+define NEWLINE
+
+
+endef
+
 ##############################
 # Functions
 ##############################
@@ -780,6 +803,14 @@
 endif
 
 ################################################################################
+# Return a string suitable for use after a -classpath option. It will correct and safe to use
+# on all platforms. Arguments are given as space separate classpath entries.
+# param 1 : A space separated list of classpath entries
+# The surrounding strip is needed to keep additional whitespace out
+PathList = \
+  "$(subst $(SPACE),$(PATH_SEP),$(strip $1))"
+
+################################################################################
 
 # Hook to include the corresponding custom file, if present.
 $(eval $(call IncludeCustomExtension, , common/MakeBase.gmk))
--- a/make/common/SetupJavaCompilers.gmk	Tue Sep 08 16:10:09 2015 +0200
+++ b/make/common/SetupJavaCompilers.gmk	Thu Sep 10 14:55:18 2015 -0700
@@ -78,7 +78,7 @@
     SERVER_DIR := $(SJAVAC_SERVER_DIR), \
     SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
 
-JDK_BOOTCLASSPATH := $(subst $(SPACE),$(PATH_SEP),\
+JDK_BOOTCLASSPATH := $(call PathList, \
     $(filter-out $(JDK_OUTPUTDIR)/modules/_%, $(wildcard $(JDK_OUTPUTDIR)/modules/*)))
 
 # After the jdk is built, we want to build demos using only the recently
@@ -88,7 +88,7 @@
 $(eval $(call SetupJavaCompiler,GENERATE_USINGJDKBYTECODE, \
     JVM := $(JAVA_SMALL), \
     JAVAC := $(NEW_JAVAC), \
-    FLAGS := -bootclasspath "$(JDK_BOOTCLASSPATH)" $(DISABLE_WARNINGS), \
+    FLAGS := -bootclasspath $(JDK_BOOTCLASSPATH) $(DISABLE_WARNINGS), \
     SERVER_DIR := $(SJAVAC_SERVER_DIR), \
     SERVER_JVM := $(SJAVAC_SERVER_JAVA)))