am 69c3f457: am dc7fee9f: Set up rules to merge AndroidManifest.xmls

* commit '69c3f4570d80eab99bfcab604209dc7bb3ae5537':
  Set up rules to merge AndroidManifest.xmls
This commit is contained in:
Ying Wang 2014-02-06 18:11:51 +00:00 committed by Android Git Automerger
commit dd22aee1f4
5 changed files with 32 additions and 19 deletions

25
core/android_manifest.mk Normal file
View file

@ -0,0 +1,25 @@
# Handle AndroidManifest.xmls
# Input: LOCAL_MANIFEST_FILE, LOCAL_FULL_MANIFEST_FILE, LOCAL_FULL_LIBS_MANIFEST_FILES
# Output: full_android_manifest
ifeq ($(strip $(LOCAL_MANIFEST_FILE)),)
LOCAL_MANIFEST_FILE := AndroidManifest.xml
endif
ifdef LOCAL_FULL_MANIFEST_FILE
full_android_manifest := $(LOCAL_FULL_MANIFEST_FILE)
else
full_android_manifest := $(LOCAL_PATH)/$(LOCAL_MANIFEST_FILE)
endif
# Set up rules to merge library manifest files
ifdef LOCAL_FULL_LIBS_MANIFEST_FILES
main_android_manifest := $(full_android_manifest)
full_android_manifest := $(intermediates.COMMON)/AndroidManifest.xml
$(full_android_manifest): PRIVATE_LIBS_MANIFESTS := $(LOCAL_FULL_LIBS_MANIFEST_FILES)
$(full_android_manifest) : $(main_android_manifest) $(LOCAL_FULL_LIBS_MANIFEST_FILES)
@echo "Merge android manifest files: $@ <-- $^"
@mkdir -p $(dir $@)
$(hide) $(ANDROID_MANIFEST_MERGER) --main $< --libs $(PRIVATE_LIBS_MANIFESTS) \
--out $@
endif

View file

@ -109,6 +109,7 @@ LOCAL_EMMA_COVERAGE_FILTER:=
LOCAL_WARNINGS_ENABLE:=
LOCAL_FULL_MANIFEST_FILE:=
LOCAL_MANIFEST_FILE:=
LOCAL_FULL_LIBS_MANIFEST_FILES:=
LOCAL_RENDERSCRIPT_INCLUDES:=
LOCAL_RENDERSCRIPT_INCLUDES_OVERRIDE:=
LOCAL_RENDERSCRIPT_CC:=

View file

@ -348,6 +348,9 @@ ZIPALIGN := $(HOST_OUT_EXECUTABLES)/zipalign$(HOST_EXECUTABLE_SUFFIX)
FINDBUGS := prebuilt/common/findbugs/bin/findbugs
EMMA_JAR := external/emma/lib/emma$(COMMON_JAVA_PACKAGE_SUFFIX)
# Tool to merge AndroidManifest.xmls
ANDROID_MANIFEST_MERGER := java -classpath prebuilts/devtools/tools/lib/manifest-merger.jar com.android.manifmerger.Main merge
YACC_HEADER_SUFFIX:= .hpp
# Don't use column under Windows, cygwin or not

View file

@ -58,16 +58,6 @@ $(error $(LOCAL_PATH): Package modules may not define LOCAL_MODULE)
endif
LOCAL_MODULE := $(LOCAL_PACKAGE_NAME)
ifeq ($(strip $(LOCAL_MANIFEST_FILE)),)
LOCAL_MANIFEST_FILE := AndroidManifest.xml
endif
# If you need to put the MANIFEST_FILE outside of LOCAL_PATH
# you can use FULL_MANIFEST_FILE
ifeq ($(strip $(LOCAL_FULL_MANIFEST_FILE)),)
LOCAL_FULL_MANIFEST_FILE := $(LOCAL_PATH)/$(LOCAL_MANIFEST_FILE)
endif
ifneq ($(strip $(LOCAL_MODULE_CLASS)),)
$(error $(LOCAL_PATH): Package modules may not set LOCAL_MODULE_CLASS)
endif
@ -197,7 +187,8 @@ ifeq ($(LOCAL_SDK_RES_VERSION),)
LOCAL_SDK_RES_VERSION:=$(LOCAL_SDK_VERSION)
endif
full_android_manifest := $(LOCAL_FULL_MANIFEST_FILE)
include $(BUILD_SYSTEM)/android_manifest.mk
$(LOCAL_INTERMEDIATE_TARGETS): \
PRIVATE_ANDROID_MANIFEST := $(full_android_manifest)
ifneq (,$(filter-out current, $(LOCAL_SDK_VERSION)))

View file

@ -66,14 +66,7 @@ include $(BUILD_SYSTEM)/java_library.mk
ifneq (,$(all_resources))
R_file_stamp := $(LOCAL_INTERMEDIATE_SOURCE_DIR)/R.stamp
ifeq ($(strip $(LOCAL_MANIFEST_FILE)),)
LOCAL_MANIFEST_FILE := AndroidManifest.xml
endif
ifdef LOCAL_FULL_MANIFEST_FILE
full_android_manifest := $(LOCAL_FULL_MANIFEST_FILE)
else
full_android_manifest := $(LOCAL_PATH)/$(LOCAL_MANIFEST_FILE)
endif
include $(BUILD_SYSTEM)/android_manifest.mk
LOCAL_SDK_RES_VERSION:=$(strip $(LOCAL_SDK_RES_VERSION))
ifeq ($(LOCAL_SDK_RES_VERSION),)