diff --git a/Makefile b/Makefile index 2c3c8b298..5deb1337e 100644 --- a/Makefile +++ b/Makefile @@ -347,11 +347,11 @@ clean: $(RM) $(call FIXPATH,$(CLEAN_LIST)) $(EXE): $(EXE_OBJS) $(EXE_LIBS) - $(CXX) $(CXXFLAGS) $(EXE_OBJS) -o "$@" $(EXE_LIBS) $(CXXLIBS) + $(CXX) $(CXXFLAGS) $(EXE_OBJS) -o '$@' $(EXE_LIBS) $(CXXLIBS) ifneq ($(filter-out osx,$(OS)),) ifneq ($(STRIP_SYMBOLS),n) - $(OBJCOPY) --only-keep-debug "$@" "$(PATH_INTERNAL_TEMP)/$(notdir $@).sym" - $(OBJCOPY) --strip-unneeded "$@" + $(OBJCOPY) --only-keep-debug '$@' '$(PATH_INTERNAL_TEMP)/$(notdir $@).sym' + $(OBJCOPY) --strip-unneeded '$@' endif endif diff --git a/source/qb64.bas b/source/qb64.bas index d58f82cb9..6c31fe885 100644 --- a/source/qb64.bas +++ b/source/qb64.bas @@ -12523,7 +12523,12 @@ END IF CxxLibsExtra$ = CxxLibsExtra$ + " " + mylib$ + " " + mylibopt$ -makeline$ = make$ + makedeps$ + " EXE=" + AddQuotes$(StrReplace$(path.exe$ + file$ + extension$, " ", "\ ")) +' Make and the shell don't like certain characters in the file name, so we +' escape them to get them to handle them properly +escapedExe$ = StrReplace$(path.exe$ + file$ + extension$, " ", "\ ") +escapedExe$ = StrReplace$(escapedExe$, "$", "$$") + +makeline$ = make$ + makedeps$ + " EXE=" + AddQuotes$(escapedExe$) makeline$ = makeline$ + " " + AddQuotes$("CXXFLAGS_EXTRA=" + CxxFlagsExtra$) makeline$ = makeline$ + " " + AddQuotes$("CFLAGS_EXTRA=" + CxxFlagsExtra$) makeline$ = makeline$ + " " + AddQuotes$("CXXLIBS_EXTRA=" + CxxLibsExtra$)