Here's an interesting question regarding paths with spaces.
My compiler is installed in
"C:\Program Files\Microsoft Visual Studio\VC98". Therefore,
this is the location of my standard include files.
My makefile looks like this:
##############################################################################
MSVCDIR="C:/Program Files/Microsoft Visual Studio/VC98"
INCLUDE_STD=$(MSVCDIR)/ATL/INCLUDE $(MSVCDIR)/INCLUDE $(MSVCDIR)/MFC/INCLUDE
CPPFLAGS+=$(addprefix /I,$(INCLUDE_STD))
all:
@echo $(CPPFLAGS)
##############################################################################
Basically I have a space-separated list of include directories
(some of them containing spaces), and I want to add /I<dir> for
each dir to the flags.
My problem is that all of the GNU make functions I've tried (foreach,
addprefix, etc.) will operate on the spaces in the paths. So I
get something like "/IC:/Program /IFiles/Microsoft /IVisual...".
I've tried escaping the spaces with a backslash, I've tried escaping
the quotes with a backslash, tried using no quotes, and so on.
Nothing seems to work. Am I shit out of luck?
Thanks,
c