From c00df49708879dc4bfd4c13ba99d5d9af25c8eed Mon Sep 17 00:00:00 2001 From: Karakurt <43828023+0Karakurt0@users.noreply.github.com> Date: Thu, 17 Jul 2025 02:07:19 +0300 Subject: [PATCH] Added support for spaces in directory names (#2140) --- source/Makefile | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/source/Makefile b/source/Makefile index 5d370b36..d97b10cd 100644 --- a/source/Makefile +++ b/source/Makefile @@ -557,14 +557,14 @@ Core/Gen/Translation.%.cpp $(OUTPUT_DIR)/Core/Gen/translation.files/%.pickle: .. @test -d $(OUTPUT_DIR)/Core/Gen/translation.files || mkdir -p $(OUTPUT_DIR)/Core/Gen/translation.files @echo 'Generating translations for language $*' @$(HOST_PYTHON) ../Translations/make_translation.py \ - --macros $(CURDIR)/Core/Gen/macros.txt \ - -o $(CURDIR)/Core/Gen/Translation.$*.cpp \ - --output-pickled $(OUTPUT_DIR)/Core/Gen/translation.files/$*.pickle \ + --macros "$(CURDIR)/Core/Gen/macros.txt" \ + -o "$(CURDIR)/Core/Gen/Translation.$*.cpp" \ + --output-pickled "$(OUTPUT_DIR)/Core/Gen/translation.files/$*.pickle" \ $* Core/Gen/macros.txt: Makefile - @test -d $(CURDIR)/Core/Gen || mkdir -p $(CURDIR)/Core/Gen - echo "#include " | $(CC) -dM -E $(CFLAGS) -MF $(CURDIR)/Core/Gen/macros.tmp - > $(CURDIR)/Core/Gen/macros.txt + @test -d "$(CURDIR)/Core/Gen" || mkdir -p "$(CURDIR)/Core/Gen" + echo "#include " | $(CC) -dM -E $(CFLAGS) -MF "$(CURDIR)/Core/Gen/macros.tmp" - > "$(CURDIR)/Core/Gen/macros.txt" # The recipes to produce compressed translation data @@ -587,10 +587,10 @@ Core/Gen/Translation_brieflz.%.cpp: $(OUTPUT_DIR)/Core/Gen/translation.files/%.o @test -d $(@D) || mkdir -p $(@D) @echo Generating BriefLZ compressed translation for $* @OBJCOPY=$(OBJCOPY) $(HOST_PYTHON) ../Translations/make_translation.py \ - --macros $(CURDIR)/Core/Gen/macros.txt \ - -o $(CURDIR)/Core/Gen/Translation_brieflz.$*.cpp \ - --input-pickled $(OUTPUT_DIR)/Core/Gen/translation.files/$*.pickle \ - --strings-obj $(OUTPUT_DIR)/Core/Gen/translation.files/$*.o \ + --macros "$(CURDIR)/Core/Gen/macros.txt" \ + -o "$(CURDIR)/Core/Gen/Translation_brieflz.$*.cpp" \ + --input-pickled "$(OUTPUT_DIR)/Core/Gen/translation.files/$*.pickle" \ + --strings-obj "$(OUTPUT_DIR)/Core/Gen/translation.files/$*.o" \ $* Core/Gen/Translation_brieflz_font.%.cpp: $(OUTPUT_DIR)/Core/Gen/translation.files/%.pickle $(HOST_OUTPUT_DIR)/brieflz/libbrieflz.so Core/Gen/macros.txt @@ -642,9 +642,9 @@ Core/Gen/Translation_multi.$(1).cpp: $(patsubst %,../Translations/translation_%. @test -d $(OUTPUT_DIR)/Core/Gen/translation.files || mkdir -p $(OUTPUT_DIR)/Core/Gen/translation.files @echo 'Generating translations for multi-language $(2)' @$(HOST_PYTHON) ../Translations/make_translation.py \ - --macros $(CURDIR)/Core/Gen/macros.txt \ - -o $(CURDIR)/Core/Gen/Translation_multi.$(1).cpp \ - --output-pickled $(OUTPUT_DIR)/Core/Gen/translation.files/multi.$(1).pickle \ + --macros "$(CURDIR)/Core/Gen/macros.txt" \ + -o "$(CURDIR)/Core/Gen/Translation_multi.$(1).cpp" \ + --output-pickled "$(OUTPUT_DIR)/Core/Gen/translation.files/multi.$(1).pickle" \ $(3) $(OUTPUT_DIR)/Core/Gen/translation.files/multi.$(1).pickle: Core/Gen/Translation_multi.$(1).cpp @@ -653,10 +653,10 @@ Core/Gen/Translation_brieflz_multi.$(1).cpp: $(OUTPUT_DIR)/Core/Gen/translation. @test -d $$(@D) || mkdir -p $$(@D) @echo Generating BriefLZ compressed translation for multi-language $(2) @OBJCOPY=$(OBJCOPY) $(HOST_PYTHON) ../Translations/make_translation.py \ - --macros $(CURDIR)/Core/Gen/macros.txt \ - -o $(CURDIR)/Core/Gen/Translation_brieflz_multi.$(1).cpp \ - --input-pickled $(OUTPUT_DIR)/Core/Gen/translation.files/multi.$(1).pickle \ - --strings-obj $(OUTPUT_DIR)/Core/Gen/translation.files/multi.$(1).o \ + --macros "$(CURDIR)/Core/Gen/macros.txt" \ + -o "$(CURDIR)/Core/Gen/Translation_brieflz_multi.$(1).cpp" \ + --input-pickled "$(OUTPUT_DIR)/Core/Gen/translation.files/multi.$(1).pickle" \ + --strings-obj "$(OUTPUT_DIR)/Core/Gen/translation.files/multi.$(1).o" \ --compress-font \ $(3)