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: Fri, 11 Apr 2014 11:34:18 +0100

On 11 April 2014 10:53, Frank Heckenbach <address@hidden> wrote:
> Tim Murphy wrote:
>
>> On 11 April 2014 09:32, Eli Zaretskii <address@hidden> wrote:
>> >> Date: Thu, 10 Apr 2014 22:55:34 +0200
>> >> Cc: address@hidden, address@hidden
>> >> From: Frank Heckenbach <address@hidden>
>>
>> >> Now, if you want to use another interpreter with different quoting
>> >> rules, you can do:
>> >>
>> >> SHELL = /bin/frob
>> >> SHELL_QUOTE = $(subst or whatever ...)
>>
>> This seems like a very specific name for a very general ability.  e.g.
>> by setting SHELL_QUOTE I might build up a list of files used in the
>> build and write them to a file with $(file).  I have often wanted this
>> so I anticipate other people wanting it too.
>
> I haven't used $(file) myself, so correct me I'm wrong, but I think
> in this case make writes the contents itself, so if you just want
> the list of plain file names, they don't need to be quoted and make
> probably shouldn't apply automatic quoting here.

I don't mean that quoting is needed here but that people will find
uses for SHELL_QUOTE that are not the ones you expect.

I would love, for example, to have a macro that was evaluated every
time an automatic variable was expanded.  It would allow me to hook
into make for all sorts of useful purposes.

even better if I knew which automatic variable was being expanded so
e.g. I could get a list of the targets in the makefile or all the
dependencies for target X.

You might ask "what for?" well some makefiles are generated, some use
autodependency generation, some have very complex macros that work out
what to build and what not to build. At the end one wants to know what
did the makefile actually "try" to do so one can see how successful it
was and also see if it is trying to do the correct things.

so e.g. $(call shell_quote,@,fred.exe) would be a very useful thing to
be able to implement - would make it easy to get a list of all the
targets the makefile ultimately tried to generate.  Using it to quote,
in other words, would be just one application.

Regards,

Tim



reply via email to

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