Merge "Improve checks for include dirs outside the source tree"
This commit is contained in:
@@ -1295,9 +1295,13 @@ endif
|
||||
|
||||
my_c_includes := $(foreach inc,$(my_c_includes),$(call clean-path,$(inc)))
|
||||
|
||||
my_outside_includes := $(filter-out $(OUT_DIR)/%,$(filter /%,$(my_c_includes)))
|
||||
my_outside_includes := $(filter-out $(OUT_DIR)/%,$(filter /%,$(my_c_includes)) $(filter ../%,$(my_c_includes)))
|
||||
ifneq ($(my_outside_includes),)
|
||||
$(error $(LOCAL_MODULE_MAKEFILE): $(LOCAL_MODULE): C_INCLUDES must be under the source or output directories: $(my_outside_includes))
|
||||
ifeq ($(BUILD_BROKEN_OUTSIDE_INCLUDE_DIRS),true)
|
||||
$(call pretty-warning,C_INCLUDES must be under the source or output directories: $(my_outside_includes))
|
||||
else
|
||||
$(call pretty-error,C_INCLUDES must be under the source or output directories: $(my_outside_includes))
|
||||
endif
|
||||
endif
|
||||
|
||||
# all_objects includes gen_o_objects which were part of LOCAL_GENERATED_SOURCES;
|
||||
|
Reference in New Issue
Block a user