forked from openkylin/platform_build
Don't recompute location of AndroidManifest.xml
The location of AndroidManifest.xml has already been computed by android_manifest.mk, don't duplicate the logic. Fixes an extra regeneration triggered by $(wildcard $(my_android_manifest)) when LOCAL_FULL_MANIFEST_FILE points to a generated file, which will not exist on the first run of kati. Test: m Change-Id: Ia56693a4dbbc7d78900019b887f766938dc55dab
This commit is contained in:
parent
282065ab15
commit
1c3d83b64c
|
@ -17,8 +17,7 @@
|
|||
# This build rule allows TradeFed test config file to be created based on
|
||||
# following inputs:
|
||||
# is_native: If the test is a native test.
|
||||
# LOCAL_MANIFEST_FILE: Name of the AndroidManifest file for the test. If it's
|
||||
# not set, default value `AndroidManifest.xml` will be used.
|
||||
# full_android_manifest: Name of the AndroidManifest file for the test.
|
||||
# Output:
|
||||
# autogen_test_config_file: Path to the test config file generated.
|
||||
|
||||
|
@ -36,25 +35,17 @@ $(autogen_test_config_file) : $(autogen_test_config_template)
|
|||
my_auto_generate_config := true
|
||||
else
|
||||
# Auto generating test config file for instrumentation test
|
||||
ifeq ($(strip $(LOCAL_MANIFEST_FILE)),)
|
||||
LOCAL_MANIFEST_FILE := AndroidManifest.xml
|
||||
endif
|
||||
ifdef LOCAL_FULL_MANIFEST_FILE
|
||||
my_android_manifest := $(LOCAL_FULL_MANIFEST_FILE)
|
||||
else
|
||||
my_android_manifest := $(LOCAL_PATH)/$(LOCAL_MANIFEST_FILE)
|
||||
endif
|
||||
ifneq (,$(wildcard $(my_android_manifest)))
|
||||
ifneq (,$(full_android_manifest))
|
||||
$(autogen_test_config_file): PRIVATE_AUTOGEN_TEST_CONFIG_SCRIPT := $(AUTOGEN_TEST_CONFIG_SCRIPT)
|
||||
$(autogen_test_config_file): PRIVATE_TEST_CONFIG_ANDROID_MANIFEST := $(my_android_manifest)
|
||||
$(autogen_test_config_file): PRIVATE_TEST_CONFIG_ANDROID_MANIFEST := $(full_android_manifest)
|
||||
$(autogen_test_config_file): PRIVATE_EMPTY_TEST_CONFIG := $(EMPTY_TEST_CONFIG)
|
||||
$(autogen_test_config_file): PRIVATE_TEMPLATE := $(INSTRUMENTATION_TEST_CONFIG_TEMPLATE)
|
||||
$(autogen_test_config_file) : $(my_android_manifest) $(EMPTY_TEST_CONFIG) $(INSTRUMENTATION_TEST_CONFIG_TEMPLATE) $(AUTOGEN_TEST_CONFIG_SCRIPT)
|
||||
$(autogen_test_config_file) : $(full_android_manifest) $(EMPTY_TEST_CONFIG) $(INSTRUMENTATION_TEST_CONFIG_TEMPLATE) $(AUTOGEN_TEST_CONFIG_SCRIPT)
|
||||
@echo "Auto generating test config $(notdir $@)"
|
||||
@rm -f $@
|
||||
$(hide) $(PRIVATE_AUTOGEN_TEST_CONFIG_SCRIPT) $@ $(PRIVATE_TEST_CONFIG_ANDROID_MANIFEST) $(PRIVATE_EMPTY_TEST_CONFIG) $(PRIVATE_TEMPLATE)
|
||||
my_auto_generate_config := true
|
||||
endif # ifeq (,$(wildcard $(my_android_manifest)))
|
||||
endif # ifneq (,$(full_android_manifest))
|
||||
endif # ifneq (true,$(is_native))
|
||||
|
||||
ifeq (true,$(my_auto_generate_config))
|
||||
|
@ -65,5 +56,4 @@ else
|
|||
autogen_test_config_file :=
|
||||
endif
|
||||
|
||||
my_android_manifest :=
|
||||
my_auto_generate_config :=
|
||||
|
|
|
@ -469,6 +469,8 @@ LOCAL_CUSTOM_BUILD_STEP_INPUT:=
|
|||
LOCAL_CUSTOM_BUILD_STEP_OUTPUT:=
|
||||
LOCAL_IS_AUX_MODULE :=
|
||||
|
||||
full_android_manifest :=
|
||||
|
||||
# Trim MAKEFILE_LIST so that $(call my-dir) doesn't need to
|
||||
# iterate over thousands of entries every time.
|
||||
# Leave the current makefile to make sure we don't break anything
|
||||
|
|
Loading…
Reference in New Issue