GNU bug report logs - #14177
Incorrect extending of rules in documentation

Previous Next

Package: automake;

Reported by: Bastien ROUCARIES <roucaries.bastien <at> gmail.com>

Date: Wed, 10 Apr 2013 23:33:01 UTC

Severity: minor

Tags: moreinfo

To reply to this bug, email your comments to 14177 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-automake <at> gnu.org:
bug#14177; Package automake. (Wed, 10 Apr 2013 23:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bastien ROUCARIES <roucaries.bastien <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Wed, 10 Apr 2013 23:33:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bastien ROUCARIES <roucaries.bastien <at> gmail.com>
To: bug-automake <at> gnu.org
Subject: Incorrect extending of rules in documentation
Date: Thu, 11 Apr 2013 01:28:54 +0200
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?




Information forwarded to bug-automake <at> gnu.org:
bug#14177; Package automake. (Thu, 11 Apr 2013 13:38:02 GMT) Full text and rfc822 format available.

Message #8 received at 14177 <at> debbugs.gnu.org (full text, mbox):

From: Nick Bowler <nbowler <at> elliptictech.com>
To: Bastien ROUCARIES <roucaries.bastien <at> gmail.com>
Cc: 14177 <at> debbugs.gnu.org
Subject: Re: bug#14177: Incorrect extending of rules in documentation
Date: Thu, 11 Apr 2013 09:33:20 -0400
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/)




Information forwarded to bug-automake <at> gnu.org:
bug#14177; Package automake. (Sat, 20 Apr 2013 15:19:01 GMT) Full text and rfc822 format available.

Message #11 received at 14177 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Nick Bowler <nbowler <at> elliptictech.com>
Cc: Bastien ROUCARIES <roucaries.bastien <at> gmail.com>, 14177 <at> debbugs.gnu.org
Subject: Re: bug#14177: Incorrect extending of rules in documentation
Date: Sat, 20 Apr 2013 17:13:26 +0200
tags 14177 + moreinfo
severity 14177 minor
stop

Hello Nick, Bastien, sorry for the delay.

On 04/11/2013 03:33 PM, Nick Bowler wrote:
> 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)
> 
Thank you Nick for providing this code.  However, I'm not really convinced that
it would be worth to additionally complicate the example in the manual to cater
to the seldom-used "program name transformation" feature (which I actually
believe is a misfeature in several respects, but that's something for another
thread).

Still, I'd like to hear the community's opinion on this before committing to
a decision, so for the moment being I'm tagging this report with "more info
required" rather than with "will not fix".

> [1] https://gnu.org/software/autoconf/manual/autoconf.html#Transforming-Names
>   	
> Hope that helps,

Thanks,
  Stefano




Added tag(s) moreinfo. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 20 Apr 2013 15:50:02 GMT) Full text and rfc822 format available.

Severity set to 'minor' from 'normal' Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 20 Apr 2013 15:50:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#14177; Package automake. (Mon, 22 Apr 2013 07:06:01 GMT) Full text and rfc822 format available.

Message #18 received at 14177 <at> debbugs.gnu.org (full text, mbox):

From: Bastien ROUCARIES <roucaries.bastien <at> gmail.com>
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Cc: 14177 <at> debbugs.gnu.org, Nick Bowler <nbowler <at> elliptictech.com>
Subject: Re: bug#14177: Incorrect extending of rules in documentation
Date: Mon, 22 Apr 2013 09:00:22 +0200
On Sat, Apr 20, 2013 at 5:13 PM, Stefano Lattarini
<stefano.lattarini <at> gmail.com> wrote:
> tags 14177 + moreinfo
> severity 14177 minor
> stop
>
> Hello Nick, Bastien, sorry for the delay.
>
> On 04/11/2013 03:33 PM, Nick Bowler wrote:
>> 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)
>>
> Thank you Nick for providing this code.  However, I'm not really convinced that
> it would be worth to additionally complicate the example in the manual to cater
> to the seldom-used "program name transformation" feature (which I actually
> believe is a misfeature in several respects, but that's something for another
> thread).


I believe a footnote mentionning the problem will be sufficient with a solution.
> Still, I'd like to hear the community's opinion on this before committing to
> a decision, so for the moment being I'm tagging this report with "more info
> required" rather than with "will not fix".
>
>> [1] https://gnu.org/software/autoconf/manual/autoconf.html#Transforming-Names
>>
>> Hope that helps,
>
> Thanks,
>   Stefano




This bug report was last modified 12 years and 55 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.