bug-automake
[Top][All Lists]
Advanced

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

bug#14177: Incorrect extending of rules in documentation


From: Nick Bowler
Subject: bug#14177: Incorrect extending of rules in documentation
Date: Thu, 11 Apr 2013 09:33:20 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On 2013-04-11 01:28 +0200, Bastien ROUCARIES wrote:
> The make code fragment at
> http://www.gnu.org/software/automake/manual/html_node/Extending.html#Extending
> does not work as expected if you use --program-suffix=-hdr :
> 
> 
> 
>      install-exec-hook:
>              cd $(DESTDIR)$(bindir) && \
>                mv -f prog$(EXEEXT) prog-$(VERSION)$(EXEEXT) && \
>                $(LN_S) prog-$(VERSION)$(EXEEXT) prog$(EXEEXT)
> 
> 
> error:
> 
> mv: cannot stat `./animate': No such file or directory
> mv: cannot stat `./compare': No such file or directory
> mv: cannot stat `./composite': No such file or directory
> 
> Could you please correct the example code and explain us how to be compatible?

The suffix feature (partially) come from Autoconf; see ยง15.7 "Trans-
forming Program Names When Installing"[1] of the autoconf manual.  You
are correct that this example in the Automake manual is broken if the
user decides to use the feature.

The transformation is communicated to the Makefile as a sed program, so
I think you should be able to make it work with something like this
(untested):

  install-exec-hook:
        instprog=`echo prog | sed '$(program_transform_name)'`; \
          cd $(DESTDIR)$(bindir) && \
          mv -f $$instprog$(EXEEXT) $$instprog-$(VERSION)$(EXEEXT) && \
          $(LN_S) $$instprog-$(VERSION)$(EXEEXT) $$instprog$(EXEEXT)

[1] https://gnu.org/software/autoconf/manual/autoconf.html#Transforming-Names
        
Hope that helps,
-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)





reply via email to

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