Skip to content

Commit 77adf85

Browse files
roamingthingsprojectgus
authored andcommitted
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 espressif/esp-idf#1474
1 parent f9ad17e commit 77adf85

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

make/component_wrapper.mk

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ COMPONENT_ADD_INCLUDEDIRS = include
4747
COMPONENT_ADD_LDFLAGS = -l$(COMPONENT_NAME)
4848

4949
# Define optional compiling macros
50-
define compile_exclude
50+
define compile_exclude
5151
COMPONENT_OBJEXCLUDE += $(1)
5252
endef
5353

@@ -59,7 +59,7 @@ define compile_only_if
5959
$(eval $(if $(1), $(call compile_include, $(2)), $(call compile_exclude, $(2))))
6060
endef
6161

62-
define compile_only_if_not
62+
define compile_only_if_not
6363
$(eval $(if $(1), $(call compile_exclude, $(2)), $(call compile_include, $(2))))
6464
endef
6565

@@ -82,7 +82,7 @@ COMPONENT_SUBMODULES ?=
8282
# configuration at the global component level
8383

8484
# Save component_path; we pass it to the called Makefile.componentbuild
85-
# as COMPILING_COMPONENT_PATH, and we use it to restore the current
85+
# as COMPILING_COMPONENT_PATH, and we use it to restore the current
8686
# COMPONENT_PATH later.
8787
COMPILING_COMPONENT_PATH := $(COMPONENT_PATH)
8888

@@ -244,12 +244,12 @@ $(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.c $(COMMON_MAKEFILES) $(COMPONENT_MAKEFILE)
244244

245245
$(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.cpp $(COMMON_MAKEFILES) $(COMPONENT_MAKEFILE) | $(COMPONENT_SRCDIRS)
246246
$$(summary) CXX $$(patsubst $$(PWD)/%,%,$$(CURDIR))/$$@
247-
$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) $$(addprefix -I,$$(COMPONENT_INCLUDES)) $$(addprefix -I,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@
247+
$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) $$(addprefix -I ,$$(COMPONENT_INCLUDES)) $$(addprefix -I ,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@
248248
$(call AppendSourceToDependencies,$$<,$$@)
249249

250250
$(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.cc $(COMMON_MAKEFILES) $(COMPONENT_MAKEFILE) | $(COMPONENT_SRCDIRS)
251251
$$(summary) CXX $$(patsubst $$(PWD)/%,%,$$(CURDIR))/$$@
252-
$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) $$(addprefix -I,$$(COMPONENT_INCLUDES)) $$(addprefix -I,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@
252+
$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) $$(addprefix -I ,$$(COMPONENT_INCLUDES)) $$(addprefix -I ,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@
253253
$(call AppendSourceToDependencies,$$<,$$@)
254254

255255
$(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.S $(COMMON_MAKEFILES) $(COMPONENT_MAKEFILE) | $(COMPONENT_SRCDIRS)

0 commit comments

Comments
 (0)