Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 41194 Details for
Bug 66478
[PATCH] Proposal: use newest automake/autoconf by default
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
plain am-wrapper.pl
am-wrapper.pl (text/plain), 4.54 KB, created by
Gregorio Guidi (RETIRED)
on 2004-10-05 18:04:54 UTC
(
hide
)
Description:
plain am-wrapper.pl
Filename:
MIME Type:
Creator:
Gregorio Guidi (RETIRED)
Created:
2004-10-05 18:04:54 UTC
Size:
4.54 KB
patch
obsolete
>#!/usr/bin/perl ># ># ># Author: Guillaume Cottenceau (gc@mandrakesoft.com) ># Modified by: Martin Schlemmer (azarah@gentoo.org) ># ># Copyright 2001 MandrakeSoft ># ># This software may be freely redistributed under the terms of the GNU ># public license. ># ># You should have received a copy of the GNU General Public License ># along with this program; if not, write to the Free Software ># Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ># ># ># Executes the correct autoconf version. ># ># - defaults to automake-1.8 ># - runs automake-1.7 if it exists and... ># - envvar WANT_AUTOMAKE is set to `1.7' ># -or- ># - `Makefile.in' was generated by automake-1.7, which ># specifically needs automake-1.7 ># -or- ># - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.7 ># - runs automake-1.6 if it exists and... ># - envvar WANT_AUTOMAKE is set to `1.6' ># -or- ># - `Makefile.in' was generated by automake-1.6, which ># specifically needs automake-1.6 ># -or- ># - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.6 ># - runs automake-1.5 if it exists and... ># - envvar WANT_AUTOMAKE is set to `1.5' ># -or- ># - `Makefile.in' was generated by automake-1.5, which ># specifically needs automake-1.5 ># -or- ># - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.5 ># - runs automake-1.4 if it exists and... ># - envvar WANT_AUTOMAKE is set to `1.4' ># -or- ># - `Makefile.in' was generated by automake-1.4, which ># specifically needs automake-1.4 ># -or- ># - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.4 ># >#use MDK::Common; > >sub cat_ { local *F; open F, $_[0] or return; my @l = <F>; wantarray ? @l : join '', @l } >sub am_version { > return (@versions = cat_(shift) =~ /^\s*\[?AM_AUTOMAKE_VERSION\(\[?([^\)]{2}[0-9]?)[^\)]*\]?\)/mg) ? ((sort @versions)[-1]) : ''; >} > >my $binary_1_4 = "$0-1.4"; >my $binary_1_5 = "$0-1.5"; >my $binary_1_6 = "$0-1.6"; >my $binary_1_7 = "$0-1.7"; >my $binary = "$0-1.8"; > ># Automake is really getting out of hand, so rather start supporting ># WANT_AUTOMAKE = "1.7" the like. Unfortunately it override the old ># variables, so if not set, just convert the old variables .... >if ($ENV{WANT_AUTOMAKE} eq "") { > if ($ENV{WANT_AUTOMAKE_1_4}) { > $ENV{WANT_AUTOMAKE} = '1.4'; > } elsif ($ENV{WANT_AUTOMAKE_1_5}) { > $ENV{WANT_AUTOMAKE} = '1.5'; > } elsif ($ENV{WANT_AUTOMAKE_1_6}) { > $ENV{WANT_AUTOMAKE} = '1.6'; > } >} > >if ($ENV{WANT_AUTOMAKE} ne '1.8') { > if (-x $binary_1_7 # user may not have 1.7 ... > && (($ENV{WANT_AUTOMAKE} eq '1.7') > || (cat_('Makefile.in') =~ /^# Makefile\.in generated by automake (\S{3})/ ? $1 : '') eq '1.7' > || (cat_('aclocal.m4') =~ /generated automatically by aclocal (\S{3})/ ? $1 : '') eq '1.7' > || am_version('aclocal.m4') eq '1.7')) { > $ENV{WANT_AUTOMAKE} = '1.7'; # to prevent further "cats" and to enhance consistency (possible cwd etc) > $binary = $binary_1_7; > } elsif (-x $binary_1_6 # user may not have 1.6 ... > && (($ENV{WANT_AUTOMAKE} eq '1.6') > || (cat_('Makefile.in') =~ /^# Makefile\.in generated by automake (\S{3})/ ? $1 : '') eq '1.6' > || (cat_('aclocal.m4') =~ /generated automatically by aclocal (\S{3})/ ? $1 : '') eq '1.6' > || am_version('aclocal.m4') eq '1.6')) { > $ENV{WANT_AUTOMAKE} = '1.6'; # to prevent further "cats" and to enhance consistency (possible cwd etc) > $binary = $binary_1_6; > } elsif (-x $binary_1_5 # user may not have 1.5 ... > && (($ENV{WANT_AUTOMAKE} eq '1.5') > || (cat_('Makefile.in') =~ /^# Makefile\.in generated automatically by automake (\S{3})/ ? $1 : '') eq '1.5' > || (cat_('aclocal.m4') =~ /generated automatically by aclocal (\S{3})/ ? $1 : '') eq '1.5' > || am_version('aclocal.m4') eq '1.5')) { > $ENV{WANT_AUTOMAKE} = '1.5'; # to prevent further "cats" and to enhance consistency (possible cwd etc) > $binary = $binary_1_5; > } elsif (-x $binary_1_4 # user may not have 1.4 ... > && (($ENV{WANT_AUTOMAKE} eq '1.4') > || (cat_('Makefile.in') =~ /^# Makefile\.in generated automatically by automake (\S{3})/ ? $1 : '') eq '1.4' > || (cat_('aclocal.m4') =~ /generated automatically by aclocal (\S{3})/ ? $1 : '') eq '1.4' > || am_version('aclocal.m4') eq '1.4')) { > $ENV{WANT_AUTOMAKE} = '1.4'; # to prevent further "cats" and to enhance consistency (possible cwd etc) > $binary = $binary_1_4; > } else { > $ENV{WANT_AUTOMAKE} = '1.8'; > } >} > >$ENV{WANT_AMWRAPPER_DEBUG} and print STDERR "am-wrapper: will execute <$binary>\n"; > >exec $binary, @ARGV; > >die "am-wrapper: ouch, couldn't call binary ($binary).\n";
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 66478
:
41191
|
41192
|
41193
|
41194
|
41195
|
42738
|
42882
|
42883
|
43350
|
43351