make-alpha
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possible solution for special characters in makefile paths


From: Paul Smith
Subject: Re: Possible solution for special characters in makefile paths
Date: Sun, 23 Feb 2014 16:30:46 -0500

On Sat, 2014-02-22 at 08:09 +0200, Boris Kolpackov wrote:
> "my target": "this: prerequisite"
> 
> ('' will also work, see below).

Hopefully you're following along with Eli's and my discussion on
representation.  ATM believe that this syntax cannot work, but I would
be pleased to be proved wrong; in general I agree it would be nice to
reuse an existing and known suite of quoting rules rather than have to
invent new ones.

> > The disadvantage of this is that it would not be usable inside the
> > makefile to encode expansions of values.  For example suppose someone
> > runs 'make FOO="bar biz"' and the makefile author knows that the value
> > of FOO should always be treated as a single word; they may want to
> > write:
> > 
> >   FOO=$[$(FOO)]
> 
> I think this should not be possible.

Well, that was badly written I agree; it should have been:

  FOO := $[$(FOO)]

> If a value of a variable should be treated as a single word, then it
> should be specified as such and not re-interpreted half way through.

I'm not sure I understand what you're saying.  I don't see any reason
why the above should be made illegal.

Similarly, I expect it would be possible to "break up" a single word
into multiple words based on whitespace using subst, like this:

  FOO := $(subst $[ ], ,$(FOO))

Why should we not allow these options?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]