[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: avoiding program name transformations on libexec
From: |
Pádraig Brady |
Subject: |
Re: avoiding program name transformations on libexec |
Date: |
Wed, 10 Sep 2014 23:37:56 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
On 09/10/2014 03:31 PM, Pádraig Brady wrote:
> On 09/10/2014 03:08 PM, Nick Bowler wrote:
>> On 2014-09-10 10:22 +0100, Pádraig Brady wrote:
>>> I was able to work around the issue here as there is only a single
>>> item in libexec in my project which I excluded from $(transform) like:
>>>
>>> transform = /myprog/!$(program_transform_name)
>>
>> This seems like a reasonable solution. But be careful: the above
>> won't work if program_transform_name (which is set by the user) contains
>> nontrivial sed commands. For example, it will fail if it contains a
>> semicolon.
>>
>> Something like this should be more robust (but untested):
>>
>> transform = /myprog/q;$(program_transform_name)
>
> Good suggestion.
> The above is more robust and portable according to my testing and:
> http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Limitations-of-Usual-Tools.html#Limitations-of-Usual-Tools
Though in retrospect less appropriate for this case,
as the Makefile uses $(transform) like:
sed ....s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'
so we don't want transform to break out early
and not replace EXEEXT where that's used.
cheers,
Pádraig.