2 # Copyright (C) 2008 The Android Open Source Project
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
17 # Users can define base-rules-hook in their buildspec.mk to perform
18 # arbitrary operations as each module is included.
20 $(if $(base-rules-hook),)
23 ###########################################################
24 ## Common instructions for a generic module.
25 ###########################################################
27 LOCAL_MODULE := $(strip $(LOCAL_MODULE))
28 ifeq ($(LOCAL_MODULE),)
29 $(error $(LOCAL_PATH): LOCAL_MODULE is not defined)
32 LOCAL_IS_HOST_MODULE := $(strip $(LOCAL_IS_HOST_MODULE))
33 ifdef LOCAL_IS_HOST_MODULE
34 ifneq ($(LOCAL_IS_HOST_MODULE),true)
35 $(error $(LOCAL_PATH): LOCAL_IS_HOST_MODULE must be "true" or empty, not "$(LOCAL_IS_HOST_MODULE)")
44 ###########################################################
45 ## Validate and define fallbacks for input LOCAL_* variables.
46 ###########################################################
48 ## Dump a .csv file of all modules and their tags
49 #ifneq ($(tag-list-first-time),false)
50 #$(shell rm -f tag-list.csv)
51 #tag-list-first-time := false
55 #space := $(empty) $(empty)
56 #$(shell echo $(lastword $(filter-out config/% out/%,$(MAKEFILE_LIST))),$(LOCAL_MODULE),$(strip $(LOCAL_MODULE_CLASS)),$(subst $(space),$(comma),$(sort $(LOCAL_MODULE_TAGS))) >> tag-list.csv)
58 LOCAL_MODULE_TAGS := $(sort $(LOCAL_MODULE_TAGS))
59 ifeq (,$(LOCAL_MODULE_TAGS))
60 # Modules without tags fall back to user (which is changed to user eng below)
61 LOCAL_MODULE_TAGS := user
62 #$(warning default tags: $(lastword $(filter-out config/% out/%,$(MAKEFILE_LIST))))
65 # Only the tags mentioned in this test are expected to be set by module
66 # makefiles. Anything else is either a typo or a source of unexpected
68 ifneq ($(filter-out user debug eng tests optional samples,$(LOCAL_MODULE_TAGS)),)
69 $(warning unusual tags $(LOCAL_MODULE_TAGS) on $(LOCAL_MODULE) at $(LOCAL_PATH))
74 # If the local directory or one of its parents contains a MODULE_LICENSE_GPL
75 # file, tag the module as "gnu". Search for "*_GNU*" so that we can also
76 # find files like MODULE_LICENSE_GPL_AND_AFL but exclude files like
77 # MODULE_LICENSE_LGPL.
79 ifneq ($(call find-parent-file,$(LOCAL_PATH),MODULE_LICENSE*_GPL*),)
80 LOCAL_MODULE_TAGS += gnu
84 # If this module is listed on CUSTOM_MODULES, promote it to "user"
85 # so that it will be installed in $(TARGET_OUT).
87 ifneq (,$(filter $(LOCAL_MODULE),$(CUSTOM_MODULES)))
88 LOCAL_MODULE_TAGS := $(sort $(LOCAL_MODULE_TAGS) user)
91 # The definition of should-install-to-system will be different depending
92 # on which goal (e.g., sdk or just droid) is being built.
93 ifdef LOCAL_IS_HOST_MODULE
96 use_data := $(if $(call should-install-to-system,$(LOCAL_MODULE_TAGS)),,_DATA)
99 LOCAL_MODULE_CLASS := $(strip $(LOCAL_MODULE_CLASS))
100 ifneq ($(words $(LOCAL_MODULE_CLASS)),1)
101 $(error $(LOCAL_PATH): LOCAL_MODULE_CLASS must contain exactly one word, not "$(LOCAL_MODULE_CLASS)")
104 # Those used to be implicitly ignored, but aren't any more.
105 # As of 20100110 there are no apps with the user tag.
106 ifeq ($(LOCAL_MODULE_CLASS),APPS)
107 ifneq ($(filter $(LOCAL_MODULE_TAGS),user),)
108 $(warning user tag on app $(LOCAL_MODULE) at $(LOCAL_PATH) - add your app to core.mk instead)
112 LOCAL_MODULE_PATH := $(strip $(LOCAL_MODULE_PATH))
113 ifeq ($(LOCAL_MODULE_PATH),)
114 LOCAL_MODULE_PATH := $($(my_prefix)OUT$(use_data)_$(LOCAL_MODULE_CLASS))
115 ifeq ($(strip $(LOCAL_MODULE_PATH)),)
116 $(error $(LOCAL_PATH): unhandled LOCAL_MODULE_CLASS "$(LOCAL_MODULE_CLASS)")
120 ifneq ($(strip $(LOCAL_BUILT_MODULE)$(LOCAL_INSTALLED_MODULE)),)
121 $(error $(LOCAL_PATH): LOCAL_BUILT_MODULE and LOCAL_INSTALLED_MODULE must not be defined by component makefiles)
124 # Make sure that this IS_HOST/CLASS/MODULE combination is unique.
125 module_id := MODULE.$(if \
126 $(LOCAL_IS_HOST_MODULE),HOST,TARGET).$(LOCAL_MODULE_CLASS).$(LOCAL_MODULE)
128 $(error $(LOCAL_PATH): $(module_id) already defined by $($(module_id)))
130 $(module_id) := $(LOCAL_PATH)
132 intermediates := $(call local-intermediates-dir)
133 intermediates.COMMON := $(call local-intermediates-dir,COMMON)
135 ###########################################################
136 # Pick a name for the intermediate and final targets
137 ###########################################################
138 LOCAL_MODULE_STEM := $(strip $(LOCAL_MODULE_STEM))
139 ifeq ($(LOCAL_MODULE_STEM),)
140 LOCAL_MODULE_STEM := $(LOCAL_MODULE)
142 LOCAL_INSTALLED_MODULE_STEM := $(LOCAL_MODULE_STEM)$(LOCAL_MODULE_SUFFIX)
144 LOCAL_BUILT_MODULE_STEM := $(strip $(LOCAL_BUILT_MODULE_STEM))
145 ifeq ($(LOCAL_BUILT_MODULE_STEM),)
146 LOCAL_BUILT_MODULE_STEM := $(LOCAL_INSTALLED_MODULE_STEM)
149 # OVERRIDE_BUILT_MODULE_PATH is only allowed to be used by the
150 # internal SHARED_LIBRARIES build files.
151 OVERRIDE_BUILT_MODULE_PATH := $(strip $(OVERRIDE_BUILT_MODULE_PATH))
152 ifdef OVERRIDE_BUILT_MODULE_PATH
153 ifneq ($(LOCAL_MODULE_CLASS),SHARED_LIBRARIES)
154 $(error $(LOCAL_PATH): Illegal use of OVERRIDE_BUILT_MODULE_PATH)
156 built_module_path := $(OVERRIDE_BUILT_MODULE_PATH)
158 built_module_path := $(intermediates)
160 LOCAL_BUILT_MODULE := $(built_module_path)/$(LOCAL_BUILT_MODULE_STEM)
163 # LOCAL_UNINSTALLABLE_MODULE is only allowed to be used by the
164 # internal STATIC_LIBRARIES build files.
165 LOCAL_UNINSTALLABLE_MODULE := $(strip $(LOCAL_UNINSTALLABLE_MODULE))
166 ifdef LOCAL_UNINSTALLABLE_MODULE
167 ifeq (,$(filter $(LOCAL_MODULE_CLASS),JAVA_LIBRARIES STATIC_LIBRARIES))
168 $(error $(LOCAL_PATH): Illegal use of LOCAL_UNINSTALLABLE_MODULE)
171 LOCAL_INSTALLED_MODULE := $(LOCAL_MODULE_PATH)/$(LOCAL_MODULE_SUBDIR)$(LOCAL_INSTALLED_MODULE_STEM)
174 # Assemble the list of targets to create PRIVATE_ variables for.
175 LOCAL_INTERMEDIATE_TARGETS += $(LOCAL_BUILT_MODULE)
178 ###########################################################
179 ## AIDL: Compile .aidl files to .java
180 ###########################################################
182 aidl_sources := $(filter %.aidl,$(LOCAL_SRC_FILES))
184 ifneq ($(strip $(aidl_sources)),)
186 aidl_java_sources := $(patsubst %.aidl,%.java,$(addprefix $(intermediates.COMMON)/src/, $(aidl_sources)))
187 aidl_sources := $(addprefix $(TOP_DIR)$(LOCAL_PATH)/, $(aidl_sources))
189 aidl_preprocess_import :=
190 LOCAL_SDK_VERSION:=$(strip $(LOCAL_SDK_VERSION))
191 ifdef LOCAL_SDK_VERSION
192 ifneq ($(LOCAL_SDK_VERSION),current)
193 aidl_preprocess_import := -p$(TOPDIR)prebuilt/sdk/$(LOCAL_SDK_VERSION)/framework.aidl
195 endif # LOCAL_SDK_VERSION
196 $(aidl_java_sources): PRIVATE_AIDL_FLAGS := -b $(aidl_preprocess_import) -I$(LOCAL_PATH) -I$(LOCAL_PATH)/src $(addprefix -I,$(LOCAL_AIDL_INCLUDES))
198 $(aidl_java_sources): $(intermediates.COMMON)/src/%.java: $(TOPDIR)$(LOCAL_PATH)/%.aidl $(PRIVATE_ADDITIONAL_DEPENDENCIES) $(AIDL)
199 $(transform-aidl-to-java)
200 -include $(aidl_java_sources:%.java=%.P)
206 ###########################################################
207 ## logtags: Add .logtags files to global list, emit java source
208 ###########################################################
210 logtags_sources := $(filter %.logtags,$(LOCAL_SRC_FILES))
212 ifneq ($(strip $(logtags_sources)),)
214 event_log_tags := $(addprefix $(LOCAL_PATH)/,$(logtags_sources))
216 # Emit a java source file with constants for the tags, if
217 # LOCAL_MODULE_CLASS is "APPS" or "JAVA_LIBRARIES".
218 ifneq ($(strip $(filter $(LOCAL_MODULE_CLASS),APPS JAVA_LIBRARIES)),)
220 logtags_java_sources := $(patsubst %.logtags,%.java,$(addprefix $(intermediates.COMMON)/src/, $(logtags_sources)))
221 logtags_sources := $(addprefix $(TOP_DIR)$(LOCAL_PATH)/, $(logtags_sources))
223 $(logtags_java_sources): $(intermediates.COMMON)/src/%.java: $(TOPDIR)$(LOCAL_PATH)/%.logtags $(TARGET_OUT)/etc/event-log-tags
224 $(transform-logtags-to-java)
229 logtags_java_sources :=
233 ###########################################################
234 ## Java: Compile .java files to .class
235 ###########################################################
236 #TODO: pull this into java.make once host and target are combined
238 java_sources := $(addprefix $(TOP_DIR)$(LOCAL_PATH)/, $(filter %.java,$(LOCAL_SRC_FILES))) $(aidl_java_sources) $(logtags_java_sources)
239 all_java_sources := $(java_sources) $(addprefix $($(my_prefix)OUT_COMMON_INTERMEDIATES)/, $(filter %.java,$(LOCAL_INTERMEDIATE_SOURCES)))
241 ## Java resources #########################################
243 # Look for resource files in any specified directories.
244 # Non-java and non-doc files will be picked up as resources
245 # and included in the output jar file.
246 java_resource_file_groups :=
248 LOCAL_JAVA_RESOURCE_DIRS := $(strip $(LOCAL_JAVA_RESOURCE_DIRS))
249 ifneq ($(LOCAL_JAVA_RESOURCE_DIRS),)
250 # This makes a list of words like
251 # <dir1>::<file1>:<file2> <dir2>::<file1> <dir3>:
252 # where each of the files is relative to the directory it's grouped with.
253 # Directories that don't contain any resource files will result in groups
254 # that end with a colon, and they are stripped out in the next step.
255 java_resource_file_groups += \
256 $(foreach dir,$(LOCAL_JAVA_RESOURCE_DIRS), \
257 $(subst $(space),:,$(strip \
258 $(TOP_DIR)$(LOCAL_PATH)/$(dir): \
259 $(patsubst ./%,%,$(shell cd $(TOP_DIR)$(LOCAL_PATH)/$(dir) && \
261 -type d -a -name ".svn" -prune -o \
263 -a \! -name "*.java" \
264 -a \! -name "package.html" \
265 -a \! -name "overview.html" \
266 -a \! -name ".*.swp" \
267 -a \! -name ".DS_Store" \
273 java_resource_file_groups := $(filter-out %:,$(java_resource_file_groups))
274 endif # LOCAL_JAVA_RESOURCE_DIRS
276 LOCAL_JAVA_RESOURCE_FILES := $(strip $(LOCAL_JAVA_RESOURCE_FILES))
277 ifneq ($(LOCAL_JAVA_RESOURCE_FILES),)
278 java_resource_file_groups += \
279 $(foreach f,$(LOCAL_JAVA_RESOURCE_FILES), \
280 $(patsubst %/,%,$(dir $(f)))::$(notdir $(f)) \
282 endif # LOCAL_JAVA_RESOURCE_FILES
284 ifdef java_resource_file_groups
285 # The full paths to all resources, used for dependencies.
286 java_resource_sources := \
287 $(foreach group,$(java_resource_file_groups), \
288 $(addprefix $(word 1,$(subst :,$(space),$(group)))/, \
289 $(wordlist 2,9999,$(subst :,$(space),$(group))) \
292 # The arguments to jar that will include these files in a jar file.
294 $(foreach group,$(java_resource_file_groups), \
295 $(addprefix -C $(word 1,$(subst :,$(space),$(group))) , \
296 $(wordlist 2,9999,$(subst :,$(space),$(group))) \
299 java_resource_file_groups :=
301 java_resource_sources :=
303 endif # java_resource_file_groups
305 ## PRIVATE java vars ######################################
307 ifneq ($(strip $(all_java_sources)$(all_res_assets)),)
309 full_static_java_libs := \
310 $(foreach lib,$(LOCAL_STATIC_JAVA_LIBRARIES), \
311 $(call intermediates-dir-for, \
312 JAVA_LIBRARIES,$(lib),$(LOCAL_IS_HOST_MODULE))/javalib.jar)
314 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_INSTALL_DIR := $(dir $(LOCAL_INSTALLED_MODULE))
315 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CLASS_INTERMEDIATES_DIR := $(intermediates)/classes
316 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_SOURCE_INTERMEDIATES_DIR := $(intermediates)/src
317 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JAVA_SOURCES := $(all_java_sources)
318 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JAVA_OBJECTS := $(patsubst %.java,%.class,$(LOCAL_SRC_FILES))
319 ifeq ($(my_prefix),TARGET_)
320 ifeq ($(LOCAL_SDK_VERSION),)
321 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(call java-lib-files,core)
324 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_RESOURCE_DIR := $(LOCAL_RESOURCE_DIR)
325 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_EXTRA_JAR_ARGS := $(extra_jar_args)
326 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_ASSET_DIR := $(LOCAL_ASSET_DIR)
327 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_STATIC_JAVA_LIBRARIES := $(full_static_java_libs)
329 # full_java_libs: The list of files that should be used as the classpath.
330 # Using this list as a dependency list WILL NOT WORK.
331 # full_java_lib_deps: Should be specified as a prerequisite of this module
332 # to guarantee that the files in full_java_libs will
334 ifdef LOCAL_IS_HOST_MODULE
335 # TODO: make prebuilt java libraries use the same
336 # intermediates path pattern as target java libraries.
337 full_java_libs := $(addprefix $(HOST_OUT_JAVA_LIBRARIES)/,$(addsuffix $(COMMON_JAVA_PACKAGE_SUFFIX),$(LOCAL_JAVA_LIBRARIES)))
338 full_java_lib_deps := $(full_java_libs)
340 ifdef LOCAL_SDK_VERSION
341 ifneq ($(LOCAL_SDK_VERSION),current)
342 full_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
343 # For prebuilt sdk versions, we can't depend on the javalib.jar but classes.jar.
344 full_java_lib_deps := $(call java-lib-deps,$(filter-out sdk_v$(LOCAL_SDK_VERSION),$(LOCAL_JAVA_LIBRARIES)),$(LOCAL_IS_HOST_MODULE))
345 full_java_lib_deps += $(call java-lib-files,sdk_v$(LOCAL_SDK_VERSION),$(LOCAL_IS_HOST_MODULE))
347 full_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
348 full_java_lib_deps := $(call java-lib-deps,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
351 full_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
352 full_java_lib_deps := $(call java-lib-deps,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE))
353 endif # LOCAL_SDK_VERSION
354 endif # !LOCAL_IS_HOST_MODULE
355 full_java_libs += $(full_static_java_libs) $(LOCAL_CLASSPATH)
356 full_java_lib_deps += $(full_static_java_libs) $(LOCAL_CLASSPATH)
358 # This is set by packages that contain instrumentation, allowing them to
359 # link against the package they are instrumenting. Currently only one such
360 # package is allowed.
361 LOCAL_INSTRUMENTATION_FOR := $(strip $(LOCAL_INSTRUMENTATION_FOR))
362 ifdef LOCAL_INSTRUMENTATION_FOR
363 ifneq ($(words $(LOCAL_INSTRUMENTATION_FOR)),1)
365 $(LOCAL_PATH): Multiple LOCAL_INSTRUMENTATION_FOR members defined)
368 link_instr_intermediates_dir := $(call intermediates-dir-for, \
369 APPS,$(LOCAL_INSTRUMENTATION_FOR))
370 link_instr_intermediates_dir.COMMON := $(call intermediates-dir-for, \
371 APPS,$(LOCAL_INSTRUMENTATION_FOR),,COMMON)
373 # link against the jar with full original names (before proguard processing).
374 full_java_libs += $(link_instr_intermediates_dir.COMMON)/classes-full-names.jar
376 # We can't depend on the .jar file, so we depend on something that
377 # depends on the jar file; the final built package file.
378 full_java_lib_deps += $(link_instr_intermediates_dir)/package.apk
381 ifneq ($(strip $(LOCAL_JAR_MANIFEST)),)
382 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JAR_MANIFEST := $(LOCAL_PATH)/$(LOCAL_JAR_MANIFEST)
384 $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JAR_MANIFEST :=
390 ###########################################################
391 ## make clean- targets
392 ###########################################################
393 cleantarget := clean-$(LOCAL_MODULE)
394 $(cleantarget) : PRIVATE_MODULE := $(LOCAL_MODULE)
395 $(cleantarget) : PRIVATE_CLEAN_FILES := \
396 $(PRIVATE_CLEAN_FILES) \
397 $(LOCAL_BUILT_MODULE) \
398 $(LOCAL_INSTALLED_MODULE) \
401 @echo "Clean: $(PRIVATE_MODULE)"
402 $(hide) rm -rf $(PRIVATE_CLEAN_FILES)
404 ###########################################################
405 ## Common definitions for module.
406 ###########################################################
408 # Propagate local configuration options to this target.
409 $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_PATH:=$(LOCAL_PATH)
410 $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_POST_PROCESS_COMMAND:= $(LOCAL_POST_PROCESS_COMMAND)
411 $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_AAPT_FLAGS:= $(LOCAL_AAPT_FLAGS)
412 $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_JAVA_LIBRARIES:= $(LOCAL_JAVA_LIBRARIES)
413 $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_MANIFEST_PACKAGE_NAME:= $(LOCAL_MANIFEST_PACKAGE_NAME)
415 $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_ALL_JAVA_LIBRARIES:= $(full_java_libs)
416 $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_IS_HOST_MODULE := $(LOCAL_IS_HOST_MODULE)
417 $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_HOST:= $(my_host)
419 $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_INTERMEDIATES_DIR:= $(intermediates)
421 # Tell the module and all of its sub-modules who it is.
422 $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_MODULE:= $(LOCAL_MODULE)
424 # Provide a short-hand for building this module.
425 # We name both BUILT and INSTALLED in case
426 # LOCAL_UNINSTALLABLE_MODULE is set.
427 .PHONY: $(LOCAL_MODULE)
428 $(LOCAL_MODULE): $(LOCAL_BUILT_MODULE) $(LOCAL_INSTALLED_MODULE)
430 ###########################################################
431 ## Module installation rule
432 ###########################################################
434 # Some hosts do not have ACP; override the LOCAL version if that's the case.
435 ifneq ($(strip $(HOST_ACP_UNAVAILABLE)),)
436 LOCAL_ACP_UNAVAILABLE := $(strip $(HOST_ACP_UNAVAILABLE))
439 ifndef LOCAL_UNINSTALLABLE_MODULE
440 # Define a copy rule to install the module.
441 # acp and libraries that it uses can't use acp for
442 # installation; hence, LOCAL_ACP_UNAVAILABLE.
443 ifneq ($(LOCAL_ACP_UNAVAILABLE),true)
444 $(LOCAL_INSTALLED_MODULE): $(LOCAL_BUILT_MODULE) | $(ACP)
446 $(copy-file-to-target)
448 $(LOCAL_INSTALLED_MODULE): $(LOCAL_BUILT_MODULE)
450 $(copy-file-to-target-with-cp)
453 endif # !LOCAL_UNINSTALLABLE_MODULE
456 ###########################################################
458 ###########################################################
460 # If nobody has defined a more specific module for the
461 # checked modules, use LOCAL_BUILT_MODULE. This was old
462 # behavior, so it should be a safe default.
463 ifndef LOCAL_CHECKED_MODULE
464 ifndef LOCAL_SDK_VERSION
465 LOCAL_CHECKED_MODULE := $(LOCAL_BUILT_MODULE)
469 # If they request that this module not be checked, then don't.
470 # PLEASE DON'T SET THIS. ANY PLACES THAT SET THIS WITHOUT
471 # GOOD REASON WILL HAVE IT REMOVED.
472 ifdef LOCAL_DONT_CHECK_MODULE
473 LOCAL_CHECKED_MODULE :=
476 ###########################################################
477 ## Register with ALL_MODULES
478 ###########################################################
480 ALL_MODULES += $(LOCAL_MODULE)
482 # Don't use += on subvars, or else they'll end up being
483 # recursively expanded.
484 ALL_MODULES.$(LOCAL_MODULE).PATH := \
485 $(ALL_MODULES.$(LOCAL_MODULE).PATH) $(LOCAL_PATH)
486 ALL_MODULES.$(LOCAL_MODULE).TAGS := \
487 $(ALL_MODULES.$(LOCAL_MODULE).TAGS) $(LOCAL_MODULE_TAGS)
488 ALL_MODULES.$(LOCAL_MODULE).CHECKED := \
489 $(ALL_MODULES.$(LOCAL_MODULE).CHECKED) $(LOCAL_CHECKED_MODULE)
490 ALL_MODULES.$(LOCAL_MODULE).BUILT := \
491 $(ALL_MODULES.$(LOCAL_MODULE).BUILT) $(LOCAL_BUILT_MODULE)
492 ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \
493 $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(LOCAL_INSTALLED_MODULE)
494 ALL_MODULES.$(LOCAL_MODULE).REQUIRED := \
495 $(ALL_MODULES.$(LOCAL_MODULE).REQUIRED) $(LOCAL_REQUIRED_MODULES)
496 ALL_MODULES.$(LOCAL_MODULE).EVENT_LOG_TAGS := \
497 $(ALL_MODULES.$(LOCAL_MODULE).EVENT_LOG_TAGS) $(event_log_tags)
499 ###########################################################
500 ## Take care of LOCAL_MODULE_TAGS
501 ###########################################################
503 # Keep track of all the tags we've seen.
504 ALL_MODULE_TAGS := $(sort $(ALL_MODULE_TAGS) $(LOCAL_MODULE_TAGS))
506 # Add this module to the tag list of each specified tag.
507 # Don't use "+=". If the variable hasn't been set with ":=",
508 # it will default to recursive expansion.
509 $(foreach tag,$(LOCAL_MODULE_TAGS),\
510 $(eval ALL_MODULE_TAGS.$(tag) := \
511 $(ALL_MODULE_TAGS.$(tag)) \
512 $(LOCAL_INSTALLED_MODULE)))
514 # Add this module name to the tag list of each specified tag.
515 $(foreach tag,$(LOCAL_MODULE_TAGS),\
516 $(eval ALL_MODULE_NAME_TAGS.$(tag) += $(LOCAL_MODULE)))
518 ###########################################################
520 ###########################################################
522 include $(BUILD_SYSTEM)/notice_files.mk