aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerikj <none@none>2013-04-09 09:45:48 +0200
committererikj <none@none>2013-04-09 09:45:48 +0200
commit72756c0956aedc879213a1a08de8ba08b6ece73b (patch)
treef5786849d1f601696a73053ee5f377189d7bb130
parent1c48d765c007ddf7df8c65655e826434698120a4 (diff)
8010465: Can't enable sjavac when building in jprt.
Reviewed-by: ohair, tbell
-rw-r--r--common/makefiles/JavaCompilation.gmk4
-rw-r--r--common/makefiles/Jprt.gmk3
-rw-r--r--common/makefiles/MakeBase.gmk10
-rw-r--r--common/makefiles/MakeHelpers.gmk22
4 files changed, 25 insertions, 14 deletions
diff --git a/common/makefiles/JavaCompilation.gmk b/common/makefiles/JavaCompilation.gmk
index bc13da5..4301cee 100644
--- a/common/makefiles/JavaCompilation.gmk
+++ b/common/makefiles/JavaCompilation.gmk
@@ -86,7 +86,7 @@ define SetupArchive
# 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 @@ define SetupJavaCompilation
--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) \
diff --git a/common/makefiles/Jprt.gmk b/common/makefiles/Jprt.gmk
index 938d436..c38dedc 100644
--- a/common/makefiles/Jprt.gmk
+++ b/common/makefiles/Jprt.gmk
@@ -103,6 +103,9 @@ endif
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
diff --git a/common/makefiles/MakeBase.gmk b/common/makefiles/MakeBase.gmk
index 5a54e38..3cbdf79 100644
--- a/common/makefiles/MakeBase.gmk
+++ b/common/makefiles/MakeBase.gmk
@@ -328,7 +328,7 @@ $(ECHO) $1/$(HGTIP_FILENAME)
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 @@ define SetupLogging
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 @@ $(eval $(call SetupLogging))
# 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
diff --git a/common/makefiles/MakeHelpers.gmk b/common/makefiles/MakeHelpers.gmk
index 81e1d69..aa49532 100644
--- a/common/makefiles/MakeHelpers.gmk
+++ b/common/makefiles/MakeHelpers.gmk
@@ -184,26 +184,34 @@ define ParseLogLevel
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.