build: Add phony package to build enforce RRO packages
This allows one to build *__auto_generated_rro_(product|vendor).apk under $(PRODUCT_OUT)/(product|vendor)/overlay/ without having to build the full partition image or do full android build. Change-Id: I0c215ed7968e0cba348d344e00a014470ac37b6e
This commit is contained in:
parent
201b843839
commit
f84254ef1b
2 changed files with 19 additions and 0 deletions
|
@ -3932,6 +3932,7 @@ $(foreach source,$(ENFORCE_RRO_SOURCES), \
|
|||
$(eval enforce_rro_partition := $(word 6,$(_o))) \
|
||||
$(eval include $(BUILD_SYSTEM)/generate_enforce_rro.mk) \
|
||||
$(eval ALL_MODULES.$$(enforce_rro_source_module).REQUIRED_FROM_TARGET += $$(LOCAL_PACKAGE_NAME)) \
|
||||
$(eval ENFORCE_RRO_PACKAGES_$$(call to-upper,$(enforce_rro_partition)) += $$(LOCAL_PACKAGE_NAME)) \
|
||||
)
|
||||
endef
|
||||
|
||||
|
|
18
core/main.mk
18
core/main.mk
|
@ -252,6 +252,8 @@ $(readonly-final-product-vars)
|
|||
|
||||
ifneq ($(PRODUCT_ENFORCE_RRO_TARGETS),)
|
||||
ENFORCE_RRO_SOURCES :=
|
||||
ENFORCE_RRO_PACKAGES_PRODUCT :=
|
||||
ENFORCE_RRO_PACKAGES_VENDOR :=
|
||||
endif
|
||||
|
||||
# Color-coded warnings including current module info
|
||||
|
@ -325,6 +327,22 @@ endef
|
|||
# -------------------------------------------------------------------
|
||||
ifneq ($(PRODUCT_ENFORCE_RRO_TARGETS),)
|
||||
$(call generate_all_enforce_rro_packages)
|
||||
|
||||
_modules_with_rro_suffix :=
|
||||
$(foreach m,$(PRODUCT_PACKAGES), \
|
||||
$(eval _modules_with_rro_suffix += $$(m)__$(PRODUCT_NAME)__auto_generated_rro_%))
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := enforce_rro_packages_product
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_REQUIRED_MODULES := $(filter $(_modules_with_rro_suffix),$(ENFORCE_RRO_PACKAGES_PRODUCT))
|
||||
include $(BUILD_PHONY_PACKAGE)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := enforce_rro_packages_vendor
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_REQUIRED_MODULES := $(filter $(_modules_with_rro_suffix),$(ENFORCE_RRO_PACKAGES_VENDOR))
|
||||
include $(BUILD_PHONY_PACKAGE)
|
||||
endif
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue