Re: Output quoting (was: Re: Possible solution for special characters in makefile paths)

Frank Heckenbach <[email protected]> Thu, 10 Apr 2014 13:37:29 +0200
Newsgroups gmane.comp.gnu.make.devel
Message-ID <[email protected]>
Tim Murphy wrote:

> On 10 April 2014 11:56, Frank Heckenbach <[email protected]> wrote:
> > it can be quite confusing, e.g.:
> >
> > $(FILENAME): ; $(file >$(FILENAME),hi)
> >
> > Define rules for two targets ("foo bar" and "biz baz") which
> > actually create a totally different file ("foo bar biz baz")?
> > No, better just error out.
> 
> Then how does one tell $(file) to create a filename with spaces in it?
> how does one create a target with spaces in it?

By quoting the space (the details of which are just being discussed).

> $(file) requires > or << to start an argument and , as a delimiter.
> So there is already a kind of context or type marker in this call.
> Why not make > or >> generally the start of a filename and < or <<
> generally the end?  or $(filename f) or any other pattern you choose.

You mean in $(file) only? I just gave an example why not. You'd
create another beast that works in some contexts and not in others.

Or everywhere? Then it would be yet another possible quoting syntax
(like the suggested $[] or \ quoting), but less general (at least by
name) since not only file names can contain spaces.