I want to use GNUMake to run a rule-based makefile which builds a set of C files in a directory structure (on a Windows file system).
The root directory, some sub-di
I've typically used what is sort of a combination of Dana the Sane's answer and Brian Yoder's answer.
You just use the $(subst)
function to replace all occurances of spaces with escaped spaces. EG:
empty :=
space := $(empty) $(empty)
program_files := $(subst $(space),\$(space),$(ProgramFiles))
(Note that with some older versions of make on Windows you would also need to use another $(subst)
to change path backslashes to slashes)