diff --git a/core/config.mk b/core/config.mk index 0920b5608..9f8426ce8 100644 --- a/core/config.mk +++ b/core/config.mk @@ -208,8 +208,10 @@ endif # ############################################################### # Broken build defaults # ############################################################### -# Assume that all boards have duplicate rules right now. -BUILD_BROKEN_DUP_RULES := true +BUILD_BROKEN_ANDROIDMK_EXPORTS := +BUILD_BROKEN_DUP_COPY_HEADERS := +BUILD_BROKEN_DUP_RULES := +BUILD_BROKEN_PHONY_TARGETS := # ############################################################### # Include sub-configuration files diff --git a/core/envsetup.mk b/core/envsetup.mk index a3e78e7ca..223521976 100644 --- a/core/envsetup.mk +++ b/core/envsetup.mk @@ -272,6 +272,23 @@ ifneq ($(MALLOC_IMPL),) endif board_config_mk := +########################################### +# Handle BUILD_BROKEN_* settings +vars := \ + BUILD_BROKEN_ANDROIDMK_EXPORTS \ + BUILD_BROKEN_DUP_COPY_HEADERS \ + BUILD_BROKEN_DUP_RULES \ + BUILD_BROKEN_PHONY_TARGETS + +$(foreach var,$(vars),$(eval $(var) := $$(strip $$($(var))))) + +$(foreach var,$(vars), \ + $(if $(filter-out true false,$($(var))), \ + $(error Valid values of $(var) are "true", "false", and "". Not "$($(var))"))) + +.KATI_READONLY := $(vars) + + ########################################### # Now we can substitute with the real value of TARGET_COPY_OUT_VENDOR ifeq ($(TARGET_COPY_OUT_VENDOR),$(_vendor_path_placeholder))