automake
[Top][All Lists]
Advanced

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

Re: avoiding program name transformations on libexec


From: Nick Bowler
Subject: Re: avoiding program name transformations on libexec
Date: Thu, 11 Sep 2014 10:58:08 -0400
User-agent: Mutt/1.5.22 (2013-10-16)

On 2014-09-10 23:37 +0100, Pádraig Brady wrote:
> 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.

Darn!  Unfortunately I don't think there's any way to avoid problems
with semicolons in program_transform_name then, at least not by simply
hacking the transform variable. :(

I agree with you that the Automake behaviour seems bad here.
It should be possible to install untransformed programs into
locations like pkglibexecdir.  For the MANS primary there is a
notrans_ prefix to avoid name transformation, but it appears
that this is not an option for PROGRAMS.  I don't know why this
is; maybe it's something to change in the future.

My next suggestion would be to use an install-exec-hook (which runs
after the default rules have installed the programs) to rename the
affected programs back to their original names.

Cheers,
-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)



reply via email to

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