Re: Output quoting (was: Re: Possible solution for special characters in makefile paths)
Tim Murphy <[email protected]> Thu, 10 Apr 2014 21:13:24 +0100
| Newsgroups | gmane.comp.gnu.make.devel |
|---|---|
| Message-ID | <CACJSg6m-QdYcBd68V=HpPDFrmmz3=yOfUHzTnNF77RLW2B5ZZw@mail.gmail.com> |
On 10 April 2014 18:47, Frank Heckenbach <[email protected]> wrote: > Tim Murphy wrote: >> Paul wrote that this: >> FILENAME = foo\ bar biz\ baz >> >> $(file >$(FILENAME),hi) >> should return an error. > > Because it contains an unquoted space which would be a word-separator. I'm stupid - I didn't see the missing unquote. sorry :-) > If you want a single file name, write: > > FILENAME = foo\ bar\ biz\ baz > >> I was suggesting >> as an argument why start/end delimiters such as >> $[ and ] are >> not so bad because make already has delimiters for function parameters >> such as those >> of $file - whether or not it uses them. > > Unfortunately, that's not enough. Consider a function such as > $(filter). It has 2 arguments (separated by a comma). Each of those > arguments can be a list of strings, separated by whitespace. So each > of those strings cannot contain a comma or whitespace yet. When we > we want to change that, we'll need some way of quoting or escaping, > whether \, $[] or whatever. Yes indeed, and since $ is already an "escape character" in make, it is a great thing to use since . e.g. This might be horrible but there should be less concern about it being incompatible in some way: foo$ bar$ biz$ baz i.e. $<space> Actually I hate that and I'm really arguing towards $[] or even $"". :-) Regards, Tim