make/common/JavaCompilation.gmk
changeset 28909 58d622f06630
parent 28900 dd0303e8c9ce
parent 28906 741a25ba3b20
child 29438 6166fd4a617f
child 29174 fe55607529c3
equal deleted inserted replaced
28900:dd0303e8c9ce 28909:58d622f06630
    63   $(if $(16),$(error Internal makefile error: Too many arguments to SetupJavaCompiler, please update JavaCompilation.gmk))
    63   $(if $(16),$(error Internal makefile error: Too many arguments to SetupJavaCompiler, please update JavaCompilation.gmk))
    64   $(call EvalDebugWrapper,$(strip $1),$(call SetupJavaCompilerInner,$(strip $1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15)))
    64   $(call EvalDebugWrapper,$(strip $1),$(call SetupJavaCompilerInner,$(strip $1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15)))
    65 endef
    65 endef
    66 
    66 
    67 define SetupJavaCompilerInner
    67 define SetupJavaCompilerInner
    68   $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
    68   $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $(strip $($i)),$1_$(strip $($i)))$(NEWLINE))
    69   $(call LogSetupMacroEntry,SetupJavaCompiler($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
    69   $(call LogSetupMacroEntry,SetupJavaCompiler($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
    70   $(if $(16),$(error Internal makefile error: Too many arguments to SetupJavaCompiler, please update JavaCompilation.gmk))
    70   $(if $(16),$(error Internal makefile error: Too many arguments to SetupJavaCompiler, please update JavaCompilation.gmk))
    71 
    71 
    72   # The port file contains the tcp/ip on which the server listens
    72   # The port file contains the tcp/ip on which the server listens
    73   # and the cookie necessary to talk to the server.
    73   # and the cookie necessary to talk to the server.
    81 
    81 
    82 # Setup make rules for creating a jar archive.
    82 # Setup make rules for creating a jar archive.
    83 #
    83 #
    84 # Parameter 1 is the name of the rule. This name is used as variable prefix,
    84 # Parameter 1 is the name of the rule. This name is used as variable prefix,
    85 # and the targets generated are listed in a variable by that name.
    85 # and the targets generated are listed in a variable by that name.
       
    86 #
       
    87 # Parameter 2 is a list of dependencies for the jar target. If left empty,
       
    88 # dependencies are searched using SRCS, which should not be empty.
    86 #
    89 #
    87 # Remaining parameters are named arguments. These include:
    90 # Remaining parameters are named arguments. These include:
    88 #   SRCS:=List of directories in where to find files to add to archive
    91 #   SRCS:=List of directories in where to find files to add to archive
    89 #   SUFFIXES:=File suffixes to include in jar
    92 #   SUFFIXES:=File suffixes to include in jar
    90 #   INCLUDES:=List of directories/packages in SRCS that should be included
    93 #   INCLUDES:=List of directories/packages in SRCS that should be included
   104   $(call EvalDebugWrapper,$(strip $1),$(call SetupArchiveInner,$(strip $1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15)))
   107   $(call EvalDebugWrapper,$(strip $1),$(call SetupArchiveInner,$(strip $1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15)))
   105 endef
   108 endef
   106 
   109 
   107 define SetupArchiveInner
   110 define SetupArchiveInner
   108   # NOTE: $2 is dependencies, not a named argument!
   111   # NOTE: $2 is dependencies, not a named argument!
   109   $(foreach i,3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
   112   $(foreach i,3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $(strip $($i)),$1_$(strip $($i)))$(NEWLINE))
   110   $(call LogSetupMacroEntry,SetupArchive($1),<dependencies>,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
   113   $(call LogSetupMacroEntry,SetupArchive($1),<dependencies>,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
   111   $(if $(findstring $(LOG_LEVEL),trace), $(info *[2] <dependencies> = $(strip $2)))
   114   $(if $(findstring $(LOG_LEVEL),trace), $(info *[2] <dependencies> = $(strip $2)))
   112   $(if $(16),$(error Internal makefile error: Too many arguments to SetupArchive, please update JavaCompilation.gmk))
   115   $(if $(16),$(error Internal makefile error: Too many arguments to SetupArchive, please update JavaCompilation.gmk))
   113 
   116 
   114   $1_JARMAIN:=$(strip $$($1_JARMAIN))
   117   $1_JARMAIN:=$(strip $$($1_JARMAIN))
   436   $(if $(16),$(error Internal makefile error: Too many arguments to SetupJavaCompilation, please update JavaCompilation.gmk))
   439   $(if $(16),$(error Internal makefile error: Too many arguments to SetupJavaCompilation, please update JavaCompilation.gmk))
   437   $(call EvalDebugWrapper,$(strip $1),$(call SetupJavaCompilationInner,$(strip $1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15)))
   440   $(call EvalDebugWrapper,$(strip $1),$(call SetupJavaCompilationInner,$(strip $1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15)))
   438 endef
   441 endef
   439 
   442 
   440 define SetupJavaCompilationInner
   443 define SetupJavaCompilationInner
   441   $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
   444   $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $(strip $($i)),$1_$(strip $($i)))$(NEWLINE))
   442   $(call LogSetupMacroEntry,SetupJavaCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
   445   $(call LogSetupMacroEntry,SetupJavaCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
   443   $(if $(16),$(error Internal makefile error: Too many arguments to SetupJavaCompilation, please update JavaCompilation.gmk))
   446   $(if $(16),$(error Internal makefile error: Too many arguments to SetupJavaCompilation, please update JavaCompilation.gmk))
       
   447 
       
   448   # Verify arguments
       
   449   ifeq ($$($1_BIN),)
       
   450     $$(error Must specify BIN (in $1))
       
   451   endif
   444 
   452 
   445   # Extract the info from the java compiler setup.
   453   # Extract the info from the java compiler setup.
   446   $1_JVM := $$($$($1_SETUP)_JVM)
   454   $1_JVM := $$($$($1_SETUP)_JVM)
   447   $1_JAVAC := $$($$($1_SETUP)_JAVAC)
   455   $1_JAVAC := $$($$($1_SETUP)_JAVAC)
   448   $1_FLAGS := $$($$($1_SETUP)_FLAGS) $(JAVAC_FLAGS) $$($1_ADD_JAVAC_FLAGS)
   456   $1_FLAGS := $$($$($1_SETUP)_FLAGS) $(JAVAC_FLAGS) $$($1_ADD_JAVAC_FLAGS)