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

Tim Murphy <[email protected]>
Newsgroups gmane.comp.gnu.make.devel
Message-ID <CACJSg6mVy-NQyBcWqh3Xtui4gW-Fmye4zVcAQKOOHw-sXusCVQ@mail.gmail.com>
Note that this use of cat is not "space safe"
> FOO = a'()'b
> all: $(FOO); cat $(FOO)

It should be:
> all: $(FOO); cat "$(FOO)"

... in which case the shell would act the same as make does.
Programmers should be responsible for what they put in the recipe
without make having to second-guess them.

Regards,

Tim


On 26 February 2014 07:17, Paul Smith <[email protected]> wrote:
> Hi all; I've been reading everything (thank you for the energy you're
> putting into this) but I won't have time to formulate a complete reply
> for a day or two.
>
> I think I understand peoples' positions and so I'm going to generate an
> email or two that discuss the main ideas, most especially dealing with
> compatibility, POSIX standards issues, C/Guile API issues, etc. once
> I've thought about it a bit more.
>
>
> On Tue, 2014-02-25 at 21:09 +0100, Frank Heckenbach wrote:
>> > Why do you think this will be needed?
>>
>> When the makefile explicitly single-/double quotes stuff:
>>
>> FOO = a'()'b
>> all: $(FOO); cat $(FOO)
>>
>> If make doesn't handle ', it will depend on a file called «a'()'b»
>> including quotes, and give this on the command line, which to the
>> shell means «a()b», i.e. a different file name.
>
> This seems like a bit of circular reasoning to me: we want to support
> quoting because if we don't then quoting won't be supported :-).
>
> I don't immediately see the advantage in having the full range of shell
> quoting capabilities in make variable values.  Makefiles are not shell
> scripts; they just contain shell scripts.
>
> We need a way to quote special characters to make, and a single quoting
> mechanism should enough IMO.  In fact, additional quoting methods will
> need strong justification before I'd consider them because the more
> quoting options we support the more complex the code is and the more
> backward-compatibility issues we will encounter.
>
> What does the extra quoting buy us, exactly?
>
>
> _______________________________________________
> Make-alpha mailing list
> [email protected]
> 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/
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.