From: Angus Gratton Date: Tue, 17 Sep 2019 03:47:05 +0000 (+1000) Subject: build: In GNU Make, use "cygpath -m" to avoid backslashes X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d371605315efe3e707c877ce49b86bca6ff19340;p=esp-idf build: In GNU Make, use "cygpath -m" to avoid backslashes Fixes issues where backslashes in KCONFIG paths are later expanded as shell escape sequences. --- diff --git a/make/ldgen.mk b/make/ldgen.mk index 8519a01338..01fd2ccb79 100644 --- a/make/ldgen.mk +++ b/make/ldgen.mk @@ -7,7 +7,7 @@ LDGEN_LIBRARIES=$(foreach libcomp,$(COMPONENT_LIBRARIES),$(BUILD_DIR_BASE)/$(lib ifeq ($(OS),Windows_NT) define ldgen_process_template $(BUILD_DIR_BASE)/ldgen_libraries: $(LDGEN_LIBRARIES) $(IDF_PATH)/make/ldgen.mk - printf "$(foreach info,$(LDGEN_LIBRARIES),$(subst \,/,$(shell cygpath -w $(info)))\n)" > $(BUILD_DIR_BASE)/ldgen_libraries + printf "$(foreach info,$(LDGEN_LIBRARIES),$(subst \,/,$(shell cygpath -m $(info)))\n)" > $(BUILD_DIR_BASE)/ldgen_libraries $(2): $(1) $(LDGEN_FRAGMENT_FILES) $(SDKCONFIG) $(BUILD_DIR_BASE)/ldgen_libraries @echo 'Generating $(notdir $(2))' @@ -18,8 +18,8 @@ $(2): $(1) $(LDGEN_FRAGMENT_FILES) $(SDKCONFIG) $(BUILD_DIR_BASE)/ldgen_librarie --libraries-file $(BUILD_DIR_BASE)/ldgen_libraries \ --output $(2) \ --kconfig $(IDF_PATH)/Kconfig \ - --env "COMPONENT_KCONFIGS=$(foreach k, $(COMPONENT_KCONFIGS), $(shell cygpath -w $(k)))" \ - --env "COMPONENT_KCONFIGS_PROJBUILD=$(foreach k, $(COMPONENT_KCONFIGS_PROJBUILD), $(shell cygpath -w $(k)))" \ + --env "COMPONENT_KCONFIGS=$(foreach k, $(COMPONENT_KCONFIGS), $(shell cygpath -m $(k)))" \ + --env "COMPONENT_KCONFIGS_PROJBUILD=$(foreach k, $(COMPONENT_KCONFIGS_PROJBUILD), $(shell cygpath -m $(k)))" \ --env "IDF_CMAKE=n" \ --objdump $(OBJDUMP) endef @@ -47,4 +47,4 @@ endif # Windows_NT define ldgen_create_commands ldgen-clean: rm -f $(BUILD_DIR_BASE)/ldgen_libraries -endef \ No newline at end of file +endef diff --git a/make/project_config.mk b/make/project_config.mk index 1a4e741266..d5e8020dc6 100644 --- a/make/project_config.mk +++ b/make/project_config.mk @@ -7,9 +7,9 @@ COMPONENT_SDKCONFIG_RENAMES := $(foreach component,$(COMPONENT_PATHS),$(wildcard ifeq ($(OS),Windows_NT) # kconfiglib requires Windows-style paths for kconfig files -COMPONENT_KCONFIGS := $(shell cygpath -w $(COMPONENT_KCONFIGS)) -COMPONENT_KCONFIGS_PROJBUILD := $(shell cygpath -w $(COMPONENT_KCONFIGS_PROJBUILD)) -COMPONENT_SDKCONFIG_RENAMES := $(shell cygpath -w $(COMPONENT_SDKCONFIG_RENAMES)) +COMPONENT_KCONFIGS := $(shell cygpath -m $(COMPONENT_KCONFIGS)) +COMPONENT_KCONFIGS_PROJBUILD := $(shell cygpath -m $(COMPONENT_KCONFIGS_PROJBUILD)) +COMPONENT_SDKCONFIG_RENAMES := $(shell cygpath -m $(COMPONENT_SDKCONFIG_RENAMES)) endif #For doing make menuconfig etc