Re: Possible solution for special characters in makefile paths

Paul Smith <[email protected]>
Newsgroups gmane.comp.gnu.make.devel
Organization GNU's Not UNIX!
Message-ID <1393191046.21230.97.camel@homebase>
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?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.