From 77adf857225ea0376968bcd09e488a3a7c0f6739 Mon Sep 17 00:00:00 2001 From: Alexander Sparkowsky Date: Sun, 7 Jan 2018 13:25:37 +0100 Subject: [PATCH] Add space between -I and path for CPPFLAGS In order for the Eclipse CDT GCC Build Output Parser to be able to pick up the include paths for C++/cpp files a space is required between the compiler option (-I) and the actual path. Merges https://github.com/espressif/esp-idf/pull/1474 --- make/component_wrapper.mk | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/make/component_wrapper.mk b/make/component_wrapper.mk index e43e82a515..cb7fc8c998 100644 --- a/make/component_wrapper.mk +++ b/make/component_wrapper.mk @@ -47,7 +47,7 @@ COMPONENT_ADD_INCLUDEDIRS = include COMPONENT_ADD_LDFLAGS = -l$(COMPONENT_NAME) # Define optional compiling macros -define compile_exclude +define compile_exclude COMPONENT_OBJEXCLUDE += $(1) endef @@ -59,7 +59,7 @@ define compile_only_if $(eval $(if $(1), $(call compile_include, $(2)), $(call compile_exclude, $(2)))) endef -define compile_only_if_not +define compile_only_if_not $(eval $(if $(1), $(call compile_exclude, $(2)), $(call compile_include, $(2)))) endef @@ -82,7 +82,7 @@ COMPONENT_SUBMODULES ?= # configuration at the global component level # Save component_path; we pass it to the called Makefile.componentbuild -# as COMPILING_COMPONENT_PATH, and we use it to restore the current +# as COMPILING_COMPONENT_PATH, and we use it to restore the current # COMPONENT_PATH later. COMPILING_COMPONENT_PATH := $(COMPONENT_PATH) @@ -244,12 +244,12 @@ $(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.c $(COMMON_MAKEFILES) $(COMPONENT_MAKEFILE) $(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.cpp $(COMMON_MAKEFILES) $(COMPONENT_MAKEFILE) | $(COMPONENT_SRCDIRS) $$(summary) CXX $$(patsubst $$(PWD)/%,%,$$(CURDIR))/$$@ - $$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) $$(addprefix -I,$$(COMPONENT_INCLUDES)) $$(addprefix -I,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@ + $$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) $$(addprefix -I ,$$(COMPONENT_INCLUDES)) $$(addprefix -I ,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@ $(call AppendSourceToDependencies,$$<,$$@) $(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.cc $(COMMON_MAKEFILES) $(COMPONENT_MAKEFILE) | $(COMPONENT_SRCDIRS) $$(summary) CXX $$(patsubst $$(PWD)/%,%,$$(CURDIR))/$$@ - $$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) $$(addprefix -I,$$(COMPONENT_INCLUDES)) $$(addprefix -I,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@ + $$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) $$(addprefix -I ,$$(COMPONENT_INCLUDES)) $$(addprefix -I ,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@ $(call AppendSourceToDependencies,$$<,$$@) $(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.S $(COMMON_MAKEFILES) $(COMPONENT_MAKEFILE) | $(COMPONENT_SRCDIRS)