Add more BUILD_BROKEN_* logic
Make the values tristate, so that we can differentiate set vs not in
scripts that parse the logs.
Also add some placeholders for warnings that I expect to turn into
errors.
Test: Set BUILD_BROKEN_PHONY_TARGETS to "foo"
Change-Id: I3f7e1e0f85dcef84d6461fc40bdd83dc5bf75ff7
diff --git a/core/envsetup.mk b/core/envsetup.mk
index a3e78e7..2235219 100644
--- a/core/envsetup.mk
+++ b/core/envsetup.mk
@@ -273,6 +273,23 @@
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))
TARGET_COPY_OUT_VENDOR := system/vendor