Fix Build not work under path with space

Fix #10907, close #10914
This commit is contained in:
ArkadiuszMichalski 2021-12-14 11:30:41 +01:00 committed by Don Ho
parent 31799472b4
commit 85d6108a6b
2 changed files with 4 additions and 1 deletions

View File

@ -59,3 +59,4 @@ MinGW-w64 can be downloaded [here](https://sourceforge.net/projects/mingw-w64/fi
* To have a debug build just add `DEBUG=1` to the `mingw32-make` invocation above. The output directory then will be suffixed with `-debug`.
* To see commands being executed add `VERBOSE=1` to the same command.
* When switching between compilers or between release/debug modes, `mingw32-make clean` must be executed first.
* If you are building the project outside of the `PowerEditor/gcc` directory, for example when using `-f` option, then the entire project path must not contain any spaces. Additionally, the path to `makefile` of this project should be listed as first.

View File

@ -99,6 +99,7 @@ BIN_DATA := $(addprefix $(TARGET_DIRECTORY)/,$(BIN_DATA))
INSTALLER_DATA := $(addprefix $(TARGET_DIRECTORY)/,$(INSTALLER_DATA))
SCINTILLA_TARGET := $(BUILD_DIRECTORY)/$(SCINTILLA_TARGET)
SCINTILLA_TARGET_PATH := ../../PowerEditor/gcc/$(SCINTILLA_TARGET)
LD_PATH += $(BUILD_DIRECTORY)
@ -115,6 +116,7 @@ SRC_EXCLUDE := $(patsubst ../%,$(MAKEFILE_PARENT)/%,$(SRC_EXCLUDE))
INSTALLER_DIRECTORY := $(patsubst ../%,$(MAKEFILE_PARENT)/%,$(INSTALLER_DIRECTORY))
SCINTILLA_DIRECTORY := $(patsubst ../%,$(MAKEFILE_PARENT)/%,$(SCINTILLA_DIRECTORY))
SCINTILLA_TARGET_PATH := $(CURDIR)/$(SCINTILLA_TARGET)
CXXFLAGS := $(patsubst ../%,$(MAKEFILE_PARENT)/%,$(CXXFLAGS))
CPP_PATH := $(patsubst ../%,$(MAKEFILE_PARENT)/%,$(CPP_PATH))
@ -196,7 +198,7 @@ $(BUILD_DIRECTORY):
$(AT)$(MKDIR) $(call normalize-path,$(sort $@ $(patsubst %/,%,$(dir $(CXX_TARGETS) $(RC_TARGETS)))))
$(SCINTILLA_TARGET): | $(BUILD_DIRECTORY)
$(AT)$(MAKE) $(SUBMAKEFLAGS) -C $(SCINTILLA_DIRECTORY)/win32 LIBLEX=$(CURDIR)/$(SCINTILLA_TARGET) $(CURDIR)/$(SCINTILLA_TARGET)
$(AT)$(MAKE) $(SUBMAKEFLAGS) -C $(SCINTILLA_DIRECTORY)/win32 LIBLEX=$(SCINTILLA_TARGET_PATH) $(SCINTILLA_TARGET_PATH)
binary: $(TARGET_BINARY) data
@echo *** $(TARGET_CPU) $(BUILD_TYPE) : $(CURDIR)/$(TARGET_BINARY) ***