diff --git a/BUILD.md b/BUILD.md index 8bbb4dcd2..84170a9a8 100644 --- a/BUILD.md +++ b/BUILD.md @@ -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. diff --git a/PowerEditor/gcc/makefile b/PowerEditor/gcc/makefile index bcd14ab3a..433c9a36b 100644 --- a/PowerEditor/gcc/makefile +++ b/PowerEditor/gcc/makefile @@ -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) ***