> Patrick Horgan wrote:
> but VAR := "foo\ bar" works.
No, it doesn't:
$ touch 'file name.flac'
$ cat Makefile
VAR := "file\ name.flac"
all: $(VAR:.flac=.mp3)
%.mp3: %.flac
cp "$<" "$@"
$ make
make: *** No rule to make target `"file name.flac"', needed by `all'.
Stop.
If you remove the double quotes but leave the space backslash-quoted, it
still fails:
$ make
make: *** No rule to make target `file name.mp3', needed by `all'.
Stop.
If you look at the debug output you see that the pattern rule was
incapable of dealing with the space when trying to match %.flac against
'file name.flac' because it thinks it names two prerequisites:
No implicit rule found for `all'.
Considering target file `file name.mp3'.
File `file name.mp3' does not exist.
Looking for an implicit rule for `file name.mp3'.
Trying pattern rule with stem `file name'.
Trying implicit prerequisite `file'.
Trying pattern rule with stem `file name'.
Trying implicit prerequisite `file'.
Looking for a rule with intermediate file `file'.
Avoiding implicit rule recursion.
No implicit rule found for `file name.mp3'.
Finished prerequisites of target file `file name.mp3'.
Must remake target `file name.mp3'.
make: *** No rule to make target `file name.mp3', needed by `all'.
Stop.
Brian
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make