Start deprecating OVERRIDE_BUILT_MODULE_PATH
We no longer need to use $PRODUCT_OUT/obj/lib as a linker path, we can directly specify the shared libraries to the linker. So install both into the standard built module path, and declare a copy rule to the old OVERRIDE_BUILT_MODULE_PATH location. This way we can incrementally move users from the old location to the standard path. Test: m -j Change-Id: I3c6140ac26e5e5ca486337ce0192e15e530da32c
This commit is contained in:
parent
e74e77fe01
commit
f72308af83
|
@ -248,6 +248,8 @@ generated_sources_dir := $(call local-generated-sources-dir)
|
|||
###########################################################
|
||||
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
|
||||
# internal SHARED_LIBRARIES build files.
|
||||
OVERRIDE_BUILT_MODULE_PATH := $(strip $(OVERRIDE_BUILT_MODULE_PATH))
|
||||
|
@ -255,11 +257,8 @@ ifdef OVERRIDE_BUILT_MODULE_PATH
|
|||
ifneq ($(LOCAL_MODULE_CLASS),SHARED_LIBRARIES)
|
||||
$(error $(LOCAL_PATH): Illegal use of OVERRIDE_BUILT_MODULE_PATH)
|
||||
endif
|
||||
built_module_path := $(OVERRIDE_BUILT_MODULE_PATH)
|
||||
else
|
||||
built_module_path := $(intermediates)
|
||||
$(eval $(call copy-one-file,$(LOCAL_BUILT_MODULE),$(OVERRIDE_BUILT_MODULE_PATH)/$(my_built_module_stem)))
|
||||
endif
|
||||
LOCAL_BUILT_MODULE := $(built_module_path)/$(my_built_module_stem)
|
||||
|
||||
ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE))
|
||||
# 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
|
||||
# Build .toc file when using mm, mma, or make $(my_register_name)
|
||||
$(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
|
||||
|
||||
###########################################################
|
||||
|
|
|
@ -375,7 +375,7 @@ my_apk_split_configs :=
|
|||
ifdef LOCAL_PACKAGE_SPLITS
|
||||
my_apk_split_configs := $(LOCAL_PACKAGE_SPLITS)
|
||||
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)
|
||||
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.
|
||||
$(built_apk_splits): PRIVATE_PRIVATE_KEY := $(private_key)
|
||||
$(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 \
|
||||
echo 'No $@ generated, check your apk splitting parameters.' 1>&2; \
|
||||
rm $<; exit 1; \
|
||||
|
@ -663,14 +663,14 @@ $(built_apk_splits) : $(built_module_path)/%.apk : $(LOCAL_BUILT_MODULE)
|
|||
$(sign-package)
|
||||
|
||||
# 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: $@"
|
||||
$(copy-file-to-new-target)
|
||||
|
||||
# Register the additional built and installed files.
|
||||
ALL_MODULES.$(my_register_name).INSTALLED += $(installed_apk_splits)
|
||||
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>".
|
||||
$(my_all_targets): $(installed_apk_splits)
|
||||
|
@ -680,7 +680,7 @@ ifdef LOCAL_COMPATIBILITY_SUITE
|
|||
$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
|
||||
$(eval my_compat_dist_$(suite) := $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
|
||||
$(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)
|
||||
|
||||
|
|
|
@ -370,7 +370,7 @@ endif
|
|||
## Install split apks.
|
||||
ifdef LOCAL_PACKAGE_SPLITS
|
||||
# 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)))
|
||||
|
||||
# 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) : PRIVATE_PRIVATE_KEY := $(LOCAL_CERTIFICATE).pk8
|
||||
$(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)
|
||||
$(sign-package)
|
||||
|
||||
# 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: $@"
|
||||
$(copy-file-to-new-target)
|
||||
|
||||
# Register the additional built and installed files.
|
||||
ALL_MODULES.$(my_register_name).INSTALLED += $(installed_apk_splits)
|
||||
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>".
|
||||
$(my_all_targets): $(installed_apk_splits)
|
||||
|
|
Loading…
Reference in New Issue