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