build system: Order private include directories before public ones

This allows the component to override a header in a public include
directory, when only its own source files are being compiled.
pull/822/head
Angus Gratton 2017-07-05 11:56:41 +08:00 zatwierdzone przez Angus Gratton
rodzic abdbb4292a
commit 0881ba83ff
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -104,7 +104,7 @@ COMPONENT_EMBED_OBJS ?= $(addsuffix .bin.o,$(notdir $(COMPONENT_EMBED_FILES))) $
# variable with all the include dirs from all the components in random order. This # variable with all the include dirs from all the components in random order. This
# means we can accidentally grab a header from another component before grabbing our own. # means we can accidentally grab a header from another component before grabbing our own.
# To make sure that does not happen, re-order the includes so ours come first. # To make sure that does not happen, re-order the includes so ours come first.
OWN_INCLUDES:=$(abspath $(addprefix $(COMPONENT_PATH)/,$(COMPONENT_ADD_INCLUDEDIRS) $(COMPONENT_PRIV_INCLUDEDIRS))) OWN_INCLUDES:=$(abspath $(addprefix $(COMPONENT_PATH)/,$(COMPONENT_PRIV_INCLUDEDIRS) $(COMPONENT_ADD_INCLUDEDIRS)))
COMPONENT_INCLUDES := $(OWN_INCLUDES) $(filter-out $(OWN_INCLUDES),$(COMPONENT_INCLUDES)) COMPONENT_INCLUDES := $(OWN_INCLUDES) $(filter-out $(OWN_INCLUDES),$(COMPONENT_INCLUDES))