changeset 671:2ef28c12d649

8010465: Can't enable sjavac when building in jprt. Reviewed-by: ohair, tbell
author erikj
date Tue, 09 Apr 2013 09:45:48 +0200
parents 2f43964043c2
children a09e9c9ca963
files common/makefiles/JavaCompilation.gmk common/makefiles/Jprt.gmk common/makefiles/MakeBase.gmk common/makefiles/MakeHelpers.gmk
diffstat 4 files changed, 25 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/common/makefiles/JavaCompilation.gmk	Tue Apr 09 09:42:20 2013 +0200
+++ b/common/makefiles/JavaCompilation.gmk	Tue Apr 09 09:45:48 2013 +0200
@@ -86,7 +86,7 @@
     # NOTE: $2 is dependencies, not a named argument!
     $(foreach i,3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
     $(call LogSetupMacroEntry,SetupArchive($1),<dependencies>,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
-    $(if $(findstring $(LOG),debug trace), $(info *[2] <dependencies> = $(strip $2)))
+    $(if $(findstring $(LOG_LEVEL),debug trace), $(info *[2] <dependencies> = $(strip $2)))
     $(if $(16),$(error Internal makefile error: Too many arguments to SetupArchive, please update JavaCompilation.gmk))
 
     $1_JARMAIN:=$(strip $$($1_JARMAIN))
@@ -505,7 +505,7 @@
 			--permit-unidentified-artifacts \
 			--permit-sources-without-package \
 			--compare-found-sources $$($1_BIN)/_the.batch.tmp \
-			--log=$(LOG) \
+			--log=$(LOG_LEVEL) \
 			$$($1_SJAVAC_ARGS) \
 			$$($1_FLAGS) \
 			$$($1_HEADERS_ARG) \
--- a/common/makefiles/Jprt.gmk	Tue Apr 09 09:42:20 2013 +0200
+++ b/common/makefiles/Jprt.gmk	Tue Apr 09 09:45:48 2013 +0200
@@ -103,6 +103,9 @@
 ifdef ALT_FREETYPE_HEADERS_PATH
 	@$(ECHO) " --with-freetype=$(call UnixPath,$(ALT_FREETYPE_HEADERS_PATH)/..) " >> $@.tmp
 endif
+ifdef ENABLE_SJAVAC
+	@$(ECHO) " --enable-sjavac" >> $@.tmp
+endif
 ifeq ($(HOTSPOT_AVAILABLE),false)
   ifdef ALT_JDK_IMPORT_PATH
 	@$(ECHO) " --with-import-hotspot=$(call UnixPath,$(ALT_JDK_IMPORT_PATH)) " >> $@.tmp
--- a/common/makefiles/MakeBase.gmk	Tue Apr 09 09:42:20 2013 +0200
+++ b/common/makefiles/MakeBase.gmk	Tue Apr 09 09:45:48 2013 +0200
@@ -328,7 +328,7 @@
 endef
 
 define SetupLogging
-    ifeq ($$(LOG), trace)
+    ifeq ($$(LOG_LEVEL),trace)
         # Shell redefinition trick inspired by http://www.cmcrossroads.com/ask-mr-make/6535-tracing-rule-execution-in-gnu-make
         # For each target executed, will print
         # Building <TARGET> (from <FIRST PREREQUISITE>) (<ALL NEWER PREREQUISITES> newer)
@@ -339,17 +339,17 @@
     endif
     # Never remove warning messages; this is just for completeness
     LOG_WARN= 
-    ifneq ($$(findstring $$(LOG),info debug trace),)
+    ifneq ($$(findstring $$(LOG_LEVEL),info debug trace),)
         LOG_INFO=
     else
         LOG_INFO=> /dev/null
     endif
-    ifneq ($$(findstring $$(LOG),debug trace),)
+    ifneq ($$(findstring $$(LOG_LEVEL),debug trace),)
         LOG_DEBUG=
     else
         LOG_DEBUG=> /dev/null
     endif
-    ifneq ($$(findstring $$(LOG),trace),)
+    ifneq ($$(findstring $$(LOG_LEVEL),trace),)
         LOG_TRACE=
     else
         LOG_TRACE=> /dev/null
@@ -362,7 +362,7 @@
 # This is to be called by all SetupFoo macros
 define LogSetupMacroEntry
     $(if $(26),$(error Internal makefile error: Too many arguments to LogSetupMacroEntry, please update MakeBase.gmk))
-    $(if $(findstring $(LOG),debug trace), $(info $1 $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25,$(if $($i),$(NEWLINE) $(strip [$i] $($i))))))
+    $(if $(findstring $(LOG_LEVEL),debug trace), $(info $1 $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25,$(if $($i),$(NEWLINE) $(strip [$i] $($i))))))
 endef
 
 # Make directory without forking mkdir if not needed
--- a/common/makefiles/MakeHelpers.gmk	Tue Apr 09 09:42:20 2013 +0200
+++ b/common/makefiles/MakeHelpers.gmk	Tue Apr 09 09:45:48 2013 +0200
@@ -184,26 +184,34 @@
           LOG_STRIPPED2=$$(subst nofile,,$$(LOG_STRIPPED1))
           # We might have ended up with a leading comma. Remove it
           LOG_STRIPPED3=$$(strip $$(patsubst $$(COMMA)%,%,$$(LOG_STRIPPED2)))
-          override LOG:=$$(LOG_STRIPPED3)
+          LOG_LEVEL:=$$(LOG_STRIPPED3)
+        else
+          LOG_LEVEL:=$$(LOG)
         endif
 
-        ifeq ($$(LOG),)
+        ifeq ($$(LOG_LEVEL),)
             # Set LOG to "warn" as default if not set (and no VERBOSE given)
-            override LOG=warn
+            override LOG_LEVEL=warn
         endif
-        ifeq ($$(LOG),warn)
+        ifeq ($$(LOG_LEVEL),warn)
             VERBOSE=-s
-        else ifeq ($$(LOG),info)
+        else ifeq ($$(LOG_LEVEL),info)
             VERBOSE=-s
-        else ifeq ($$(LOG),debug)
+        else ifeq ($$(LOG_LEVEL),debug)
             VERBOSE=
-        else ifeq ($$(LOG),trace)
+        else ifeq ($$(LOG_LEVEL),trace)
             VERBOSE=
         else
             $$(info Error: LOG must be one of: warn, info, debug or trace.)
             $$(eval $$(call FatalError))
         endif
     else
+        # Provide resonable interpretations of LOG_LEVEL if VERBOSE is given.
+        ifeq ($(VERBOSE),)
+            LOG_LEVEL:=debug
+        else
+            LOG_LEVEL:=warn
+        endif
         ifneq ($$(LOG),)
             # We have both a VERBOSE and a LOG argument. This is OK only if this is a repeated call by ourselves,
             # but complain if this is the top-level make call.