make/ldgen: Fix generation of ldgen.section_infos file when shell is bash
bash doesn't escape by default from "echo", so use "printf" Closes https://github.com/espressif/esp-idf/pull/2797 Closes https://github.com/espressif/esp-idf/issues/2796
This commit is contained in:
parent
9f8587360c
commit
ef4a4105f4
|
@ -6,17 +6,13 @@ LDGEN_FRAGMENT_FILES = $(COMPONENT_LDFRAGMENTS)
|
||||||
# Target to generate linker script generator from fragments presented by each of
|
# Target to generate linker script generator from fragments presented by each of
|
||||||
# the components
|
# the components
|
||||||
define ldgen_process_template
|
define ldgen_process_template
|
||||||
ifeq ($(OS), Windows_NT)
|
$(BUILD_DIR_BASE)/ldgen.section_infos: $(LDGEN_SECTIONS_INFO_FILES) $(IDF_PATH)/make/ldgen.mk
|
||||||
$(BUILD_DIR_BASE)/ldgen.section_infos: $(LDGEN_SECTIONS_INFO_FILES)
|
printf "$(foreach section_info,$(LDGEN_SECTIONS_INFO_FILES),$(section_info)\n)" > $(BUILD_DIR_BASE)/ldgen.section_infos
|
||||||
echo -ne "$(foreach section_info,$(LDGEN_SECTIONS_INFO_FILES),$(section_info)\n)" > $(BUILD_DIR_BASE)/ldgen.section_infos
|
|
||||||
sed -i 's|^[[:blank:]]*||g' $(BUILD_DIR_BASE)/ldgen.section_infos
|
sed -i 's|^[[:blank:]]*||g' $(BUILD_DIR_BASE)/ldgen.section_infos
|
||||||
|
ifeq ($(OS), Windows_NT)
|
||||||
mv $(BUILD_DIR_BASE)/ldgen.section_infos $(BUILD_DIR_BASE)/ldgen.section_infos.temp
|
mv $(BUILD_DIR_BASE)/ldgen.section_infos $(BUILD_DIR_BASE)/ldgen.section_infos.temp
|
||||||
cygpath -w -f $(BUILD_DIR_BASE)/ldgen.section_infos.temp > $(BUILD_DIR_BASE)/ldgen.section_infos
|
cygpath -w -f $(BUILD_DIR_BASE)/ldgen.section_infos.temp > $(BUILD_DIR_BASE)/ldgen.section_infos
|
||||||
rm -f $(BUILD_DIR_BASE)/ldgen.section_infos.temp
|
rm -f $(BUILD_DIR_BASE)/ldgen.section_infos.temp
|
||||||
else
|
|
||||||
$(BUILD_DIR_BASE)/ldgen.section_infos: $(LDGEN_SECTIONS_INFO_FILES)
|
|
||||||
echo "$(foreach section_info,$(LDGEN_SECTIONS_INFO_FILES),$(section_info)\n)" > $(BUILD_DIR_BASE)/ldgen.section_infos
|
|
||||||
sed -i 's|^[[:blank:]]*||g' $(BUILD_DIR_BASE)/ldgen.section_infos
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(2): $(1) $(LDGEN_FRAGMENT_FILES) $(SDKCONFIG) $(BUILD_DIR_BASE)/ldgen.section_infos
|
$(2): $(1) $(LDGEN_FRAGMENT_FILES) $(SDKCONFIG) $(BUILD_DIR_BASE)/ldgen.section_infos
|
||||||
|
|
Loading…
Reference in a new issue