On Thu, May 2, 2013 at 6:50 PM, Eli Zaretskii <e...@gnu.org> wrote: > > Make on Windows cannot support escaping with backslash when the shell > is cmd.exe. And Make in general doesn't support file names with > whitespace too well, you need to introduce blanks via variables, for > it to work reliably. The only place where it works well is in the > command line itself, but not in variables and certainly not in > dependency lists.
My findings: - Space in filenames does work very well in variables, as long as the variables are used exclusively in command lines. - You are right that it can be tricky to introduce a leading space, but not really a big problem. Most people tend to store the space in an intermediate variable (the space=$(empty) $(empty) trick)', but I found that it's sufficient to just write 'foo=$() xyz' - Dependency lists are not a big problem, you just have to escape spaces and backslashes properly. It is (fairly) easy to write a function that does this. Automatic variables like $@, $< and $^ will be un-escaped, so any uses need to be re-quoted or surrounded by double quotes. This is practically doable, if you have a limited set of directories that may contain space. - The only big remaining problem is that there is no way to add a path with spaces to VPATH. I have a poor workaround for this (copying needed directories to a space-free path before adding them to VPATH). We should probably be grateful that a VPATH path cannot contain spaces; e.g., it guarantees that %.c always expands to a space-free path.
_______________________________________________ Make-w32 mailing list Make-w32@gnu.org https://lists.gnu.org/mailman/listinfo/make-w32