The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2008 The Android Open Source Project |
| 3 | # |
| 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 |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 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. |
| 15 | # |
| 16 | |
| 17 | # Users can define base-rules-hook in their buildspec.mk to perform |
| 18 | # arbitrary operations as each module is included. |
| 19 | ifdef base-rules-hook |
| 20 | $(if $(base-rules-hook),) |
| 21 | endif |
| 22 | |
| 23 | ########################################################### |
| 24 | ## Common instructions for a generic module. |
| 25 | ########################################################### |
| 26 | |
| 27 | LOCAL_MODULE := $(strip $(LOCAL_MODULE)) |
| 28 | ifeq ($(LOCAL_MODULE),) |
| 29 | $(error $(LOCAL_PATH): LOCAL_MODULE is not defined) |
| 30 | endif |
| 31 | |
| 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)") |
| 36 | endif |
| 37 | my_prefix:=HOST_ |
| 38 | my_host:=host- |
| 39 | else |
| 40 | my_prefix:=TARGET_ |
| 41 | my_host:= |
| 42 | endif |
| 43 | |
| 44 | ########################################################### |
| 45 | ## Validate and define fallbacks for input LOCAL_* variables. |
| 46 | ########################################################### |
| 47 | |
| 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 |
| 52 | #endif |
| 53 | #comma := , |
| 54 | #empty := |
| 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) |
| 57 | |
| 58 | LOCAL_MODULE_TAGS := $(sort $(LOCAL_MODULE_TAGS)) |
| 59 | ifeq (,$(LOCAL_MODULE_TAGS)) |
Ying Wang | 2fd81cf | 2010-12-10 11:17:28 -0800 | [diff] [blame] | 60 | ifeq (true,$(LOCAL_UNINSTALLABLE_MODULE)) |
| 61 | LOCAL_MODULE_TAGS := optional |
| 62 | else |
| 63 | # Installable modules without tags fall back to user (which is changed to user eng below) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 64 | LOCAL_MODULE_TAGS := user |
Ying Wang | 2fd81cf | 2010-12-10 11:17:28 -0800 | [diff] [blame] | 65 | endif |
Jean-Baptiste Queru | 423c15c | 2010-09-14 13:27:12 -0700 | [diff] [blame] | 66 | #$(warning default tags: $(lastword $(filter-out config/% out/%,$(MAKEFILE_LIST)))) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 67 | endif |
| 68 | |
Jean-Baptiste Queru | a831cbd | 2010-01-07 11:06:50 -0800 | [diff] [blame] | 69 | # Only the tags mentioned in this test are expected to be set by module |
| 70 | # makefiles. Anything else is either a typo or a source of unexpected |
| 71 | # behaviors. |
Thorsten Glaser | 2213aab | 2010-06-03 19:57:02 +0200 | [diff] [blame] | 72 | ifneq ($(filter-out user debug eng tests optional samples shell_ash shell_mksh,$(LOCAL_MODULE_TAGS)),) |
Jean-Baptiste Queru | a831cbd | 2010-01-07 11:06:50 -0800 | [diff] [blame] | 73 | $(warning unusual tags $(LOCAL_MODULE_TAGS) on $(LOCAL_MODULE) at $(LOCAL_PATH)) |
| 74 | endif |
| 75 | |
Jean-Baptiste Queru | 4074f23 | 2010-09-03 16:32:58 -0700 | [diff] [blame] | 76 | ifneq ($(filter $(LOCAL_MODULE_TAGS),user),) |
| 77 | ifeq ($(filter $(GRANDFATHERED_USER_MODULES),$(LOCAL_MODULE)),) |
Jean-Baptiste Queru | d64e5a2 | 2010-09-14 08:59:21 -0700 | [diff] [blame] | 78 | $(warning *** Module name: $(LOCAL_MODULE)) |
| 79 | $(warning *** Makefile location: $(LOCAL_PATH)) |
Jean-Baptiste Queru | 5890600 | 2010-09-15 13:59:29 -0700 | [diff] [blame] | 80 | $(warning * ) |
| 81 | $(warning * Each module must use a LOCAL_MODULE_TAGS in its) |
| 82 | $(warning * Android.mk. Possible tags declared by a module:) |
| 83 | $(warning * ) |
| 84 | $(warning * optional, debug, eng, tests, samples) |
| 85 | $(warning * ) |
| 86 | $(warning * If the module is expected to be in all builds) |
| 87 | $(warning * of a product, then it should use the) |
| 88 | $(warning * "optional" tag: ) |
| 89 | $(warning * ) |
| 90 | $(warning * Add "LOCAL_MODULE_TAGS := optional" in the) |
| 91 | $(warning * Android.mk for the affected module, and add) |
| 92 | $(warning * the LOCAL_MODULE value for that component) |
| 93 | $(warning * into the PRODUCT_PACKAGES section of product) |
| 94 | $(warning * makefile(s) where it's necessary, if) |
| 95 | $(warning * appropriate.) |
| 96 | $(warning * ) |
| 97 | $(warning * If the component should be in EVERY build of ALL) |
| 98 | $(warning * products, then add its LOCAL_MODULE value to the) |
| 99 | $(warning * PRODUCT_PACKAGES section of) |
| 100 | $(warning * build/target/product/core.mk) |
| 101 | $(warning * ) |
Jean-Baptiste Queru | d64e5a2 | 2010-09-14 08:59:21 -0700 | [diff] [blame] | 102 | $(error user tag detected on new module - user tags are only supported on legacy modules) |
Jean-Baptiste Queru | 4074f23 | 2010-09-03 16:32:58 -0700 | [diff] [blame] | 103 | endif |
| 104 | endif |
| 105 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 106 | # Add implicit tags. |
| 107 | # |
| 108 | # If the local directory or one of its parents contains a MODULE_LICENSE_GPL |
Ying Wang | a67ce69 | 2011-03-03 13:29:38 -0800 | [diff] [blame] | 109 | # file, tag the module as "gnu". Search for "*_GPL*" and "*_MPL*" so that we can also |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 110 | # find files like MODULE_LICENSE_GPL_AND_AFL but exclude files like |
| 111 | # MODULE_LICENSE_LGPL. |
| 112 | # |
Ying Wang | a67ce69 | 2011-03-03 13:29:38 -0800 | [diff] [blame] | 113 | ifneq ($(call find-parent-file,$(LOCAL_PATH),MODULE_LICENSE*_GPL* MODULE_LICENSE*_MPL*),) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 114 | LOCAL_MODULE_TAGS += gnu |
| 115 | endif |
| 116 | |
| 117 | # |
| 118 | # If this module is listed on CUSTOM_MODULES, promote it to "user" |
| 119 | # so that it will be installed in $(TARGET_OUT). |
| 120 | # |
| 121 | ifneq (,$(filter $(LOCAL_MODULE),$(CUSTOM_MODULES))) |
| 122 | LOCAL_MODULE_TAGS := $(sort $(LOCAL_MODULE_TAGS) user) |
| 123 | endif |
| 124 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 125 | ifdef LOCAL_IS_HOST_MODULE |
Ying Wang | 8f77936 | 2011-09-13 13:57:26 -0700 | [diff] [blame] | 126 | partition_tag := |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 127 | else |
Ying Wang | 8f77936 | 2011-09-13 13:57:26 -0700 | [diff] [blame] | 128 | ifeq (true,$(LOCAL_PROPRIETARY_MODULE)) |
| 129 | partition_tag := _VENDOR |
| 130 | else |
| 131 | # The definition of should-install-to-system will be different depending |
| 132 | # on which goal (e.g., sdk or just droid) is being built. |
| 133 | partition_tag := $(if $(call should-install-to-system,$(LOCAL_MODULE_TAGS)),,_DATA) |
| 134 | endif |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 135 | endif |
| 136 | |
| 137 | LOCAL_MODULE_CLASS := $(strip $(LOCAL_MODULE_CLASS)) |
| 138 | ifneq ($(words $(LOCAL_MODULE_CLASS)),1) |
| 139 | $(error $(LOCAL_PATH): LOCAL_MODULE_CLASS must contain exactly one word, not "$(LOCAL_MODULE_CLASS)") |
| 140 | endif |
| 141 | |
Jean-Baptiste Queru | 6907cfe | 2010-01-07 11:19:39 -0800 | [diff] [blame] | 142 | # Those used to be implicitly ignored, but aren't any more. |
| 143 | # As of 20100110 there are no apps with the user tag. |
| 144 | ifeq ($(LOCAL_MODULE_CLASS),APPS) |
| 145 | ifneq ($(filter $(LOCAL_MODULE_TAGS),user),) |
| 146 | $(warning user tag on app $(LOCAL_MODULE) at $(LOCAL_PATH) - add your app to core.mk instead) |
| 147 | endif |
| 148 | endif |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 149 | |
| 150 | LOCAL_MODULE_PATH := $(strip $(LOCAL_MODULE_PATH)) |
| 151 | ifeq ($(LOCAL_MODULE_PATH),) |
Ying Wang | 8f77936 | 2011-09-13 13:57:26 -0700 | [diff] [blame] | 152 | LOCAL_MODULE_PATH := $($(my_prefix)OUT$(partition_tag)_$(LOCAL_MODULE_CLASS)) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 153 | ifeq ($(strip $(LOCAL_MODULE_PATH)),) |
| 154 | $(error $(LOCAL_PATH): unhandled LOCAL_MODULE_CLASS "$(LOCAL_MODULE_CLASS)") |
| 155 | endif |
| 156 | endif |
| 157 | |
| 158 | ifneq ($(strip $(LOCAL_BUILT_MODULE)$(LOCAL_INSTALLED_MODULE)),) |
| 159 | $(error $(LOCAL_PATH): LOCAL_BUILT_MODULE and LOCAL_INSTALLED_MODULE must not be defined by component makefiles) |
| 160 | endif |
| 161 | |
| 162 | # Make sure that this IS_HOST/CLASS/MODULE combination is unique. |
| 163 | module_id := MODULE.$(if \ |
| 164 | $(LOCAL_IS_HOST_MODULE),HOST,TARGET).$(LOCAL_MODULE_CLASS).$(LOCAL_MODULE) |
| 165 | ifdef $(module_id) |
| 166 | $(error $(LOCAL_PATH): $(module_id) already defined by $($(module_id))) |
| 167 | endif |
| 168 | $(module_id) := $(LOCAL_PATH) |
| 169 | |
| 170 | intermediates := $(call local-intermediates-dir) |
| 171 | intermediates.COMMON := $(call local-intermediates-dir,COMMON) |
| 172 | |
| 173 | ########################################################### |
| 174 | # Pick a name for the intermediate and final targets |
| 175 | ########################################################### |
| 176 | LOCAL_MODULE_STEM := $(strip $(LOCAL_MODULE_STEM)) |
| 177 | ifeq ($(LOCAL_MODULE_STEM),) |
| 178 | LOCAL_MODULE_STEM := $(LOCAL_MODULE) |
| 179 | endif |
| 180 | LOCAL_INSTALLED_MODULE_STEM := $(LOCAL_MODULE_STEM)$(LOCAL_MODULE_SUFFIX) |
| 181 | |
| 182 | LOCAL_BUILT_MODULE_STEM := $(strip $(LOCAL_BUILT_MODULE_STEM)) |
| 183 | ifeq ($(LOCAL_BUILT_MODULE_STEM),) |
| 184 | LOCAL_BUILT_MODULE_STEM := $(LOCAL_INSTALLED_MODULE_STEM) |
| 185 | endif |
| 186 | |
| 187 | # OVERRIDE_BUILT_MODULE_PATH is only allowed to be used by the |
| 188 | # internal SHARED_LIBRARIES build files. |
| 189 | OVERRIDE_BUILT_MODULE_PATH := $(strip $(OVERRIDE_BUILT_MODULE_PATH)) |
| 190 | ifdef OVERRIDE_BUILT_MODULE_PATH |
| 191 | ifneq ($(LOCAL_MODULE_CLASS),SHARED_LIBRARIES) |
| 192 | $(error $(LOCAL_PATH): Illegal use of OVERRIDE_BUILT_MODULE_PATH) |
| 193 | endif |
| 194 | built_module_path := $(OVERRIDE_BUILT_MODULE_PATH) |
| 195 | else |
| 196 | built_module_path := $(intermediates) |
| 197 | endif |
| 198 | LOCAL_BUILT_MODULE := $(built_module_path)/$(LOCAL_BUILT_MODULE_STEM) |
| 199 | built_module_path := |
| 200 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 201 | LOCAL_UNINSTALLABLE_MODULE := $(strip $(LOCAL_UNINSTALLABLE_MODULE)) |
Ying Wang | 162991b | 2011-09-07 10:21:42 -0700 | [diff] [blame] | 202 | ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE)) |
Jeff Brown | 703e7c6 | 2011-02-04 20:15:00 -0800 | [diff] [blame] | 203 | LOCAL_INSTALLED_MODULE := $(LOCAL_MODULE_PATH)/$(LOCAL_INSTALLED_MODULE_STEM) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 204 | endif |
| 205 | |
| 206 | # Assemble the list of targets to create PRIVATE_ variables for. |
| 207 | LOCAL_INTERMEDIATE_TARGETS += $(LOCAL_BUILT_MODULE) |
| 208 | |
| 209 | |
| 210 | ########################################################### |
| 211 | ## AIDL: Compile .aidl files to .java |
| 212 | ########################################################### |
| 213 | |
| 214 | aidl_sources := $(filter %.aidl,$(LOCAL_SRC_FILES)) |
| 215 | |
| 216 | ifneq ($(strip $(aidl_sources)),) |
| 217 | |
| 218 | aidl_java_sources := $(patsubst %.aidl,%.java,$(addprefix $(intermediates.COMMON)/src/, $(aidl_sources))) |
| 219 | aidl_sources := $(addprefix $(TOP_DIR)$(LOCAL_PATH)/, $(aidl_sources)) |
| 220 | |
Ying Wang | 1214aeb | 2010-12-14 10:57:54 -0800 | [diff] [blame] | 221 | ifeq (,$(TARGET_BUILD_APPS)) |
| 222 | LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS) |
| 223 | endif |
Ying Wang | e3265fb | 2010-01-25 09:56:41 -0800 | [diff] [blame] | 224 | aidl_preprocess_import := |
| 225 | LOCAL_SDK_VERSION:=$(strip $(LOCAL_SDK_VERSION)) |
| 226 | ifdef LOCAL_SDK_VERSION |
Ying Wang | a07d37b | 2010-06-09 11:43:33 -0700 | [diff] [blame] | 227 | ifeq ($(LOCAL_SDK_VERSION),current) |
| 228 | aidl_preprocess_import := $(TARGET_OUT_COMMON_INTERMEDIATES)/framework.aidl |
| 229 | else |
| 230 | aidl_preprocess_import := $(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_VERSION)/framework.aidl |
Ying Wang | e3265fb | 2010-01-25 09:56:41 -0800 | [diff] [blame] | 231 | endif # !current |
| 232 | endif # LOCAL_SDK_VERSION |
Ying Wang | a07d37b | 2010-06-09 11:43:33 -0700 | [diff] [blame] | 233 | $(aidl_java_sources): PRIVATE_AIDL_FLAGS := -b $(addprefix -p,$(aidl_preprocess_import)) -I$(LOCAL_PATH) -I$(LOCAL_PATH)/src $(addprefix -I,$(LOCAL_AIDL_INCLUDES)) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 234 | |
Ying Wang | a7d9ca3 | 2011-07-13 14:29:33 -0700 | [diff] [blame] | 235 | $(aidl_java_sources): $(intermediates.COMMON)/src/%.java: $(TOPDIR)$(LOCAL_PATH)/%.aidl $(LOCAL_ADDITIONAL_DEPENDENCIES) $(AIDL) $(aidl_preprocess_import) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 236 | $(transform-aidl-to-java) |
| 237 | -include $(aidl_java_sources:%.java=%.P) |
| 238 | |
| 239 | else |
| 240 | aidl_java_sources := |
| 241 | endif |
| 242 | |
| 243 | ########################################################### |
Doug Zongker | 9bd4962 | 2009-11-30 14:28:59 -0800 | [diff] [blame] | 244 | ## logtags: Add .logtags files to global list, emit java source |
| 245 | ########################################################### |
| 246 | |
| 247 | logtags_sources := $(filter %.logtags,$(LOCAL_SRC_FILES)) |
| 248 | |
| 249 | ifneq ($(strip $(logtags_sources)),) |
| 250 | |
| 251 | event_log_tags := $(addprefix $(LOCAL_PATH)/,$(logtags_sources)) |
| 252 | |
| 253 | # Emit a java source file with constants for the tags, if |
| 254 | # LOCAL_MODULE_CLASS is "APPS" or "JAVA_LIBRARIES". |
| 255 | ifneq ($(strip $(filter $(LOCAL_MODULE_CLASS),APPS JAVA_LIBRARIES)),) |
| 256 | |
| 257 | logtags_java_sources := $(patsubst %.logtags,%.java,$(addprefix $(intermediates.COMMON)/src/, $(logtags_sources))) |
| 258 | logtags_sources := $(addprefix $(TOP_DIR)$(LOCAL_PATH)/, $(logtags_sources)) |
| 259 | |
Joe Onorato | b751053 | 2010-07-14 10:22:54 -0700 | [diff] [blame] | 260 | $(logtags_java_sources): $(intermediates.COMMON)/src/%.java: $(TOPDIR)$(LOCAL_PATH)/%.logtags $(TARGET_OUT_COMMON_INTERMEDIATES)/all-event-log-tags.txt |
Doug Zongker | 9bd4962 | 2009-11-30 14:28:59 -0800 | [diff] [blame] | 261 | $(transform-logtags-to-java) |
| 262 | |
| 263 | endif |
| 264 | |
| 265 | else |
| 266 | logtags_java_sources := |
| 267 | event_log_tags := |
| 268 | endif |
| 269 | |
| 270 | ########################################################### |
Ying Wang | a5fc87a | 2010-11-02 18:43:16 -0700 | [diff] [blame] | 271 | ## .proto files: Compile proto files to .java |
| 272 | ########################################################### |
| 273 | proto_sources := $(filter %.proto,$(LOCAL_SRC_FILES)) |
| 274 | # Because names of the .java files compiled from .proto files are unknown until the |
| 275 | # .proto files are compiled, we use a timestamp file as depedency. |
| 276 | proto_java_sources_file_stamp := |
| 277 | ifneq ($(proto_sources),) |
| 278 | proto_sources_fullpath := $(addprefix $(TOP_DIR)$(LOCAL_PATH)/, $(proto_sources)) |
| 279 | # By putting the generated java files into $(LOCAL_INTERMEDIATE_SOURCE_DIR), they will be |
| 280 | # automatically found by the java compiling function transform-java-to-classes.jar. |
Ying Wang | 6029391 | 2010-11-05 11:20:03 -0700 | [diff] [blame] | 281 | ifneq ($(LOCAL_INTERMEDIATE_SOURCE_DIR),) |
Ying Wang | a5fc87a | 2010-11-02 18:43:16 -0700 | [diff] [blame] | 282 | proto_java_intemediate_dir := $(LOCAL_INTERMEDIATE_SOURCE_DIR)/proto |
Ying Wang | 6029391 | 2010-11-05 11:20:03 -0700 | [diff] [blame] | 283 | else |
| 284 | # LOCAL_INTERMEDIATE_SOURCE_DIR may be not defined in non-java modules. |
| 285 | proto_java_intemediate_dir := $(intermediates)/proto |
| 286 | endif |
Ying Wang | a5fc87a | 2010-11-02 18:43:16 -0700 | [diff] [blame] | 287 | proto_java_sources_file_stamp := $(proto_java_intemediate_dir)/Proto.stamp |
| 288 | proto_java_sources_dir := $(proto_java_intemediate_dir)/src |
| 289 | |
| 290 | $(proto_java_sources_file_stamp): PRIVATE_PROTO_INCLUDES := $(TOP) |
| 291 | $(proto_java_sources_file_stamp): PRIVATE_PROTO_SRC_FILES := $(proto_sources_fullpath) |
| 292 | $(proto_java_sources_file_stamp): PRIVATE_PROTO_JAVA_OUTPUT_DIR := $(proto_java_sources_dir) |
| 293 | ifeq ($(LOCAL_PROTOC_OPTIMIZE_TYPE),micro) |
| 294 | $(proto_java_sources_file_stamp): PRIVATE_PROTO_JAVA_OUTPUT_OPTION := --javamicro_out |
| 295 | else |
| 296 | $(proto_java_sources_file_stamp): PRIVATE_PROTO_JAVA_OUTPUT_OPTION := --java_out |
| 297 | endif |
Ying Wang | 33c0d95 | 2010-11-05 11:30:58 -0700 | [diff] [blame] | 298 | $(proto_java_sources_file_stamp): PRIVATE_PROTOC_FLAGS := $(LOCAL_PROTOC_FLAGS) |
Ying Wang | a5fc87a | 2010-11-02 18:43:16 -0700 | [diff] [blame] | 299 | $(proto_java_sources_file_stamp) : $(proto_sources_fullpath) $(PROTOC) |
| 300 | $(call transform-proto-to-java) |
| 301 | |
| 302 | #TODO: protoc should output the dependencies introduced by imports. |
| 303 | |
| 304 | LOCAL_INTERMEDIATE_TARGETS += $(proto_java_sources_file_stamp) |
| 305 | endif # proto_sources |
| 306 | |
| 307 | |
| 308 | ########################################################### |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 309 | ## Java: Compile .java files to .class |
| 310 | ########################################################### |
| 311 | #TODO: pull this into java.make once host and target are combined |
| 312 | |
Ying Wang | 5291130 | 2010-05-26 13:13:56 -0700 | [diff] [blame] | 313 | java_sources := $(addprefix $(TOP_DIR)$(LOCAL_PATH)/, $(filter %.java,$(LOCAL_SRC_FILES))) $(aidl_java_sources) $(logtags_java_sources) \ |
| 314 | $(filter %.java,$(LOCAL_GENERATED_SOURCES)) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 315 | all_java_sources := $(java_sources) $(addprefix $($(my_prefix)OUT_COMMON_INTERMEDIATES)/, $(filter %.java,$(LOCAL_INTERMEDIATE_SOURCES))) |
| 316 | |
| 317 | ## Java resources ######################################### |
| 318 | |
| 319 | # Look for resource files in any specified directories. |
| 320 | # Non-java and non-doc files will be picked up as resources |
| 321 | # and included in the output jar file. |
| 322 | java_resource_file_groups := |
| 323 | |
| 324 | LOCAL_JAVA_RESOURCE_DIRS := $(strip $(LOCAL_JAVA_RESOURCE_DIRS)) |
| 325 | ifneq ($(LOCAL_JAVA_RESOURCE_DIRS),) |
| 326 | # This makes a list of words like |
| 327 | # <dir1>::<file1>:<file2> <dir2>::<file1> <dir3>: |
| 328 | # where each of the files is relative to the directory it's grouped with. |
| 329 | # Directories that don't contain any resource files will result in groups |
| 330 | # that end with a colon, and they are stripped out in the next step. |
| 331 | java_resource_file_groups += \ |
| 332 | $(foreach dir,$(LOCAL_JAVA_RESOURCE_DIRS), \ |
| 333 | $(subst $(space),:,$(strip \ |
| 334 | $(TOP_DIR)$(LOCAL_PATH)/$(dir): \ |
| 335 | $(patsubst ./%,%,$(shell cd $(TOP_DIR)$(LOCAL_PATH)/$(dir) && \ |
| 336 | find . \ |
| 337 | -type d -a -name ".svn" -prune -o \ |
| 338 | -type f \ |
| 339 | -a \! -name "*.java" \ |
| 340 | -a \! -name "package.html" \ |
| 341 | -a \! -name "overview.html" \ |
| 342 | -a \! -name ".*.swp" \ |
| 343 | -a \! -name ".DS_Store" \ |
| 344 | -a \! -name "*~" \ |
| 345 | -print \ |
| 346 | )) \ |
| 347 | )) \ |
| 348 | ) |
| 349 | java_resource_file_groups := $(filter-out %:,$(java_resource_file_groups)) |
| 350 | endif # LOCAL_JAVA_RESOURCE_DIRS |
| 351 | |
| 352 | LOCAL_JAVA_RESOURCE_FILES := $(strip $(LOCAL_JAVA_RESOURCE_FILES)) |
| 353 | ifneq ($(LOCAL_JAVA_RESOURCE_FILES),) |
| 354 | java_resource_file_groups += \ |
| 355 | $(foreach f,$(LOCAL_JAVA_RESOURCE_FILES), \ |
| 356 | $(patsubst %/,%,$(dir $(f)))::$(notdir $(f)) \ |
| 357 | ) |
| 358 | endif # LOCAL_JAVA_RESOURCE_FILES |
| 359 | |
| 360 | ifdef java_resource_file_groups |
| 361 | # The full paths to all resources, used for dependencies. |
| 362 | java_resource_sources := \ |
| 363 | $(foreach group,$(java_resource_file_groups), \ |
| 364 | $(addprefix $(word 1,$(subst :,$(space),$(group)))/, \ |
| 365 | $(wordlist 2,9999,$(subst :,$(space),$(group))) \ |
| 366 | ) \ |
| 367 | ) |
| 368 | # The arguments to jar that will include these files in a jar file. |
Ying Wang | 194a8ec | 2011-06-06 14:34:52 -0700 | [diff] [blame] | 369 | # Quote the file name to handle special characters (such as #) correctly. |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 370 | extra_jar_args := \ |
| 371 | $(foreach group,$(java_resource_file_groups), \ |
Ying Wang | 194a8ec | 2011-06-06 14:34:52 -0700 | [diff] [blame] | 372 | $(addprefix -C "$(word 1,$(subst :,$(space),$(group)))" , \ |
| 373 | $(foreach w, $(wordlist 2,9999,$(subst :,$(space),$(group))), "$(w)" ) \ |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 374 | ) \ |
| 375 | ) |
| 376 | java_resource_file_groups := |
| 377 | else |
| 378 | java_resource_sources := |
| 379 | extra_jar_args := |
| 380 | endif # java_resource_file_groups |
| 381 | |
| 382 | ## PRIVATE java vars ###################################### |
| 383 | |
| 384 | ifneq ($(strip $(all_java_sources)$(all_res_assets)),) |
| 385 | |
| 386 | full_static_java_libs := \ |
| 387 | $(foreach lib,$(LOCAL_STATIC_JAVA_LIBRARIES), \ |
| 388 | $(call intermediates-dir-for, \ |
Ying Wang | a83940f | 2010-09-24 18:09:04 -0700 | [diff] [blame] | 389 | JAVA_LIBRARIES,$(lib),$(LOCAL_IS_HOST_MODULE),COMMON)/javalib.jar) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 390 | |
| 391 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_INSTALL_DIR := $(dir $(LOCAL_INSTALLED_MODULE)) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 392 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CLASS_INTERMEDIATES_DIR := $(intermediates)/classes |
| 393 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_SOURCE_INTERMEDIATES_DIR := $(intermediates)/src |
| 394 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JAVA_SOURCES := $(all_java_sources) |
| 395 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JAVA_OBJECTS := $(patsubst %.java,%.class,$(LOCAL_SRC_FILES)) |
| 396 | ifeq ($(my_prefix),TARGET_) |
Joe Onorato | e62902c | 2009-09-23 15:28:12 -0700 | [diff] [blame] | 397 | ifeq ($(LOCAL_SDK_VERSION),) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 398 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(call java-lib-files,core) |
Ying Wang | a07d37b | 2010-06-09 11:43:33 -0700 | [diff] [blame] | 399 | else |
| 400 | ifeq ($(LOCAL_SDK_VERSION),current) |
| 401 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(call java-lib-files,android_stubs_current) |
| 402 | else |
| 403 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(call java-lib-files,sdk_v$(LOCAL_SDK_VERSION)) |
| 404 | endif # current |
| 405 | endif # LOCAL_SDK_VERSION |
| 406 | endif # TARGET_ |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 407 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_RESOURCE_DIR := $(LOCAL_RESOURCE_DIR) |
| 408 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_EXTRA_JAR_ARGS := $(extra_jar_args) |
| 409 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_ASSET_DIR := $(LOCAL_ASSET_DIR) |
| 410 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_STATIC_JAVA_LIBRARIES := $(full_static_java_libs) |
| 411 | |
| 412 | # full_java_libs: The list of files that should be used as the classpath. |
| 413 | # Using this list as a dependency list WILL NOT WORK. |
| 414 | # full_java_lib_deps: Should be specified as a prerequisite of this module |
| 415 | # to guarantee that the files in full_java_libs will |
| 416 | # be up-to-date. |
| 417 | ifdef LOCAL_IS_HOST_MODULE |
Ying Wang | 73ca57f | 2010-09-10 18:38:10 -0700 | [diff] [blame] | 418 | ifeq ($(LOCAL_BUILD_HOST_DEX),true) |
Ying Wang | 015edd2 | 2011-01-20 15:01:56 -0800 | [diff] [blame] | 419 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := -bootclasspath $(call java-lib-files,core-hostdex,$(LOCAL_IS_HOST_MODULE)) |
| 420 | |
Ying Wang | 73ca57f | 2010-09-10 18:38:10 -0700 | [diff] [blame] | 421 | full_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE)) |
| 422 | full_java_lib_deps := $(call java-lib-deps,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE)) |
| 423 | else |
Ying Wang | 015edd2 | 2011-01-20 15:01:56 -0800 | [diff] [blame] | 424 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_BOOTCLASSPATH := |
| 425 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 426 | full_java_libs := $(addprefix $(HOST_OUT_JAVA_LIBRARIES)/,$(addsuffix $(COMMON_JAVA_PACKAGE_SUFFIX),$(LOCAL_JAVA_LIBRARIES))) |
| 427 | full_java_lib_deps := $(full_java_libs) |
Ying Wang | 73ca57f | 2010-09-10 18:38:10 -0700 | [diff] [blame] | 428 | endif # LOCAL_BUILD_HOST_DEX |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 429 | else |
| 430 | full_java_libs := $(call java-lib-files,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE)) |
| 431 | full_java_lib_deps := $(call java-lib-deps,$(LOCAL_JAVA_LIBRARIES),$(LOCAL_IS_HOST_MODULE)) |
Ying Wang | e3265fb | 2010-01-25 09:56:41 -0800 | [diff] [blame] | 432 | endif # !LOCAL_IS_HOST_MODULE |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 433 | full_java_libs += $(full_static_java_libs) $(LOCAL_CLASSPATH) |
| 434 | full_java_lib_deps += $(full_static_java_libs) $(LOCAL_CLASSPATH) |
| 435 | |
| 436 | # This is set by packages that contain instrumentation, allowing them to |
| 437 | # link against the package they are instrumenting. Currently only one such |
| 438 | # package is allowed. |
| 439 | LOCAL_INSTRUMENTATION_FOR := $(strip $(LOCAL_INSTRUMENTATION_FOR)) |
| 440 | ifdef LOCAL_INSTRUMENTATION_FOR |
| 441 | ifneq ($(words $(LOCAL_INSTRUMENTATION_FOR)),1) |
| 442 | $(error \ |
| 443 | $(LOCAL_PATH): Multiple LOCAL_INSTRUMENTATION_FOR members defined) |
| 444 | endif |
| 445 | |
| 446 | link_instr_intermediates_dir := $(call intermediates-dir-for, \ |
| 447 | APPS,$(LOCAL_INSTRUMENTATION_FOR)) |
| 448 | link_instr_intermediates_dir.COMMON := $(call intermediates-dir-for, \ |
| 449 | APPS,$(LOCAL_INSTRUMENTATION_FOR),,COMMON) |
| 450 | |
Ying Wang | 3b2bdf1 | 2010-02-01 09:51:23 -0800 | [diff] [blame] | 451 | # link against the jar with full original names (before proguard processing). |
Ying Wang | a9c381e | 2010-10-02 18:35:51 -0700 | [diff] [blame] | 452 | full_java_libs += $(link_instr_intermediates_dir.COMMON)/classes.jar |
| 453 | full_java_lib_deps += $(link_instr_intermediates_dir.COMMON)/classes.jar |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 454 | endif |
| 455 | |
Ying Wang | c06243d | 2010-04-26 20:09:56 -0700 | [diff] [blame] | 456 | jar_manifest_file := |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 457 | ifneq ($(strip $(LOCAL_JAR_MANIFEST)),) |
Ying Wang | c06243d | 2010-04-26 20:09:56 -0700 | [diff] [blame] | 458 | jar_manifest_file := $(LOCAL_PATH)/$(LOCAL_JAR_MANIFEST) |
| 459 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JAR_MANIFEST := $(jar_manifest_file) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 460 | else |
| 461 | $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_JAR_MANIFEST := |
| 462 | endif |
| 463 | |
| 464 | endif |
| 465 | |
| 466 | |
| 467 | ########################################################### |
| 468 | ## make clean- targets |
| 469 | ########################################################### |
| 470 | cleantarget := clean-$(LOCAL_MODULE) |
| 471 | $(cleantarget) : PRIVATE_MODULE := $(LOCAL_MODULE) |
| 472 | $(cleantarget) : PRIVATE_CLEAN_FILES := \ |
| 473 | $(PRIVATE_CLEAN_FILES) \ |
| 474 | $(LOCAL_BUILT_MODULE) \ |
| 475 | $(LOCAL_INSTALLED_MODULE) \ |
| 476 | $(intermediates) |
| 477 | $(cleantarget):: |
| 478 | @echo "Clean: $(PRIVATE_MODULE)" |
| 479 | $(hide) rm -rf $(PRIVATE_CLEAN_FILES) |
| 480 | |
| 481 | ########################################################### |
| 482 | ## Common definitions for module. |
| 483 | ########################################################### |
| 484 | |
| 485 | # Propagate local configuration options to this target. |
| 486 | $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_PATH:=$(LOCAL_PATH) |
| 487 | $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_POST_PROCESS_COMMAND:= $(LOCAL_POST_PROCESS_COMMAND) |
| 488 | $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_AAPT_FLAGS:= $(LOCAL_AAPT_FLAGS) |
| 489 | $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_JAVA_LIBRARIES:= $(LOCAL_JAVA_LIBRARIES) |
Jeff Hamilton | bb67d21 | 2010-02-05 22:36:42 -0600 | [diff] [blame] | 490 | $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_MANIFEST_PACKAGE_NAME:= $(LOCAL_MANIFEST_PACKAGE_NAME) |
Ying Wang | 3dae0ee | 2010-09-02 15:41:01 -0700 | [diff] [blame] | 491 | $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_MANIFEST_INSTRUMENTATION_FOR:= $(LOCAL_MANIFEST_INSTRUMENTATION_FOR) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 492 | |
| 493 | $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_ALL_JAVA_LIBRARIES:= $(full_java_libs) |
| 494 | $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_IS_HOST_MODULE := $(LOCAL_IS_HOST_MODULE) |
| 495 | $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_HOST:= $(my_host) |
| 496 | |
Dima Zavin | 46e9bec | 2009-05-27 19:41:07 -0700 | [diff] [blame] | 497 | $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_INTERMEDIATES_DIR:= $(intermediates) |
| 498 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 499 | # Tell the module and all of its sub-modules who it is. |
| 500 | $(LOCAL_INTERMEDIATE_TARGETS) : PRIVATE_MODULE:= $(LOCAL_MODULE) |
| 501 | |
| 502 | # Provide a short-hand for building this module. |
| 503 | # We name both BUILT and INSTALLED in case |
| 504 | # LOCAL_UNINSTALLABLE_MODULE is set. |
| 505 | .PHONY: $(LOCAL_MODULE) |
| 506 | $(LOCAL_MODULE): $(LOCAL_BUILT_MODULE) $(LOCAL_INSTALLED_MODULE) |
| 507 | |
| 508 | ########################################################### |
| 509 | ## Module installation rule |
| 510 | ########################################################### |
| 511 | |
| 512 | # Some hosts do not have ACP; override the LOCAL version if that's the case. |
| 513 | ifneq ($(strip $(HOST_ACP_UNAVAILABLE)),) |
| 514 | LOCAL_ACP_UNAVAILABLE := $(strip $(HOST_ACP_UNAVAILABLE)) |
| 515 | endif |
| 516 | |
| 517 | ifndef LOCAL_UNINSTALLABLE_MODULE |
| 518 | # Define a copy rule to install the module. |
| 519 | # acp and libraries that it uses can't use acp for |
| 520 | # installation; hence, LOCAL_ACP_UNAVAILABLE. |
| 521 | ifneq ($(LOCAL_ACP_UNAVAILABLE),true) |
| 522 | $(LOCAL_INSTALLED_MODULE): $(LOCAL_BUILT_MODULE) | $(ACP) |
| 523 | @echo "Install: $@" |
Ying Wang | 84ed6fa | 2011-01-18 17:21:20 -0800 | [diff] [blame] | 524 | $(copy-file-to-new-target) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 525 | else |
| 526 | $(LOCAL_INSTALLED_MODULE): $(LOCAL_BUILT_MODULE) |
| 527 | @echo "Install: $@" |
| 528 | $(copy-file-to-target-with-cp) |
| 529 | endif |
| 530 | |
Ying Wang | 79e3dec | 2011-10-24 12:17:03 -0700 | [diff] [blame] | 531 | ifdef LOCAL_DEX_PREOPT |
Ying Wang | e7874c4 | 2010-09-17 16:36:06 -0700 | [diff] [blame] | 532 | installed_odex := $(basename $(LOCAL_INSTALLED_MODULE)).odex |
| 533 | built_odex := $(basename $(LOCAL_BUILT_MODULE)).odex |
| 534 | $(installed_odex) : $(built_odex) | $(ACP) |
| 535 | @echo "Install: $@" |
| 536 | $(copy-file-to-target) |
| 537 | |
Ying Wang | 84ed6fa | 2011-01-18 17:21:20 -0800 | [diff] [blame] | 538 | $(LOCAL_INSTALLED_MODULE) : $(installed_odex) |
Ying Wang | e7874c4 | 2010-09-17 16:36:06 -0700 | [diff] [blame] | 539 | endif |
| 540 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 541 | endif # !LOCAL_UNINSTALLABLE_MODULE |
| 542 | |
Joe Onorato | e334d25 | 2009-07-17 15:33:40 -0400 | [diff] [blame] | 543 | |
| 544 | ########################################################### |
| 545 | ## CHECK_BUILD goals |
| 546 | ########################################################### |
| 547 | |
| 548 | # If nobody has defined a more specific module for the |
| 549 | # checked modules, use LOCAL_BUILT_MODULE. This was old |
| 550 | # behavior, so it should be a safe default. |
| 551 | ifndef LOCAL_CHECKED_MODULE |
Joe Onorato | 05c7f61 | 2010-01-05 12:47:14 -0800 | [diff] [blame] | 552 | ifndef LOCAL_SDK_VERSION |
| 553 | LOCAL_CHECKED_MODULE := $(LOCAL_BUILT_MODULE) |
| 554 | endif |
Joe Onorato | e334d25 | 2009-07-17 15:33:40 -0400 | [diff] [blame] | 555 | endif |
| 556 | |
| 557 | # If they request that this module not be checked, then don't. |
| 558 | # PLEASE DON'T SET THIS. ANY PLACES THAT SET THIS WITHOUT |
| 559 | # GOOD REASON WILL HAVE IT REMOVED. |
| 560 | ifdef LOCAL_DONT_CHECK_MODULE |
| 561 | LOCAL_CHECKED_MODULE := |
| 562 | endif |
| 563 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 564 | ########################################################### |
| 565 | ## Register with ALL_MODULES |
| 566 | ########################################################### |
| 567 | |
| 568 | ALL_MODULES += $(LOCAL_MODULE) |
| 569 | |
| 570 | # Don't use += on subvars, or else they'll end up being |
| 571 | # recursively expanded. |
Joe Onorato | 8a06bac | 2010-05-21 14:29:29 -0700 | [diff] [blame] | 572 | ALL_MODULES.$(LOCAL_MODULE).CLASS := \ |
| 573 | $(ALL_MODULES.$(LOCAL_MODULE).CLASS) $(LOCAL_MODULE_CLASS) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 574 | ALL_MODULES.$(LOCAL_MODULE).PATH := \ |
| 575 | $(ALL_MODULES.$(LOCAL_MODULE).PATH) $(LOCAL_PATH) |
| 576 | ALL_MODULES.$(LOCAL_MODULE).TAGS := \ |
| 577 | $(ALL_MODULES.$(LOCAL_MODULE).TAGS) $(LOCAL_MODULE_TAGS) |
Joe Onorato | e334d25 | 2009-07-17 15:33:40 -0400 | [diff] [blame] | 578 | ALL_MODULES.$(LOCAL_MODULE).CHECKED := \ |
| 579 | $(ALL_MODULES.$(LOCAL_MODULE).CHECKED) $(LOCAL_CHECKED_MODULE) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 580 | ALL_MODULES.$(LOCAL_MODULE).BUILT := \ |
| 581 | $(ALL_MODULES.$(LOCAL_MODULE).BUILT) $(LOCAL_BUILT_MODULE) |
| 582 | ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \ |
| 583 | $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(LOCAL_INSTALLED_MODULE) |
| 584 | ALL_MODULES.$(LOCAL_MODULE).REQUIRED := \ |
| 585 | $(ALL_MODULES.$(LOCAL_MODULE).REQUIRED) $(LOCAL_REQUIRED_MODULES) |
Doug Zongker | 9bd4962 | 2009-11-30 14:28:59 -0800 | [diff] [blame] | 586 | ALL_MODULES.$(LOCAL_MODULE).EVENT_LOG_TAGS := \ |
| 587 | $(ALL_MODULES.$(LOCAL_MODULE).EVENT_LOG_TAGS) $(event_log_tags) |
Joe Onorato | 77dc0a5 | 2010-05-17 18:16:11 -0700 | [diff] [blame] | 588 | ALL_MODULES.$(LOCAL_MODULE).INTERMEDIATE_SOURCE_DIR := \ |
Ying Wang | 01c3517 | 2010-05-17 19:07:21 -0700 | [diff] [blame] | 589 | $(ALL_MODULES.$(LOCAL_MODULE).INTERMEDIATE_SOURCE_DIR) $(LOCAL_INTERMEDIATE_SOURCE_DIR) |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 590 | |
Joe Onorato | 8a06bac | 2010-05-21 14:29:29 -0700 | [diff] [blame] | 591 | INSTALLABLE_FILES.$(LOCAL_INSTALLED_MODULE).MODULE := $(LOCAL_MODULE) |
| 592 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 593 | ########################################################### |
| 594 | ## Take care of LOCAL_MODULE_TAGS |
| 595 | ########################################################### |
| 596 | |
| 597 | # Keep track of all the tags we've seen. |
| 598 | ALL_MODULE_TAGS := $(sort $(ALL_MODULE_TAGS) $(LOCAL_MODULE_TAGS)) |
| 599 | |
| 600 | # Add this module to the tag list of each specified tag. |
| 601 | # Don't use "+=". If the variable hasn't been set with ":=", |
| 602 | # it will default to recursive expansion. |
| 603 | $(foreach tag,$(LOCAL_MODULE_TAGS),\ |
| 604 | $(eval ALL_MODULE_TAGS.$(tag) := \ |
| 605 | $(ALL_MODULE_TAGS.$(tag)) \ |
| 606 | $(LOCAL_INSTALLED_MODULE))) |
| 607 | |
| 608 | # Add this module name to the tag list of each specified tag. |
| 609 | $(foreach tag,$(LOCAL_MODULE_TAGS),\ |
| 610 | $(eval ALL_MODULE_NAME_TAGS.$(tag) += $(LOCAL_MODULE))) |
| 611 | |
The Android Open Source Project | 88b6079 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 612 | ########################################################### |
| 613 | ## NOTICE files |
| 614 | ########################################################### |
| 615 | |
| 616 | include $(BUILD_SYSTEM)/notice_files.mk |
| 617 | |
| 618 | #:vi noexpandtab |