141 # transfered in make variables. When the macro is run in a different makefile than the |
141 # transfered in make variables. When the macro is run in a different makefile than the |
142 # java compilation, the dependencies need to be found in the filesystem. |
142 # java compilation, the dependencies need to be found in the filesystem. |
143 ifneq (,$2) |
143 ifneq (,$2) |
144 $1_DEPS:=$2 |
144 $1_DEPS:=$2 |
145 else |
145 else |
|
146 # Add all source roots to the find cache since we are likely going to run find |
|
147 # on these more than once. The cache will only be updated if necessary. |
|
148 $$(eval $$(call FillCacheFind, $$($1_FIND_LIST))) |
146 $1_DEPS:=$$(filter $$(addprefix %,$$($1_SUFFIXES)), \ |
149 $1_DEPS:=$$(filter $$(addprefix %,$$($1_SUFFIXES)), \ |
147 $$(call CacheFind,$$($1_SRCS))) |
150 $$(call CacheFind,$$($1_SRCS))) |
148 ifneq (,$$($1_GREP_INCLUDE_PATTERNS)) |
151 ifneq (,$$($1_GREP_INCLUDE_PATTERNS)) |
149 $1_DEPS:=$$(filter $$(addsuffix %,$$($1_GREP_INCLUDE_PATTERNS)),$$($1_DEPS)) |
152 $1_DEPS:=$$(filter $$(addsuffix %,$$($1_GREP_INCLUDE_PATTERNS)),$$($1_DEPS)) |
150 endif |
153 endif |
422 # Handle addons and overrides. |
425 # Handle addons and overrides. |
423 $1_SRC:=$$(call ADD_SRCS,$$($1_SRC)) |
426 $1_SRC:=$$(call ADD_SRCS,$$($1_SRC)) |
424 # Make sure the dirs exist. |
427 # Make sure the dirs exist. |
425 $$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupJavaCompilation $1 contains missing directory $$d))) |
428 $$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupJavaCompilation $1 contains missing directory $$d))) |
426 $$(eval $$(call MakeDir,$$($1_BIN))) |
429 $$(eval $$(call MakeDir,$$($1_BIN))) |
|
430 # Add all source roots to the find cache since we are likely going to run find |
|
431 # on these more than once. The cache will only be updated if necessary. |
|
432 $$(eval $$(call FillCacheFind,$$($1_SRC))) |
427 # Find all files in the source trees. |
433 # Find all files in the source trees. |
428 $1_ALL_SRCS += $$(filter-out $(OVR_SRCS),$$(call CacheFind,$$($1_SRC))) |
434 $1_ALL_SRCS += $$(filter-out $(OVR_SRCS),$$(call CacheFind,$$($1_SRC))) |
429 # Extract the java files. |
435 # Extract the java files. |
430 ifneq ($$($1_EXCLUDE_FILES),) |
436 ifneq ($$($1_EXCLUDE_FILES),) |
431 $1_EXCLUDE_FILES_PATTERN:=$$(addprefix %,$$($1_EXCLUDE_FILES)) |
437 $1_EXCLUDE_FILES_PATTERN:=$$(addprefix %,$$($1_EXCLUDE_FILES)) |