FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 05-23-2010, 10:54 PM
Mike Frysinger
 
Default autotools.eclass eautomake update

ive updated eautomake to run automake in a few more edge cases. hopefully
this doesnt break anything else (seems to not on my system), but who knows.

if you see random eautoreconf/eautomake failure, try backing out the
autotools.eclass change first.
-mike
 
Old 05-24-2010, 08:44 AM
Petteri Rty
 
Default autotools.eclass eautomake update

On 24.5.2010 1.54, Mike Frysinger wrote:
> ive updated eautomake to run automake in a few more edge cases. hopefully
> this doesnt break anything else (seems to not on my system), but who knows.
>
> if you see random eautoreconf/eautomake failure, try backing out the
> autotools.eclass change first.
> -mike

I think any autotools.eclass behavior changes would benefit from being
sent to gentoo-dev for review first. It could also have been taken on a
spin in one of the tinderboxes.

Regards,
Petteri
 
Old 05-24-2010, 08:51 PM
Mike Frysinger
 
Default autotools.eclass eautomake update

On Mon, May 24, 2010 at 4:44 AM, Petteri Rty wrote:
> On 24.5.2010 1.54, Mike Frysinger wrote:
>> ive updated eautomake to run automake in a few more edge cases. *hopefully
>> this doesnt break anything else (seems to not on my system), but who knows.
>>
>> if you see random eautoreconf/eautomake failure, try backing out the
>> autotools.eclass change first.
>
> I think any autotools.eclass behavior changes would benefit from being
> sent to gentoo-dev for review first.

if i felt most people had an understanding of how autotools worked let
alone how autotools.eclass, then perhaps i would
-mike
 
Old 05-24-2010, 09:53 PM
Petteri Rty
 
Default autotools.eclass eautomake update

On 24.5.2010 23.51, Mike Frysinger wrote:
> On Mon, May 24, 2010 at 4:44 AM, Petteri Rty wrote:
>> On 24.5.2010 1.54, Mike Frysinger wrote:
>>> ive updated eautomake to run automake in a few more edge cases. hopefully
>>> this doesnt break anything else (seems to not on my system), but who knows.
>>>
>>> if you see random eautoreconf/eautomake failure, try backing out the
>>> autotools.eclass change first.
>>
>> I think any autotools.eclass behavior changes would benefit from being
>> sent to gentoo-dev for review first.
>
> if i felt most people had an understanding of how autotools worked let
> alone how autotools.eclass, then perhaps i would
> -mike
>

And what do you loose by sending them here? The devmanual text strictly
doesn't enforce it but strongly encourages: "Before updating eutils or a
similar widely used eclass, it is best to email the gentoo-dev list."

http://devmanual.gentoo.org/eclass-writing/index.html

Regards,
Petteri
 
Old 05-24-2010, 10:17 PM
Mike Frysinger
 
Default autotools.eclass eautomake update

On Mon, May 24, 2010 at 5:53 PM, Petteri Rty wrote:
> On 24.5.2010 23.51, Mike Frysinger wrote:
>> On Mon, May 24, 2010 at 4:44 AM, Petteri Rty wrote:
>>> On 24.5.2010 1.54, Mike Frysinger wrote:
>>>> ive updated eautomake to run automake in a few more edge cases. *hopefully
>>>> this doesnt break anything else (seems to not on my system), but who knows.
>>>>
>>>> if you see random eautoreconf/eautomake failure, try backing out the
>>>> autotools.eclass change first.
>>>
>>> I think any autotools.eclass behavior changes would benefit from being
>>> sent to gentoo-dev for review first.
>>
>> if i felt most people had an understanding of how autotools worked let
>> alone how autotools.eclass, then perhaps i would
>
> And what do you loose by sending them here? The devmanual text strictly
> doesn't enforce it but strongly encourages: "Before updating eutils or a
> similar widely used eclass, it is best to email the gentoo-dev list."

so prove me wrong and post some useful feedback on the change. i'm
simply being realistic.
sources.gentoo.org/eclass/autotools.eclass?r1=1.97&r2=1.98
-mike
 
Old 05-25-2010, 06:54 AM
Rmi Cardona
 
Default autotools.eclass eautomake update

Le 25/05/2010 00:17, Mike Frysinger a crit :
> so prove me wrong and post some useful feedback on the change. i'm
> simply being realistic.

Even if you think no one will ever comment on your patches, I've seen
enough projects where posting patches and doing reviews generated
interest and got people to contribute.

Unless you want to keep this eclass to yourself, posting patches is a
Good Thing (tm).

> sources.gentoo.org/eclass/autotools.eclass?r1=1.97&r2=1.98

Maybe you should grep for AC_INIT_AUTOMAKE too, as that's what lots of
folks used a while ago.

Cheers,

Rmi
 
Old 05-25-2010, 07:23 AM
Mike Frysinger
 
Default autotools.eclass eautomake update

On Tuesday 25 May 2010 02:54:27 Rmi Cardona wrote:
> Le 25/05/2010 00:17, Mike Frysinger a crit :
> > so prove me wrong and post some useful feedback on the change. i'm
> > simply being realistic.
>
> Even if you think no one will ever comment on your patches, I've seen
> enough projects where posting patches and doing reviews generated
> interest and got people to contribute.

i'm just asking for proof that it's useful here

> > sources.gentoo.org/eclass/autotools.eclass?r1=1.97&r2=1.98
>
> Maybe you should grep for AC_INIT_AUTOMAKE too, as that's what lots of
> folks used a while ago.

no, because that isnt how autoreconf works today. current behavior mimics
current autotools.
-mike
 
Old 05-25-2010, 07:46 AM
Peter Volkov
 
Default autotools.eclass eautomake update

В Пнд, 24/05/2010 в 18:17 -0400, Mike Frysinger пишет:
> sources.gentoo.org/eclass/autotools.eclass?r1=1.97&r2=1.98

for makefile_name in {GNUmakefile,{M,m}akefile}.{am,in} "" ; do

Why "" is required at the end of file list?

--
Peter.
 
Old 05-25-2010, 12:12 PM
Duncan
 
Default autotools.eclass eautomake update

Peter Volkov posted on Tue, 25 May 2010 11:46:12 +0400 as excerpted:

> В Пнд, 24/05/2010 в 18:17 -0400, Mike Frysinger пишет:
>> sources.gentoo.org/eclass/autotools.eclass?r1=1.97&r2=1.98
>
> for makefile_name in {GNUmakefile,{M,m}akefile}.{am,in} "" ; do
>
> Why "" is required at the end of file list?

Interesting coding trick! =:^) Here's that bit of code in full (watch the
wrap):

for makefile_name in {GNUmakefile,{M,m}akefile}.{am,in} "" ; do
[[ -f ${makefile_name} ]] && break
done
[[ -z ${makefile_name} ]] && return 0

The for loop itself doesn't really do anything, except short-circuit
itself with a break if the named file exists. What is its purpose, then?

The purpose of the loop is to leave the name of the actual existing
makefile in the variable makefile_name...

**OR**, the purpose of the "" case, if none of the tested filename
variants exists, it leaves the variable empty.

The next line then tests for the last case, the empty variable, and short-
circuits the eautomake function itself in that condition, returning 0/no-
error/true.

Without the "" case, the for loop would leave the last tested filename in
the variable whether it existed or not, and the test for the empty
variable wouldn't work.

The perhaps more common alternative would be to test the exit status of
the for loop, which returns the exist status of the last command, in this
case either break (which would return zero/no-error/true), or the [[ -f ]]
test itself (which would return 1/false/error if break didn't run). That
would result in something like this (untested) code:

for makefile_name in {GNUmakefile,{M,m}akefile}.{am,in} ; do
[[ -f ${makefile_name} ]] && break
done && return

Assuming no error in my logic (a bit of an assumption since my code isn't
tested and I expect his code was), I'm not sure why that code wasn't used,
unless it was deemed less clear (perhaps the && return is too easy to
miss, tho a separate [[ $? = 0 ]] && return would fix that), or was simple
choice of coding style.

While we're at it, in "&& return 0", the "0" is ALWAYS superfluous, as
"return" returns the exit code of the last command by default, which MUST
be zero or the "&&" logic would have failed, so the "&& return"
combination will ALWAYS return 0. But that too may be coding style, as
the "return 0" makes it explicit, a reasonable enough policy.

--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
 
Old 05-25-2010, 12:45 PM
Peter Volkov
 
Default autotools.eclass eautomake update

В Втр, 25/05/2010 в 12:12 +0000, Duncan пишет:
> Peter Volkov posted on Tue, 25 May 2010 11:46:12 +0400 as excerpted:
> >> sources.gentoo.org/eclass/autotools.eclass?r1=1.97&r2=1.98
> > Why "" is required at the end of file list?

> for makefile_name in {GNUmakefile,{M,m}akefile}.{am,in} "" ; do
> [[ -f ${makefile_name} ]] && break
> done

> the purpose of the "" case, if none of the tested filename
> variants exists, it leaves the variable empty.

Thank you Duncan. Now I see

--
Peter.
 

Thread Tools




All times are GMT. The time now is 07:14 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org