make-alpha
[Top][All Lists]
Advanced

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

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


From: Tim Murphy
Subject: Re: Output quoting (was: Re: Possible solution for special characters in makefile paths)
Date: Thu, 10 Apr 2014 18:26:38 +0100

On 10 April 2014 12:37, Frank Heckenbach <address@hidden> wrote:
> Tim Murphy wrote:
>
>> On 10 April 2014 11:56, Frank Heckenbach <address@hidden> 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).

Paul wrote that this:
   FILENAME = foo\ bar biz\ baz

   $(file >$(FILENAME),hi)
should return an error.
>> Does this create a file 'foo bar biz baz'?  Or give an error because two
>> words were provided where one was expected?  Or something else?
>I'd say an error. We should be clear about what a string means and
>if a given string (like the above, or however else it will be

And I thought that was very unexpected and I wondered how then would
one create a file with spaces in the name?

>> $(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.

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. I wouldn't *really*  want to
use <<. I'm just not a fan of \ quoting.

Regards,

Tim

 _______________________________________________
> Make-alpha mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/make-alpha



-- 
You could help some brave and decent people to have access to
uncensored news by making a donation at:

http://www.thezimbabwean.co.uk/friends/



reply via email to

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