--- old/make/common/JavaCompilation.gmk 2015-01-15 16:21:03.709791588 +0100 +++ new/make/common/JavaCompilation.gmk 2015-01-15 16:21:03.593791586 +0100 @@ -65,7 +65,7 @@ endef define SetupJavaCompilerInner - $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE)) + $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $(strip $($i)),$1_$(strip $($i)))$(NEWLINE)) $(call LogSetupMacroEntry,SetupJavaCompiler($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15)) $(if $(16),$(error Internal makefile error: Too many arguments to SetupJavaCompiler, please update JavaCompilation.gmk)) @@ -84,6 +84,9 @@ # Parameter 1 is the name of the rule. This name is used as variable prefix, # and the targets generated are listed in a variable by that name. # +# Parameter 2 is a list of dependencies for the jar target. If left empty, +# dependencies are searched using SRCS, which should not be empty. +# # Remaining parameters are named arguments. These include: # SRCS:=List of directories in where to find files to add to archive # SUFFIXES:=File suffixes to include in jar @@ -106,7 +109,7 @@ define SetupArchiveInner # 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)) + $(foreach i,3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $(strip $($i)),$1_$(strip $($i)))$(NEWLINE)) $(call LogSetupMacroEntry,SetupArchive($1),,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15)) $(if $(findstring $(LOG_LEVEL),trace), $(info *[2] = $(strip $2))) $(if $(16),$(error Internal makefile error: Too many arguments to SetupArchive, please update JavaCompilation.gmk)) @@ -413,10 +416,15 @@ endef define SetupJavaCompilationInner - $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE)) + $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $(strip $($i)),$1_$(strip $($i)))$(NEWLINE)) $(call LogSetupMacroEntry,SetupJavaCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15)) $(if $(16),$(error Internal makefile error: Too many arguments to SetupJavaCompilation, please update JavaCompilation.gmk)) + # Verify arguments + ifeq ($$($1_BIN),) + $$(error Must specify BIN (in $1)) + endif + # Extract the info from the java compiler setup. $1_JVM := $$($$($1_SETUP)_JVM) $1_JAVAC := $$($$($1_SETUP)_JAVAC)