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########################################################### 18## Standard rules for building an application package. 19## 20## Additional inputs from base_rules.make: 21## LOCAL_PACKAGE_NAME: The name of the package; the directory 22## will be called this. 23## 24## MODULE, MODULE_PATH, and MODULE_SUFFIX will 25## be set for you. 26########################################################### 27 28 29# If this makefile is being read from within an inheritance, 30# use the new values. 31skip_definition:= 32ifdef LOCAL_PACKAGE_OVERRIDES 33 package_overridden := $(call set-inherited-package-variables) 34 ifeq ($(strip $(package_overridden)),) 35 skip_definition := true 36 endif 37endif 38 39ifndef skip_definition 40 41LOCAL_PACKAGE_NAME := $(strip $(LOCAL_PACKAGE_NAME)) 42ifeq ($(LOCAL_PACKAGE_NAME),) 43$(error $(LOCAL_PATH): Package modules must define LOCAL_PACKAGE_NAME) 44endif 45 46ifneq ($(strip $(LOCAL_MODULE_SUFFIX)),) 47$(error $(LOCAL_PATH): Package modules may not define LOCAL_MODULE_SUFFIX) 48endif 49LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX) 50 51ifneq ($(strip $(LOCAL_MODULE)),) 52$(error $(LOCAL_PATH): Package modules may not define LOCAL_MODULE) 53endif 54LOCAL_MODULE := $(LOCAL_PACKAGE_NAME) 55 56ifeq ($(strip $(LOCAL_MANIFEST_FILE)),) 57LOCAL_MANIFEST_FILE := AndroidManifest.xml 58endif 59 60# If you need to put the MANIFEST_FILE outside of LOCAL_PATH 61# you can use FULL_MANIFEST_FILE 62ifeq ($(strip $(LOCAL_FULL_MANIFEST_FILE)),) 63LOCAL_FULL_MANIFEST_FILE := $(LOCAL_PATH)/$(LOCAL_MANIFEST_FILE) 64endif 65 66ifneq ($(strip $(LOCAL_MODULE_CLASS)),) 67$(error $(LOCAL_PATH): Package modules may not set LOCAL_MODULE_CLASS) 68endif 69LOCAL_MODULE_CLASS := APPS 70 71# Package LOCAL_MODULE_TAGS default to optional 72LOCAL_MODULE_TAGS := $(strip $(LOCAL_MODULE_TAGS)) 73ifeq ($(LOCAL_MODULE_TAGS),) 74LOCAL_MODULE_TAGS := optional 75endif 76 77ifeq ($(filter tests, $(LOCAL_MODULE_TAGS)),) 78# Force localization check if it's not tagged as tests. 79LOCAL_AAPT_FLAGS := $(LOCAL_AAPT_FLAGS) -z 80endif 81 82ifeq (,$(LOCAL_ASSET_DIR)) 83LOCAL_ASSET_DIR := $(LOCAL_PATH)/assets 84endif 85 86ifeq (,$(LOCAL_RESOURCE_DIR)) 87 LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res 88endif 89 90package_resource_overlays := $(strip \ 91 $(wildcard $(foreach dir, $(PRODUCT_PACKAGE_OVERLAYS), \ 92 $(addprefix $(dir)/, $(LOCAL_RESOURCE_DIR)))) \ 93 $(wildcard $(foreach dir, $(DEVICE_PACKAGE_OVERLAYS), \ 94 $(addprefix $(dir)/, $(LOCAL_RESOURCE_DIR))))) 95 96LOCAL_RESOURCE_DIR := $(package_resource_overlays) $(LOCAL_RESOURCE_DIR) 97 98all_assets := $(call find-subdir-assets,$(LOCAL_ASSET_DIR)) 99all_assets := $(addprefix $(LOCAL_ASSET_DIR)/,$(patsubst assets/%,%,$(all_assets))) 100 101all_resources := $(strip \ 102 $(foreach dir, $(LOCAL_RESOURCE_DIR), \ 103 $(addprefix $(dir)/, \ 104 $(patsubst res/%,%, \ 105 $(call find-subdir-assets,$(dir)) \ 106 ) \ 107 ) \ 108 )) 109 110all_res_assets := $(strip $(all_assets) $(all_resources)) 111 112package_expected_intermediates_COMMON := $(call local-intermediates-dir,COMMON) 113# If no assets or resources were found, clear the directory variables so 114# we don't try to build them. 115ifeq (,$(all_assets)) 116LOCAL_ASSET_DIR:= 117endif 118ifeq (,$(all_resources)) 119LOCAL_RESOURCE_DIR:= 120R_file_stamp := 121else 122# Make sure that R_file_stamp inherits the proper PRIVATE vars. 123# If R.stamp moves, be sure to update the framework makefile, 124# which has intimate knowledge of its location. 125R_file_stamp := $(package_expected_intermediates_COMMON)/src/R.stamp 126LOCAL_INTERMEDIATE_TARGETS += $(R_file_stamp) 127endif 128 129LOCAL_BUILT_MODULE_STEM := package.apk 130 131LOCAL_PROGUARD_ENABLED:=$(strip $(LOCAL_PROGUARD_ENABLED)) 132ifndef LOCAL_PROGUARD_ENABLED 133ifneq ($(DISABLE_PROGUARD),true) 134 LOCAL_PROGUARD_ENABLED :=full 135endif 136endif 137ifeq ($(LOCAL_PROGUARD_ENABLED),disabled) 138 # the package explicitly request to disable proguard. 139 LOCAL_PROGUARD_ENABLED := 140endif 141proguard_options_file := 142ifneq ($(LOCAL_PROGUARD_ENABLED),custom) 143ifneq ($(all_resources),) 144 proguard_options_file := $(package_expected_intermediates_COMMON)/proguard_options 145endif # all_resources 146endif # !custom 147LOCAL_PROGUARD_FLAGS := $(addprefix -include ,$(proguard_options_file)) $(LOCAL_PROGUARD_FLAGS) 148 149ifneq (true,$(WITH_DEXPREOPT)) 150LOCAL_DEX_PREOPT := 151else 152ifeq (,$(TARGET_BUILD_APPS)) 153ifeq (,$(LOCAL_APK_LIBRARIES)) 154ifneq (,$(LOCAL_SRC_FILES)) 155ifndef LOCAL_DEX_PREOPT 156LOCAL_DEX_PREOPT := $(DEX_PREOPT_DEFAULT) 157endif 158endif 159endif 160endif 161endif 162ifeq (false,$(LOCAL_DEX_PREOPT)) 163LOCAL_DEX_PREOPT := 164endif 165 166ifeq (true,$(EMMA_INSTRUMENT)) 167ifndef LOCAL_EMMA_INSTRUMENT 168# No emma for test apks. 169ifeq (,$(filer tests,$(LOCAL_MODULE_TAGS))$(LOCAL_INSTRUMENTATION_FOR)) 170LOCAL_EMMA_INSTRUMENT := true 171endif # No test apk 172endif # LOCAL_EMMA_INSTRUMENT is not set 173else 174LOCAL_EMMA_INSTRUMENT := false 175endif # EMMA_INSTRUMENT is true 176 177ifeq (true,$(LOCAL_EMMA_INSTRUMENT)) 178ifeq (true,$(EMMA_INSTRUMENT_STATIC)) 179LOCAL_STATIC_JAVA_LIBRARIES += emma 180else 181ifdef LOCAL_SDK_VERSION 182ifdef TARGET_BUILD_APPS 183# In unbundled build merge the emma library into the apk. 184LOCAL_STATIC_JAVA_LIBRARIES += emma 185else 186# If build against the SDK in full build, core.jar is not used, 187# we have to use prebiult emma.jar to make Proguard happy; 188# Otherwise emma classes are included in core.jar. 189LOCAL_PROGUARD_FLAGS += -libraryjars $(EMMA_JAR) 190endif # full build 191endif # LOCAL_SDK_VERSION 192endif # EMMA_INSTRUMENT_STATIC 193endif # LOCAL_EMMA_INSTRUMENT 194 195rs_compatibility_jni_libs := 196 197################################# 198include $(BUILD_SYSTEM)/java.mk 199################################# 200 201LOCAL_SDK_RES_VERSION:=$(strip $(LOCAL_SDK_RES_VERSION)) 202ifeq ($(LOCAL_SDK_RES_VERSION),) 203 LOCAL_SDK_RES_VERSION:=$(LOCAL_SDK_VERSION) 204endif 205 206full_android_manifest := $(LOCAL_FULL_MANIFEST_FILE) 207$(LOCAL_INTERMEDIATE_TARGETS): \ 208 PRIVATE_ANDROID_MANIFEST := $(full_android_manifest) 209ifneq (,$(filter-out current, $(LOCAL_SDK_VERSION))) 210$(LOCAL_INTERMEDIATE_TARGETS): \ 211 PRIVATE_DEFAULT_APP_TARGET_SDK := $(LOCAL_SDK_VERSION) 212else 213$(LOCAL_INTERMEDIATE_TARGETS): \ 214 PRIVATE_DEFAULT_APP_TARGET_SDK := $(DEFAULT_APP_TARGET_SDK) 215endif 216 217ifneq ($(all_resources),) 218 219# Since we don't know where the real R.java file is going to end up, 220# we need to use another file to stand in its place. We'll just 221# copy the generated file to src/R.stamp, which means it will 222# have the same contents and timestamp as the actual file. 223# 224# At the same time, this will copy the R.java file to a central 225# 'R' directory to make it easier to add the files to an IDE. 226# 227#TODO: use PRIVATE_SOURCE_INTERMEDIATES_DIR instead of 228# $(intermediates.COMMON)/src 229ifneq ($(package_expected_intermediates_COMMON),$(intermediates.COMMON)) 230 $(error $(LOCAL_MODULE): internal error: expected intermediates.COMMON "$(package_expected_intermediates_COMMON)" != intermediates.COMMON "$(intermediates.COMMON)") 231endif 232 233$(R_file_stamp): PRIVATE_RESOURCE_PUBLICS_OUTPUT := \ 234 $(intermediates.COMMON)/public_resources.xml 235$(R_file_stamp): PRIVATE_PROGUARD_OPTIONS_FILE := $(proguard_options_file) 236$(R_file_stamp): $(all_res_assets) $(full_android_manifest) $(RenderScript_file_stamp) $(AAPT) | $(ACP) 237 @echo "target R.java/Manifest.java: $(PRIVATE_MODULE) ($@)" 238 @rm -f $@ 239 $(create-resource-java-files) 240 $(hide) for GENERATED_MANIFEST_FILE in `find $(PRIVATE_SOURCE_INTERMEDIATES_DIR) \ 241 -name Manifest.java 2> /dev/null`; do \ 242 dir=`awk '/package/{gsub(/\./,"/",$$2);gsub(/;/,"",$$2);print $$2;exit}' $$GENERATED_MANIFEST_FILE`; \ 243 mkdir -p $(TARGET_COMMON_OUT_ROOT)/R/$$dir; \ 244 $(ACP) -fp $$GENERATED_MANIFEST_FILE $(TARGET_COMMON_OUT_ROOT)/R/$$dir; \ 245 done; 246 $(hide) for GENERATED_R_FILE in `find $(PRIVATE_SOURCE_INTERMEDIATES_DIR) \ 247 -name R.java 2> /dev/null`; do \ 248 dir=`awk '/package/{gsub(/\./,"/",$$2);gsub(/;/,"",$$2);print $$2;exit}' $$GENERATED_R_FILE`; \ 249 mkdir -p $(TARGET_COMMON_OUT_ROOT)/R/$$dir; \ 250 $(ACP) -fp $$GENERATED_R_FILE $(TARGET_COMMON_OUT_ROOT)/R/$$dir \ 251 || exit 31; \ 252 $(ACP) -fp $$GENERATED_R_FILE $@ || exit 32; \ 253 done; \ 254 255$(proguard_options_file): $(R_file_stamp) 256 257ifdef LOCAL_EXPORT_PACKAGE_RESOURCES 258# Put this module's resources into a PRODUCT-agnositc package that 259# other packages can use to build their own PRODUCT-agnostic R.java (etc.) 260# files. 261resource_export_package := $(intermediates.COMMON)/package-export.apk 262$(R_file_stamp): $(resource_export_package) 263 264# add-assets-to-package looks at PRODUCT_AAPT_CONFIG, but this target 265# can't know anything about PRODUCT. Clear it out just for this target. 266$(resource_export_package): PRIVATE_PRODUCT_AAPT_CONFIG := 267$(resource_export_package): PRIVATE_PRODUCT_AAPT_PREF_CONFIG := 268$(resource_export_package): $(all_res_assets) $(full_android_manifest) $(RenderScript_file_stamp) $(AAPT) 269 @echo "target Export Resources: $(PRIVATE_MODULE) ($@)" 270 $(create-empty-package) 271 $(add-assets-to-package) 272endif 273 274# Other modules should depend on the BUILT module if 275# they want to use this module's R.java file. 276$(LOCAL_BUILT_MODULE): $(R_file_stamp) 277 278ifneq ($(full_classes_jar),) 279# If full_classes_jar is non-empty, we're building sources. 280# If we're building sources, the initial javac step (which 281# produces full_classes_compiled_jar) needs to ensure the 282# R.java and Manifest.java files have been generated first. 283$(full_classes_compiled_jar): $(R_file_stamp) 284endif 285 286endif # all_resources 287 288ifeq ($(LOCAL_NO_STANDARD_LIBRARIES),true) 289# We need to explicitly clear this var so that we don't 290# inherit the value from whomever caused us to be built. 291$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_AAPT_INCLUDES := 292else 293# Most packages should link against the resources defined by framework-res. 294# Even if they don't have their own resources, they may use framework 295# resources. 296ifneq ($(filter-out current,$(LOCAL_SDK_RES_VERSION))$(if $(TARGET_BUILD_APPS),$(filter current,$(LOCAL_SDK_RES_VERSION))),) 297# for released sdk versions, the platform resources were built into android.jar. 298framework_res_package_export := \ 299 $(HISTORICAL_SDK_VERSIONS_ROOT)/$(LOCAL_SDK_RES_VERSION)/android.jar 300framework_res_package_export_deps := $(framework_res_package_export) 301else # LOCAL_SDK_RES_VERSION 302framework_res_package_export := \ 303 $(call intermediates-dir-for,APPS,framework-res,,COMMON)/package-export.apk 304# We can't depend directly on the export.apk file; it won't get its 305# PRIVATE_ vars set up correctly if we do. Instead, depend on the 306# corresponding R.stamp file, which lists the export.apk as a dependency. 307framework_res_package_export_deps := \ 308 $(dir $(framework_res_package_export))src/R.stamp 309endif # LOCAL_SDK_RES_VERSION 310$(R_file_stamp): $(framework_res_package_export_deps) 311$(LOCAL_INTERMEDIATE_TARGETS): \ 312 PRIVATE_AAPT_INCLUDES := $(framework_res_package_export) 313endif # LOCAL_NO_STANDARD_LIBRARIES 314 315ifneq ($(full_classes_jar),) 316$(LOCAL_BUILT_MODULE): PRIVATE_DEX_FILE := $(built_dex) 317$(LOCAL_BUILT_MODULE): $(built_dex) 318endif # full_classes_jar 319 320 321# Get the list of jni libraries to be included in the apk file. 322 323so_suffix := $($(my_prefix)SHLIB_SUFFIX) 324 325jni_shared_libraries := \ 326 $(addprefix $($(my_prefix)OUT_INTERMEDIATE_LIBRARIES)/, \ 327 $(addsuffix $(so_suffix), \ 328 $(LOCAL_JNI_SHARED_LIBRARIES))) 329 330# Include RS dynamically-generated libraries as well 331# Keep this ifneq, as the += otherwise adds spaces that need to be stripped. 332ifneq ($(rs_compatibility_jni_libs),) 333jni_shared_libraries += $(rs_compatibility_jni_libs) 334endif 335 336# App explicitly requires the prebuilt NDK libstlport_shared.so. 337# libstlport_shared.so should never go to the system image. 338# Instead it should be packaged into the apk. 339ifeq (stlport_shared,$(LOCAL_NDK_STL_VARIANT)) 340ifndef LOCAL_SDK_VERSION 341$(error LOCAL_SDK_VERSION has to be defined together with LOCAL_NDK_STL_VARIANT, \ 342 LOCAL_PACKAGE_NAME=$(LOCAL_PACKAGE_NAME)) 343endif 344jni_shared_libraries += \ 345 $(HISTORICAL_NDK_VERSIONS_ROOT)/current/sources/cxx-stl/stlport/libs/$(TARGET_CPU_ABI)/libstlport_shared.so 346endif 347 348# Set the abi directory used by the local JNI shared libraries. 349# (Doesn't change how the local shared libraries are compiled, just 350# sets where they are stored in the apk.) 351 352ifeq ($(LOCAL_JNI_SHARED_LIBRARIES_ABI),) 353 jni_shared_libraries_abi := $(TARGET_CPU_ABI) 354else 355 jni_shared_libraries_abi := $(LOCAL_JNI_SHARED_LIBRARIES_ABI) 356endif 357 358# Pick a key to sign the package with. If this package hasn't specified 359# an explicit certificate, use the default. 360# Secure release builds will have their packages signed after the fact, 361# so it's ok for these private keys to be in the clear. 362ifeq ($(LOCAL_CERTIFICATE),) 363 LOCAL_CERTIFICATE := $(DEFAULT_SYSTEM_DEV_CERTIFICATE) 364endif 365 366ifeq ($(LOCAL_CERTIFICATE),EXTERNAL) 367 # The special value "EXTERNAL" means that we will sign it with the 368 # default devkey, apply predexopt, but then expect the final .apk 369 # (after dexopting) to be signed by an outside tool. 370 LOCAL_CERTIFICATE := $(DEFAULT_SYSTEM_DEV_CERTIFICATE) 371 PACKAGES.$(LOCAL_PACKAGE_NAME).EXTERNAL_KEY := 1 372endif 373 374# If this is not an absolute certificate, assign it to a generic one. 375ifeq ($(dir $(strip $(LOCAL_CERTIFICATE))),./) 376 LOCAL_CERTIFICATE := $(dir $(DEFAULT_SYSTEM_DEV_CERTIFICATE))$(LOCAL_CERTIFICATE) 377endif 378private_key := $(LOCAL_CERTIFICATE).pk8 379certificate := $(LOCAL_CERTIFICATE).x509.pem 380 381$(LOCAL_BUILT_MODULE): $(private_key) $(certificate) $(SIGNAPK_JAR) 382$(LOCAL_BUILT_MODULE): PRIVATE_PRIVATE_KEY := $(private_key) 383$(LOCAL_BUILT_MODULE): PRIVATE_CERTIFICATE := $(certificate) 384 385PACKAGES.$(LOCAL_PACKAGE_NAME).PRIVATE_KEY := $(private_key) 386PACKAGES.$(LOCAL_PACKAGE_NAME).CERTIFICATE := $(certificate) 387 388$(LOCAL_BUILT_MODULE): PRIVATE_ADDITIONAL_CERTIFICATES := $(foreach c,\ 389 $(LOCAL_ADDITIONAL_CERTIFICATES), $(c).x509.pem $(c).pk8) 390 391# Define the rule to build the actual package. 392$(LOCAL_BUILT_MODULE): $(AAPT) | $(ZIPALIGN) 393ifdef LOCAL_DEX_PREOPT 394# Make sure the boot jars get dexpreopt-ed first 395$(LOCAL_BUILT_MODULE): $(DEXPREOPT_BOOT_ODEXS) | $(DEXPREOPT) $(DEXOPT) 396endif 397$(LOCAL_BUILT_MODULE): PRIVATE_JNI_SHARED_LIBRARIES := $(jni_shared_libraries) 398$(LOCAL_BUILT_MODULE): PRIVATE_JNI_SHARED_LIBRARIES_ABI := $(jni_shared_libraries_abi) 399ifneq ($(TARGET_BUILD_APPS),) 400 # Include all resources for unbundled apps. 401 LOCAL_AAPT_INCLUDE_ALL_RESOURCES := true 402endif 403ifeq ($(LOCAL_AAPT_INCLUDE_ALL_RESOURCES),true) 404 $(LOCAL_BUILT_MODULE): PRIVATE_PRODUCT_AAPT_CONFIG := 405 $(LOCAL_BUILT_MODULE): PRIVATE_PRODUCT_AAPT_PREF_CONFIG := 406else 407 $(LOCAL_BUILT_MODULE): PRIVATE_PRODUCT_AAPT_CONFIG := $(PRODUCT_AAPT_CONFIG) 408 $(LOCAL_BUILT_MODULE): PRIVATE_PRODUCT_AAPT_PREF_CONFIG := $(PRODUCT_AAPT_PREF_CONFIG) 409endif 410$(LOCAL_BUILT_MODULE): $(all_res_assets) $(jni_shared_libraries) $(full_android_manifest) 411 @echo "target Package: $(PRIVATE_MODULE) ($@)" 412 $(create-empty-package) 413 $(add-assets-to-package) 414ifneq ($(jni_shared_libraries),) 415 $(add-jni-shared-libs-to-package) 416endif 417ifneq ($(full_classes_jar),) 418 $(add-dex-to-package) 419endif 420 $(add-carried-java-resources) 421ifneq ($(extra_jar_args),) 422 $(add-java-resources-to-package) 423endif 424 $(sign-package) 425ifdef LOCAL_DEX_PREOPT 426 $(hide) rm -f $(patsubst %.apk,%.odex,$@) 427 $(call dexpreopt-one-file,$@,$(patsubst %.apk,%.odex,$@)) 428ifneq (nostripping,$(LOCAL_DEX_PREOPT)) 429 $(call dexpreopt-remove-classes.dex,$@) 430endif 431endif 432 @# Alignment must happen after all other zip operations. 433 $(align-package) 434 435ifdef LOCAL_DEX_PREOPT 436built_odex := $(basename $(LOCAL_BUILT_MODULE)).odex 437$(built_odex): $(LOCAL_BUILT_MODULE) 438endif 439 440# Save information about this package 441PACKAGES.$(LOCAL_PACKAGE_NAME).OVERRIDES := $(strip $(LOCAL_OVERRIDES_PACKAGES)) 442PACKAGES.$(LOCAL_PACKAGE_NAME).RESOURCE_FILES := $(all_resources) 443ifdef package_resource_overlays 444PACKAGES.$(LOCAL_PACKAGE_NAME).RESOURCE_OVERLAYS := $(package_resource_overlays) 445endif 446 447PACKAGES := $(PACKAGES) $(LOCAL_PACKAGE_NAME) 448 449# Dist the files that can be bundled in system.img. 450# They include the jni shared libraries and the apk with jni libraries stripped. 451ifeq ($(LOCAL_DIST_BUNDLED_BINARIES),true) 452ifneq ($(filter $(LOCAL_PACKAGE_NAME),$(TARGET_BUILD_APPS)),) 453ifneq ($(strip $(jni_shared_libraries)),) 454dist_subdir := bundled_$(LOCAL_PACKAGE_NAME) 455$(foreach f, $(jni_shared_libraries), \ 456 $(call dist-for-goals, apps_only, $(f):$(dist_subdir)/$(notdir $(f)))) 457 458apk_jni_stripped := $(intermediates)/jni_stripped/package.apk 459$(apk_jni_stripped): PRIVATE_JNI_SHARED_LIBRARIES := $(notdir $(jni_shared_libraries)) 460$(apk_jni_stripped) : $(LOCAL_BUILT_MODULE) | $(ZIPALIGN) 461 @rm -rf $(dir $@) && mkdir -p $(dir $@) 462 $(hide) cp $< $@ 463 $(hide) zip -d $@ $(foreach f,$(PRIVATE_JNI_SHARED_LIBRARIES),\*/$(f)) 464 $(call align-package) 465 466$(call dist-for-goals, apps_only, $(apk_jni_stripped):$(dist_subdir)/$(LOCAL_PACKAGE_NAME).apk) 467 468endif # jni_shared_libraries 469endif # apps_only build 470endif # LOCAL_DIST_BUNDLED_BINARIES 471 472# Lint phony targets 473.PHONY: lint-$(LOCAL_PACKAGE_NAME) 474lint-$(LOCAL_PACKAGE_NAME): PRIVATE_PATH := $(LOCAL_PATH) 475lint-$(LOCAL_PACKAGE_NAME): PRIVATE_LINT_FLAGS := $(LOCAL_LINT_FLAGS) 476lint-$(LOCAL_PACKAGE_NAME) : 477 @echo lint $(PRIVATE_PATH) 478 $(LINT) $(PRIVATE_LINT_FLAGS) $(PRIVATE_PATH) 479 480lintall : lint-$(LOCAL_PACKAGE_NAME) 481 482endif # skip_definition 483 484# Reset internal variables. 485all_res_assets := 486