Merge "Start deprecating OVERRIDE_BUILT_MODULE_PATH" into oc-dev-plus-aosp
This commit is contained in:
commit
87f0e524ca
3 changed files with 17 additions and 13 deletions
|
@ -248,6 +248,8 @@ generated_sources_dir := $(call local-generated-sources-dir)
|
||||||
###########################################################
|
###########################################################
|
||||||
include $(BUILD_SYSTEM)/configure_module_stem.mk
|
include $(BUILD_SYSTEM)/configure_module_stem.mk
|
||||||
|
|
||||||
|
LOCAL_BUILT_MODULE := $(intermediates)/$(my_built_module_stem)
|
||||||
|
|
||||||
# OVERRIDE_BUILT_MODULE_PATH is only allowed to be used by the
|
# OVERRIDE_BUILT_MODULE_PATH is only allowed to be used by the
|
||||||
# internal SHARED_LIBRARIES build files.
|
# internal SHARED_LIBRARIES build files.
|
||||||
OVERRIDE_BUILT_MODULE_PATH := $(strip $(OVERRIDE_BUILT_MODULE_PATH))
|
OVERRIDE_BUILT_MODULE_PATH := $(strip $(OVERRIDE_BUILT_MODULE_PATH))
|
||||||
|
@ -255,11 +257,8 @@ ifdef OVERRIDE_BUILT_MODULE_PATH
|
||||||
ifneq ($(LOCAL_MODULE_CLASS),SHARED_LIBRARIES)
|
ifneq ($(LOCAL_MODULE_CLASS),SHARED_LIBRARIES)
|
||||||
$(error $(LOCAL_PATH): Illegal use of OVERRIDE_BUILT_MODULE_PATH)
|
$(error $(LOCAL_PATH): Illegal use of OVERRIDE_BUILT_MODULE_PATH)
|
||||||
endif
|
endif
|
||||||
built_module_path := $(OVERRIDE_BUILT_MODULE_PATH)
|
$(eval $(call copy-one-file,$(LOCAL_BUILT_MODULE),$(OVERRIDE_BUILT_MODULE_PATH)/$(my_built_module_stem)))
|
||||||
else
|
|
||||||
built_module_path := $(intermediates)
|
|
||||||
endif
|
endif
|
||||||
LOCAL_BUILT_MODULE := $(built_module_path)/$(my_built_module_stem)
|
|
||||||
|
|
||||||
ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE))
|
ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE))
|
||||||
# Apk and its attachments reside in its own subdir.
|
# Apk and its attachments reside in its own subdir.
|
||||||
|
@ -295,6 +294,11 @@ $(LOCAL_BUILT_MODULE).toc: $(LOCAL_BUILT_MODULE)
|
||||||
.KATI_RESTAT: $(LOCAL_BUILT_MODULE).toc
|
.KATI_RESTAT: $(LOCAL_BUILT_MODULE).toc
|
||||||
# Build .toc file when using mm, mma, or make $(my_register_name)
|
# Build .toc file when using mm, mma, or make $(my_register_name)
|
||||||
$(my_all_targets): $(LOCAL_BUILT_MODULE).toc
|
$(my_all_targets): $(LOCAL_BUILT_MODULE).toc
|
||||||
|
|
||||||
|
ifdef OVERRIDE_BUILT_MODULE_PATH
|
||||||
|
$(eval $(call copy-one-file,$(LOCAL_BUILT_MODULE).toc,$(OVERRIDE_BUILT_MODULE_PATH)/$(my_built_module_stem).toc))
|
||||||
|
$(OVERRIDE_BUILT_MODULE_PATH)/$(my_built_module_stem).toc: $(OVERRIDE_BUILT_MODULE_PATH)/$(my_built_module_stem)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
|
|
|
@ -375,7 +375,7 @@ my_apk_split_configs :=
|
||||||
ifdef LOCAL_PACKAGE_SPLITS
|
ifdef LOCAL_PACKAGE_SPLITS
|
||||||
my_apk_split_configs := $(LOCAL_PACKAGE_SPLITS)
|
my_apk_split_configs := $(LOCAL_PACKAGE_SPLITS)
|
||||||
my_split_suffixes := $(subst $(comma),_,$(my_apk_split_configs))
|
my_split_suffixes := $(subst $(comma),_,$(my_apk_split_configs))
|
||||||
built_apk_splits := $(foreach s,$(my_split_suffixes),$(built_module_path)/package_$(s).apk)
|
built_apk_splits := $(foreach s,$(my_split_suffixes),$(intermediates)/package_$(s).apk)
|
||||||
installed_apk_splits := $(foreach s,$(my_split_suffixes),$(my_module_path)/$(LOCAL_MODULE)_$(s).apk)
|
installed_apk_splits := $(foreach s,$(my_split_suffixes),$(my_module_path)/$(LOCAL_MODULE)_$(s).apk)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -655,7 +655,7 @@ ifdef LOCAL_PACKAGE_SPLITS
|
||||||
# That way the build system will rerun the aapt after the user changes the splitting parameters.
|
# That way the build system will rerun the aapt after the user changes the splitting parameters.
|
||||||
$(built_apk_splits): PRIVATE_PRIVATE_KEY := $(private_key)
|
$(built_apk_splits): PRIVATE_PRIVATE_KEY := $(private_key)
|
||||||
$(built_apk_splits): PRIVATE_CERTIFICATE := $(certificate)
|
$(built_apk_splits): PRIVATE_CERTIFICATE := $(certificate)
|
||||||
$(built_apk_splits) : $(built_module_path)/%.apk : $(LOCAL_BUILT_MODULE)
|
$(built_apk_splits) : $(intermediates)/%.apk : $(LOCAL_BUILT_MODULE)
|
||||||
$(hide) if [ ! -f $@ ]; then \
|
$(hide) if [ ! -f $@ ]; then \
|
||||||
echo 'No $@ generated, check your apk splitting parameters.' 1>&2; \
|
echo 'No $@ generated, check your apk splitting parameters.' 1>&2; \
|
||||||
rm $<; exit 1; \
|
rm $<; exit 1; \
|
||||||
|
@ -663,14 +663,14 @@ $(built_apk_splits) : $(built_module_path)/%.apk : $(LOCAL_BUILT_MODULE)
|
||||||
$(sign-package)
|
$(sign-package)
|
||||||
|
|
||||||
# Rules to install the splits
|
# Rules to install the splits
|
||||||
$(installed_apk_splits) : $(my_module_path)/$(LOCAL_MODULE)_%.apk : $(built_module_path)/package_%.apk
|
$(installed_apk_splits) : $(my_module_path)/$(LOCAL_MODULE)_%.apk : $(intermediates)/package_%.apk
|
||||||
@echo "Install: $@"
|
@echo "Install: $@"
|
||||||
$(copy-file-to-new-target)
|
$(copy-file-to-new-target)
|
||||||
|
|
||||||
# Register the additional built and installed files.
|
# Register the additional built and installed files.
|
||||||
ALL_MODULES.$(my_register_name).INSTALLED += $(installed_apk_splits)
|
ALL_MODULES.$(my_register_name).INSTALLED += $(installed_apk_splits)
|
||||||
ALL_MODULES.$(my_register_name).BUILT_INSTALLED += \
|
ALL_MODULES.$(my_register_name).BUILT_INSTALLED += \
|
||||||
$(foreach s,$(my_split_suffixes),$(built_module_path)/package_$(s).apk:$(my_module_path)/$(LOCAL_MODULE)_$(s).apk)
|
$(foreach s,$(my_split_suffixes),$(intermediates)/package_$(s).apk:$(my_module_path)/$(LOCAL_MODULE)_$(s).apk)
|
||||||
|
|
||||||
# Make sure to install the splits when you run "make <module_name>".
|
# Make sure to install the splits when you run "make <module_name>".
|
||||||
$(my_all_targets): $(installed_apk_splits)
|
$(my_all_targets): $(installed_apk_splits)
|
||||||
|
@ -680,7 +680,7 @@ ifdef LOCAL_COMPATIBILITY_SUITE
|
||||||
$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
|
$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
|
||||||
$(eval my_compat_dist_$(suite) := $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
|
$(eval my_compat_dist_$(suite) := $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
|
||||||
$(foreach s,$(my_split_suffixes),\
|
$(foreach s,$(my_split_suffixes),\
|
||||||
$(built_module_path)/package_$(s).apk:$(dir)/$(LOCAL_MODULE)_$(s).apk))))
|
$(intermediates)/package_$(s).apk:$(dir)/$(LOCAL_MODULE)_$(s).apk))))
|
||||||
|
|
||||||
$(call create-suite-dependencies)
|
$(call create-suite-dependencies)
|
||||||
|
|
||||||
|
|
|
@ -370,7 +370,7 @@ endif
|
||||||
## Install split apks.
|
## Install split apks.
|
||||||
ifdef LOCAL_PACKAGE_SPLITS
|
ifdef LOCAL_PACKAGE_SPLITS
|
||||||
# LOCAL_PACKAGE_SPLITS is a list of apks to be installed.
|
# LOCAL_PACKAGE_SPLITS is a list of apks to be installed.
|
||||||
built_apk_splits := $(addprefix $(built_module_path)/,$(notdir $(LOCAL_PACKAGE_SPLITS)))
|
built_apk_splits := $(addprefix $(intermediates)/,$(notdir $(LOCAL_PACKAGE_SPLITS)))
|
||||||
installed_apk_splits := $(addprefix $(my_module_path)/,$(notdir $(LOCAL_PACKAGE_SPLITS)))
|
installed_apk_splits := $(addprefix $(my_module_path)/,$(notdir $(LOCAL_PACKAGE_SPLITS)))
|
||||||
|
|
||||||
# Rules to sign the split apks.
|
# Rules to sign the split apks.
|
||||||
|
@ -383,19 +383,19 @@ my_src_dir := $(LOCAL_PATH)/$(my_src_dir)
|
||||||
$(built_apk_splits) : $(LOCAL_CERTIFICATE).pk8 $(LOCAL_CERTIFICATE).x509.pem
|
$(built_apk_splits) : $(LOCAL_CERTIFICATE).pk8 $(LOCAL_CERTIFICATE).x509.pem
|
||||||
$(built_apk_splits) : PRIVATE_PRIVATE_KEY := $(LOCAL_CERTIFICATE).pk8
|
$(built_apk_splits) : PRIVATE_PRIVATE_KEY := $(LOCAL_CERTIFICATE).pk8
|
||||||
$(built_apk_splits) : PRIVATE_CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem
|
$(built_apk_splits) : PRIVATE_CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem
|
||||||
$(built_apk_splits) : $(built_module_path)/%.apk : $(my_src_dir)/%.apk
|
$(built_apk_splits) : $(intermediates)/%.apk : $(my_src_dir)/%.apk
|
||||||
$(copy-file-to-new-target)
|
$(copy-file-to-new-target)
|
||||||
$(sign-package)
|
$(sign-package)
|
||||||
|
|
||||||
# Rules to install the split apks.
|
# Rules to install the split apks.
|
||||||
$(installed_apk_splits) : $(my_module_path)/%.apk : $(built_module_path)/%.apk
|
$(installed_apk_splits) : $(my_module_path)/%.apk : $(intermediates)/%.apk
|
||||||
@echo "Install: $@"
|
@echo "Install: $@"
|
||||||
$(copy-file-to-new-target)
|
$(copy-file-to-new-target)
|
||||||
|
|
||||||
# Register the additional built and installed files.
|
# Register the additional built and installed files.
|
||||||
ALL_MODULES.$(my_register_name).INSTALLED += $(installed_apk_splits)
|
ALL_MODULES.$(my_register_name).INSTALLED += $(installed_apk_splits)
|
||||||
ALL_MODULES.$(my_register_name).BUILT_INSTALLED += \
|
ALL_MODULES.$(my_register_name).BUILT_INSTALLED += \
|
||||||
$(foreach s,$(LOCAL_PACKAGE_SPLITS),$(built_module_path)/$(notdir $(s)):$(my_module_path)/$(notdir $(s)))
|
$(foreach s,$(LOCAL_PACKAGE_SPLITS),$(intermediates)/$(notdir $(s)):$(my_module_path)/$(notdir $(s)))
|
||||||
|
|
||||||
# Make sure to install the splits when you run "make <module_name>".
|
# Make sure to install the splits when you run "make <module_name>".
|
||||||
$(my_all_targets): $(installed_apk_splits)
|
$(my_all_targets): $(installed_apk_splits)
|
||||||
|
|
Loading…
Reference in a new issue