From 6a291adfe9e37a1fa19a73ebe99a9d47312190b2 Mon Sep 17 00:00:00 2001 From: Martin Schlemmer Date: Thu, 21 Mar 2002 20:45:42 +0000 Subject: new dual version Create dual ebuild for automake-1.4x and automake-1.6x. Have the same autodetection as autoconf-1.53, check am-wrapper.pl for details. --- am-wrapper.pl | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100755 am-wrapper.pl diff --git a/am-wrapper.pl b/am-wrapper.pl new file mode 100755 index 0000000..70f2d90 --- /dev/null +++ b/am-wrapper.pl @@ -0,0 +1,52 @@ +#!/usr/bin/perl +# +# +# Guillaume Cottenceau (gc@mandrakesoft.com) +# +# 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.4 +# - runs automake-1.6x if it exists and... +# - envvar WANT_AUTOMAKE_1_6 is set to `1' +# -or- +# - configure.ac is present +# -or- +# - `configure.in' contains AC_PREREQ and the value's 3 first letters +# are stringwise greater than '2.1' +# + +#use MDK::Common; + +sub cat_ { local *F; open F, $_[0] or return; my @l = ; wantarray ? @l : join '', @l } + +my $binary = "$0-1.4"; +my $binary_new = "$0-1.6x"; + +if (!$ENV{WANT_AUTOMAKE_1_4}) { + if (-x $binary_new # user may have only 2.13 + && ($ENV{WANT_AUTOMAKE_1_6} + || -r 'configure.ac' + || (cat_('configure.in') =~ /^\s*AC_PREREQ\(([^\)]{3})[^\)]*\)/m ? $1 : '') gt '2.1' + || (cat_('aclocal.m4') =~ /^\s*AC_PREREQ\(([^\)]{3})[^\)]*\)/m ? $1 : '') gt '2.1')) { + $ENV{WANT_AUTOMAKE_1_6} = 1; # to prevent further "cats" and to enhance consistency (possible cwd etc) + $binary = $binary_new; + } else { + $ENV{WANT_AUTOMAKE_1_4} = 1; # for further consistency + } +} + +$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"; -- cgit v1.2.3-65-gdbad From 1daab89f32e76dc04e5b4f0a7cfe307a21a61b89 Mon Sep 17 00:00:00 2001 From: Martin Schlemmer Date: Mon, 22 Apr 2002 20:56:55 +0000 Subject: fix am-wrapper.pl Update so that it can work with AC_PREREQ([2.13]) as well as AC_PREREQ(2.13). --- am-wrapper.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/am-wrapper.pl b/am-wrapper.pl index 70f2d90..3d71e75 100755 --- a/am-wrapper.pl +++ b/am-wrapper.pl @@ -36,8 +36,8 @@ if (!$ENV{WANT_AUTOMAKE_1_4}) { if (-x $binary_new # user may have only 2.13 && ($ENV{WANT_AUTOMAKE_1_6} || -r 'configure.ac' - || (cat_('configure.in') =~ /^\s*AC_PREREQ\(([^\)]{3})[^\)]*\)/m ? $1 : '') gt '2.1' - || (cat_('aclocal.m4') =~ /^\s*AC_PREREQ\(([^\)]{3})[^\)]*\)/m ? $1 : '') gt '2.1')) { + || (cat_('configure.in') =~ /^\s*AC_PREREQ\(\[?([^\)]{3})[^\)]*\)/m ? $1 : '') gt '2.1' + || (cat_('aclocal.m4') =~ /^\s*AC_PREREQ\(\[?([^\)]{3})[^\)]*\)/m ? $1 : '') gt '2.1')) { $ENV{WANT_AUTOMAKE_1_6} = 1; # to prevent further "cats" and to enhance consistency (possible cwd etc) $binary = $binary_new; } else { -- cgit v1.2.3-65-gdbad From 87e87254fe0ce8913b862221b66668e5b1f44505 Mon Sep 17 00:00:00 2001 From: Martin Schlemmer Date: Sun, 19 May 2002 18:15:43 +0000 Subject: new version New version. Thanks to Alexander Kelett for the initial version that contains all three major releases, and also am-wrapper.pl-1.6. Changes from his version: 1.5d has to have "-1.5d" as suffix, and not "-1.5", as this causes calls by aclocal to automake to fail, as they have multiversion support. Also fixed some other problems that was part of my first dual version. Added the sed to change the "-1.5x" in am-wrapper.pl-1.6 to "-1.5d". Anyway, should resolve bug 2803. --- am-wrapper.pl | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/am-wrapper.pl b/am-wrapper.pl index 3d71e75..4aa266c 100755 --- a/am-wrapper.pl +++ b/am-wrapper.pl @@ -17,28 +17,32 @@ # # - defaults to automake-1.4 # - runs automake-1.6x if it exists and... -# - envvar WANT_AUTOMAKE_1_6 is set to `1' -# -or- -# - configure.ac is present -# -or- -# - `configure.in' contains AC_PREREQ and the value's 3 first letters -# are stringwise greater than '2.1' +# - envvar WANT_AUTOMAKE_1_6 is set to `1' +# - runs automake-1.5x if it exists and... +# - envvar WANT_AUTOMAKE_1_5 is set to `1' +# or - configure.ac is present +# or - `configure.in' contains AC_PREREQ and the value's 3 first letters +# are stringwise greater than '2.1' # #use MDK::Common; sub cat_ { local *F; open F, $_[0] or return; my @l = ; wantarray ? @l : join '', @l } -my $binary = "$0-1.4"; -my $binary_new = "$0-1.6x"; +my $binary = "$0-1.4"; +my $binary_new = "$0-1.5x"; +my $binary_vnew = "$0-1.6x"; if (!$ENV{WANT_AUTOMAKE_1_4}) { - if (-x $binary_new # user may have only 2.13 - && ($ENV{WANT_AUTOMAKE_1_6} + if (-x $binary_vnew # user may not have _1_6 + && ($ENV{WANT_AUTOMAKE_1_6}) ) { + $binary = $binary_vnew; + } elsif (-x $binary_new # user may have only 2.13 + && ($ENV{WANT_AUTOMAKE_1_5} || -r 'configure.ac' || (cat_('configure.in') =~ /^\s*AC_PREREQ\(\[?([^\)]{3})[^\)]*\)/m ? $1 : '') gt '2.1' || (cat_('aclocal.m4') =~ /^\s*AC_PREREQ\(\[?([^\)]{3})[^\)]*\)/m ? $1 : '') gt '2.1')) { - $ENV{WANT_AUTOMAKE_1_6} = 1; # to prevent further "cats" and to enhance consistency (possible cwd etc) + $ENV{WANT_AUTOMAKE_1_5} = 1; # to prevent further "cats" and to enhance consistency (possible cwd etc) $binary = $binary_new; } else { $ENV{WANT_AUTOMAKE_1_4} = 1; # for further consistency -- cgit v1.2.3-65-gdbad From 622da100723a1252a42cf177cfdcd1f2fa9ff92d Mon Sep 17 00:00:00 2001 From: Martin Schlemmer Date: Mon, 23 Sep 2002 18:28:25 +0000 Subject: wrapper updates Firstly, 'am-wrapper.pl' is based on 'ac-wrapper.pl'. This is a nifty script by Guillaume Cottenceau (gc@mandrakesoft.com). This release adds updates for automake-1.6 detection. --- am-wrapper.pl | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/am-wrapper.pl b/am-wrapper.pl index 4aa266c..bb397c7 100755 --- a/am-wrapper.pl +++ b/am-wrapper.pl @@ -17,14 +17,24 @@ # # - defaults to automake-1.4 # - runs automake-1.6x if it exists and... -# - envvar WANT_AUTOMAKE_1_6 is set to `1' +# - envvar WANT_AUTOMAKE_1_6 is set to `1' +# -or- +# - `Makefile.in' was generated by automake-1.6 or superior, which +# specifically needs automake-1.6x # - runs automake-1.5x if it exists and... -# - envvar WANT_AUTOMAKE_1_5 is set to `1' -# or - configure.ac is present -# or - `configure.in' contains AC_PREREQ and the value's 3 first letters +# - envvar WANT_AUTOMAKE_1_5 is set to `1' +# -or- +# - configure.ac is present +# -or- +# - `configure.in' contains AC_PREREQ and the value's 3 first letters # are stringwise greater than '2.1' +# -or- +# - `configure' is already present and was generated by autoconf greater than +# '2.1' +# -or- +# - `Makefile.in' was generated by automake-1.5x or superior, which +# specifically needs automake-1.5x # - #use MDK::Common; sub cat_ { local *F; open F, $_[0] or return; my @l = ; wantarray ? @l : join '', @l } @@ -33,14 +43,21 @@ my $binary = "$0-1.4"; my $binary_new = "$0-1.5x"; my $binary_vnew = "$0-1.6x"; +# question here is do we really want 1.5 or 1.6? Out of a KDE outlook, it +# should rather be 1.5, and since most people would rather have migrated to +# 1.5, and then stay with it for a bit (those 1.4 die hards ..), only have +# the 'configure.ac' test for 1.5 ... if (!$ENV{WANT_AUTOMAKE_1_4}) { if (-x $binary_vnew # user may not have _1_6 - && ($ENV{WANT_AUTOMAKE_1_6}) ) { + && ($ENV{WANT_AUTOMAKE_1_6} + || (cat_('Makefile.in') =~ /^# Makefile\.in generated by automake (\S+)/ ? $1 : '') ge '1.6')) { $binary = $binary_vnew; } elsif (-x $binary_new # user may have only 2.13 && ($ENV{WANT_AUTOMAKE_1_5} || -r 'configure.ac' || (cat_('configure.in') =~ /^\s*AC_PREREQ\(\[?([^\)]{3})[^\)]*\)/m ? $1 : '') gt '2.1' + || (cat_('configure') =~ /^# Generated by Autoconf (\S+)/m ? $1 : '') gt '2.1' + || (cat_('Makefile.in') =~ /^# Makefile\.in generated by automake (\S+)/ ? $1 : '') ge '1.5' || (cat_('aclocal.m4') =~ /^\s*AC_PREREQ\(\[?([^\)]{3})[^\)]*\)/m ? $1 : '') gt '2.1')) { $ENV{WANT_AUTOMAKE_1_5} = 1; # to prevent further "cats" and to enhance consistency (possible cwd etc) $binary = $binary_new; -- cgit v1.2.3-65-gdbad From 03484305ec18f983381794bb8e1eb7e58b5e80ff Mon Sep 17 00:00:00 2001 From: Martin Schlemmer Date: Tue, 21 Jan 2003 17:26:07 +0000 Subject: new version Update version. Change WANT_AUTOMAKE_1_?=1 selection scheme to WANT_AUTOMAKE=. --- am-wrapper.pl | 92 ++++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 69 insertions(+), 23 deletions(-) diff --git a/am-wrapper.pl b/am-wrapper.pl index bb397c7..0bd13a3 100755 --- a/am-wrapper.pl +++ b/am-wrapper.pl @@ -1,7 +1,8 @@ #!/usr/bin/perl # # -# Guillaume Cottenceau (gc@mandrakesoft.com) +# Author: Guillaume Cottenceau (gc@mandrakesoft.com) +# Modified by: Martin Schlemmer (azarah@gentoo.org) # # Copyright 2001 MandrakeSoft # @@ -16,13 +17,28 @@ # Executes the correct autoconf version. # # - defaults to automake-1.4 -# - runs automake-1.6x if it exists and... -# - envvar WANT_AUTOMAKE_1_6 is set to `1' +# - 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 or superior, 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 or superior, which -# specifically needs automake-1.6x -# - runs automake-1.5x if it exists and... -# - envvar WANT_AUTOMAKE_1_5 is set to `1' +# specifically needs automake-1.6 +# -or- +# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifyint the use of 1.6 +# -or- +# - `configure.in' contains AC_PREREQ and the value's 3 first letters +# are stringwise greater than '2.53c' +# -or- +# - `configure' is already present and was generated by autoconf greater than +# '2.53c' +# - runs automake-1.5 if it exists and... +# - envvar WANT_AUTOMAKE is set to `1.5' # -or- # - configure.ac is present # -or- @@ -32,37 +48,67 @@ # - `configure' is already present and was generated by autoconf greater than # '2.1' # -or- -# - `Makefile.in' was generated by automake-1.5x or superior, which -# specifically needs automake-1.5x +# - `Makefile.in' was generated by automake-1.5 or superior, which +# specifically needs automake-1.5 # #use MDK::Common; sub cat_ { local *F; open F, $_[0] or return; my @l = ; wantarray ? @l : join '', @l } my $binary = "$0-1.4"; -my $binary_new = "$0-1.5x"; -my $binary_vnew = "$0-1.6x"; +my $binary_1_5 = "$0-1.5x"; +my $binary_1_6 = "$0-1.6x"; +my $binary_1_7 = "$0-1.7x"; + +# 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_6}) { + $ENV{WANT_AUTOMAKE} = '1.6'; + } elsif ($ENV{WANT_AUTOMAKE_1_5}) { + $ENV{WANT_AUTOMAKE} = '1.5'; + } +} # question here is do we really want 1.5 or 1.6? Out of a KDE outlook, it # should rather be 1.5, and since most people would rather have migrated to # 1.5, and then stay with it for a bit (those 1.4 die hards ..), only have # the 'configure.ac' test for 1.5 ... -if (!$ENV{WANT_AUTOMAKE_1_4}) { - if (-x $binary_vnew # user may not have _1_6 - && ($ENV{WANT_AUTOMAKE_1_6} - || (cat_('Makefile.in') =~ /^# Makefile\.in generated by automake (\S+)/ ? $1 : '') ge '1.6')) { - $binary = $binary_vnew; - } elsif (-x $binary_new # user may have only 2.13 - && ($ENV{WANT_AUTOMAKE_1_5} +if ($ENV{WANT_AUTOMAKE} ne '1.4') { + 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+)/ ? $1 : '') ge '1.7' + || (cat_('aclocal.m4') =~ /^# aclocal.m4 generated automatically by aclocal (\S+)/ ? $1 : '') ge '1.7' + || (cat_('aclocal.m4') =~ /^\s*\[?AM_AUTOMAKE_VERSION\(\[?([^\)]{3})[^\)]*\]?\)/m ? $1 : '') ge '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+)/ ? $1 : '') ge '1.6' + || (cat_('aclocal.m4') =~ /^# aclocal.m4 generated automatically by aclocal (\S+)/ ? $1 : '') ge '1.6' + || (cat_('aclocal.m4') =~ /^\s*\[?AM_AUTOMAKE_VERSION\(\[?([^\)]{3})[^\)]*\]?\)/m ? $1 : '') ge '1.6' + # Autoconf 2.53d and later need automake-1.6c, so enable 1.6 for 2.53 + # and up ..... + || (cat_('configure.in') =~ /^\s*AC_PREREQ\(\[?([^\)]{4})[^\)]*\]?\)/m ? $1 : '') gt '2.52' + || (cat_('configure') =~ /^# Generated by Autoconf (\S+)/m ? $1 : '') gt '2.52' + || (cat_('aclocal.m4') =~ /^\s*AC_PREREQ\(\[?([^\)]{4})[^\)]*\]?\)/m ? $1 : '') gt '2.52')) { + $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 have only 1.4 ... + && (($ENV{WANT_AUTOMAKE} eq '1.5') || -r 'configure.ac' - || (cat_('configure.in') =~ /^\s*AC_PREREQ\(\[?([^\)]{3})[^\)]*\)/m ? $1 : '') gt '2.1' - || (cat_('configure') =~ /^# Generated by Autoconf (\S+)/m ? $1 : '') gt '2.1' || (cat_('Makefile.in') =~ /^# Makefile\.in generated by automake (\S+)/ ? $1 : '') ge '1.5' - || (cat_('aclocal.m4') =~ /^\s*AC_PREREQ\(\[?([^\)]{3})[^\)]*\)/m ? $1 : '') gt '2.1')) { - $ENV{WANT_AUTOMAKE_1_5} = 1; # to prevent further "cats" and to enhance consistency (possible cwd etc) - $binary = $binary_new; + || (cat_('aclocal.m4') =~ /^# aclocal.m4 generated automatically by aclocal (\S+)/ ? $1 : '') ge '1.5' + || (cat_('configure.in') =~ /^\s*AC_PREREQ\(\[?([^\)]{3})[^\)]*\]?\)/m ? $1 : '') gt '2.1' + || (cat_('configure') =~ /^# Generated by Autoconf (\S+)/m ? $1 : '') gt '2.1' + || (cat_('aclocal.m4') =~ /^\s*AC_PREREQ\(\[?([^\)]{3})[^\)]*\]?\)/m ? $1 : '') gt '2.1')) { + $ENV{WANT_AUTOMAKE} = '1.5'; # to prevent further "cats" and to enhance consistency (possible cwd etc) + $binary = $binary_1_5; } else { - $ENV{WANT_AUTOMAKE_1_4} = 1; # for further consistency + $ENV{WANT_AUTOMAKE} = '1.4'; # for further consistency } } -- cgit v1.2.3-65-gdbad From 8aa25ef942326819306e0afb725cb94e3aa85ca9 Mon Sep 17 00:00:00 2001 From: Martin Schlemmer Date: Sun, 9 Mar 2003 16:46:15 +0000 Subject: update am-wrapper.pl to work with AC_PREREQ in [] --- am-wrapper.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/am-wrapper.pl b/am-wrapper.pl index 0bd13a3..83e926e 100755 --- a/am-wrapper.pl +++ b/am-wrapper.pl @@ -92,9 +92,9 @@ if ($ENV{WANT_AUTOMAKE} ne '1.4') { || (cat_('aclocal.m4') =~ /^\s*\[?AM_AUTOMAKE_VERSION\(\[?([^\)]{3})[^\)]*\]?\)/m ? $1 : '') ge '1.6' # Autoconf 2.53d and later need automake-1.6c, so enable 1.6 for 2.53 # and up ..... - || (cat_('configure.in') =~ /^\s*AC_PREREQ\(\[?([^\)]{4})[^\)]*\]?\)/m ? $1 : '') gt '2.52' + || (cat_('configure.in') =~ /^\s*\[?AC_PREREQ\(\[?([^\)]{4})[^\)]*\]?\)/m ? $1 : '') gt '2.52' || (cat_('configure') =~ /^# Generated by Autoconf (\S+)/m ? $1 : '') gt '2.52' - || (cat_('aclocal.m4') =~ /^\s*AC_PREREQ\(\[?([^\)]{4})[^\)]*\]?\)/m ? $1 : '') gt '2.52')) { + || (cat_('aclocal.m4') =~ /^\s*\[?AC_PREREQ\(\[?([^\)]{4})[^\)]*\]?\)/m ? $1 : '') gt '2.52')) { $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 have only 1.4 ... @@ -102,9 +102,9 @@ if ($ENV{WANT_AUTOMAKE} ne '1.4') { || -r 'configure.ac' || (cat_('Makefile.in') =~ /^# Makefile\.in generated by automake (\S+)/ ? $1 : '') ge '1.5' || (cat_('aclocal.m4') =~ /^# aclocal.m4 generated automatically by aclocal (\S+)/ ? $1 : '') ge '1.5' - || (cat_('configure.in') =~ /^\s*AC_PREREQ\(\[?([^\)]{3})[^\)]*\]?\)/m ? $1 : '') gt '2.1' + || (cat_('configure.in') =~ /^\s*\[?AC_PREREQ\(\[?([^\)]{3})[^\)]*\]?\)/m ? $1 : '') gt '2.1' || (cat_('configure') =~ /^# Generated by Autoconf (\S+)/m ? $1 : '') gt '2.1' - || (cat_('aclocal.m4') =~ /^\s*AC_PREREQ\(\[?([^\)]{3})[^\)]*\]?\)/m ? $1 : '') gt '2.1')) { + || (cat_('aclocal.m4') =~ /^\s*\[?AC_PREREQ\(\[?([^\)]{3})[^\)]*\]?\)/m ? $1 : '') gt '2.1')) { $ENV{WANT_AUTOMAKE} = '1.5'; # to prevent further "cats" and to enhance consistency (possible cwd etc) $binary = $binary_1_5; } else { -- cgit v1.2.3-65-gdbad From 26d29afe8e7130f5717a9677015907def193acc2 Mon Sep 17 00:00:00 2001 From: Martin Schlemmer Date: Tue, 3 Feb 2004 20:28:14 +0000 Subject: Update version; Also update version of 1.7 versions to 1.7.9 --- am-wrapper.pl | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/am-wrapper.pl b/am-wrapper.pl index 83e926e..33e30da 100755 --- a/am-wrapper.pl +++ b/am-wrapper.pl @@ -17,13 +17,21 @@ # Executes the correct autoconf version. # # - defaults to automake-1.4 +# - runs automake-1.8 if it exists and... +# - envvar WANT_AUTOMAKE is set to `1.8' +# -or- +# - `Makefile.in' was generated by automake-1.8 or superior, which +# specifically needs automake-1.8 +# -or_ +# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 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 or superior, which # specifically needs automake-1.7 -# -or_ -# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.7 +# -or- +# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifyint the use of 1.7 +# -or- # - runs automake-1.6 if it exists and... # - envvar WANT_AUTOMAKE is set to `1.6' # -or- @@ -59,6 +67,7 @@ my $binary = "$0-1.4"; my $binary_1_5 = "$0-1.5x"; my $binary_1_6 = "$0-1.6x"; my $binary_1_7 = "$0-1.7x"; +my $binary_1_8 = "$0-1.8x"; # Automake is really getting out of hand, so rather start supporting # WANT_AUTOMAKE = "1.7" the like. Unfortunately it override the old @@ -78,7 +87,14 @@ if ($ENV{WANT_AUTOMAKE} eq "") { # 1.5, and then stay with it for a bit (those 1.4 die hards ..), only have # the 'configure.ac' test for 1.5 ... if ($ENV{WANT_AUTOMAKE} ne '1.4') { - if (-x $binary_1_7 # user may not have _1_7 ... + if (-x $binary_1_8 # user may not have _1_8 ... + && (($ENV{WANT_AUTOMAKE} eq '1.8') + || (cat_('Makefile.in') =~ /^# Makefile\.in generated by automake (\S+)/ ? $1 : '') ge '1.8' + || (cat_('aclocal.m4') =~ /^# aclocal.m4 generated automatically by aclocal (\S+)/ ? $1 : '') ge '1.8' + || (cat_('aclocal.m4') =~ /^\s*\[?AM_AUTOMAKE_VERSION\(\[?([^\)]{3})[^\)]*\]?\)/m ? $1 : '') ge '1.8')) { + $ENV{WANT_AUTOMAKE} = '1.8'; # to prevent further "cats" and to enhance consistency (possible cwd etc) + $binary = $binary_1_8; + } elsif (-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+)/ ? $1 : '') ge '1.7' || (cat_('aclocal.m4') =~ /^# aclocal.m4 generated automatically by aclocal (\S+)/ ? $1 : '') ge '1.7' @@ -108,7 +124,12 @@ if ($ENV{WANT_AUTOMAKE} ne '1.4') { $ENV{WANT_AUTOMAKE} = '1.5'; # to prevent further "cats" and to enhance consistency (possible cwd etc) $binary = $binary_1_5; } else { - $ENV{WANT_AUTOMAKE} = '1.4'; # for further consistency + if (-r 'configure.in' || -r 'configure.ac') { + $ENV{WANT_AUTOMAKE} = '1.4'; # for further consistency + } else { + $ENV{WANT_AUTOMAKE} = '1.8'; + $binary = $binary_1_8; + } } } -- cgit v1.2.3-65-gdbad From 6a184527419603ff0aacce496875ee47550b4850 Mon Sep 17 00:00:00 2001 From: Martin Schlemmer Date: Wed, 16 Jun 2004 15:57:26 +0000 Subject: Update am-wrapper script to also use ac_version and am_version functions to check AC_PREREQ and AM_AUTOMAKE_VERSION (allows us to check strings beyond the first match). --- am-wrapper.pl | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/am-wrapper.pl b/am-wrapper.pl index 33e30da..06df188 100755 --- a/am-wrapper.pl +++ b/am-wrapper.pl @@ -51,10 +51,10 @@ # - configure.ac is present # -or- # - `configure.in' contains AC_PREREQ and the value's 3 first letters -# are stringwise greater than '2.1' +# are stringwise greater than '2.13' # -or- # - `configure' is already present and was generated by autoconf greater than -# '2.1' +# '2.13' # -or- # - `Makefile.in' was generated by automake-1.5 or superior, which # specifically needs automake-1.5 @@ -62,6 +62,16 @@ #use MDK::Common; sub cat_ { local *F; open F, $_[0] or return; my @l = ; wantarray ? @l : join '', @l } +sub am_version { + my $file = cat_(shift); + return (@versions = $file =~ /^\s*\[?AM_AUTOMAKE_VERSION\(\[?([^\)]{3}[0-9]?)[^\)]*\]?\)/mg) ? ((sort @versions)[-1]) : ''; +} +sub ac_version { + my $file = cat_(shift); + return (@versions = $file =~ /^\s*\[?AC_PREREQ\(\[?([^\)]{3}[0-9]?)[^\)]*\]?\)/mg) ? ((sort @versions)[-1]) : ''; +} + + my $binary = "$0-1.4"; my $binary_1_5 = "$0-1.5x"; @@ -91,26 +101,26 @@ if ($ENV{WANT_AUTOMAKE} ne '1.4') { && (($ENV{WANT_AUTOMAKE} eq '1.8') || (cat_('Makefile.in') =~ /^# Makefile\.in generated by automake (\S+)/ ? $1 : '') ge '1.8' || (cat_('aclocal.m4') =~ /^# aclocal.m4 generated automatically by aclocal (\S+)/ ? $1 : '') ge '1.8' - || (cat_('aclocal.m4') =~ /^\s*\[?AM_AUTOMAKE_VERSION\(\[?([^\)]{3})[^\)]*\]?\)/m ? $1 : '') ge '1.8')) { + || am_version('aclocal.m4') ge '1.8')) { $ENV{WANT_AUTOMAKE} = '1.8'; # to prevent further "cats" and to enhance consistency (possible cwd etc) $binary = $binary_1_8; } elsif (-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+)/ ? $1 : '') ge '1.7' || (cat_('aclocal.m4') =~ /^# aclocal.m4 generated automatically by aclocal (\S+)/ ? $1 : '') ge '1.7' - || (cat_('aclocal.m4') =~ /^\s*\[?AM_AUTOMAKE_VERSION\(\[?([^\)]{3})[^\)]*\]?\)/m ? $1 : '') ge '1.7')) { + || am_version('aclocal.m4') ge '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+)/ ? $1 : '') ge '1.6' || (cat_('aclocal.m4') =~ /^# aclocal.m4 generated automatically by aclocal (\S+)/ ? $1 : '') ge '1.6' - || (cat_('aclocal.m4') =~ /^\s*\[?AM_AUTOMAKE_VERSION\(\[?([^\)]{3})[^\)]*\]?\)/m ? $1 : '') ge '1.6' + || am_version('aclocal.m4') ge '1.6' # Autoconf 2.53d and later need automake-1.6c, so enable 1.6 for 2.53 # and up ..... - || (cat_('configure.in') =~ /^\s*\[?AC_PREREQ\(\[?([^\)]{4})[^\)]*\]?\)/m ? $1 : '') gt '2.52' + || ac_version('configure.in') gt '2.52' || (cat_('configure') =~ /^# Generated by Autoconf (\S+)/m ? $1 : '') gt '2.52' - || (cat_('aclocal.m4') =~ /^\s*\[?AC_PREREQ\(\[?([^\)]{4})[^\)]*\]?\)/m ? $1 : '') gt '2.52')) { + || ac_version('aclocal.m4') gt '2.52')) { $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 have only 1.4 ... @@ -118,9 +128,9 @@ if ($ENV{WANT_AUTOMAKE} ne '1.4') { || -r 'configure.ac' || (cat_('Makefile.in') =~ /^# Makefile\.in generated by automake (\S+)/ ? $1 : '') ge '1.5' || (cat_('aclocal.m4') =~ /^# aclocal.m4 generated automatically by aclocal (\S+)/ ? $1 : '') ge '1.5' - || (cat_('configure.in') =~ /^\s*\[?AC_PREREQ\(\[?([^\)]{3})[^\)]*\]?\)/m ? $1 : '') gt '2.1' - || (cat_('configure') =~ /^# Generated by Autoconf (\S+)/m ? $1 : '') gt '2.1' - || (cat_('aclocal.m4') =~ /^\s*\[?AC_PREREQ\(\[?([^\)]{3})[^\)]*\]?\)/m ? $1 : '') gt '2.1')) { + || ac_version('configure.in') gt '2.13' + || (cat_('configure') =~ /^# Generated by Autoconf (\S+)/m ? $1 : '') gt '2.13' + || ac_version('aclocal.m4') gt '2.13')) { $ENV{WANT_AUTOMAKE} = '1.5'; # to prevent further "cats" and to enhance consistency (possible cwd etc) $binary = $binary_1_5; } else { -- cgit v1.2.3-65-gdbad From 798c59f27020f7e5d07f53d9508bb6612f3d4c14 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 22 Oct 2004 23:45:23 +0000 Subject: initial ebuild Break the automake wrapper (am-wrapper.pl) off into its own package. --- am-wrapper.pl | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/am-wrapper.pl b/am-wrapper.pl index 06df188..4deff78 100755 --- a/am-wrapper.pl +++ b/am-wrapper.pl @@ -74,23 +74,10 @@ sub ac_version { my $binary = "$0-1.4"; -my $binary_1_5 = "$0-1.5x"; -my $binary_1_6 = "$0-1.6x"; -my $binary_1_7 = "$0-1.7x"; -my $binary_1_8 = "$0-1.8x"; - -# 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_6}) { - $ENV{WANT_AUTOMAKE} = '1.6'; - } elsif ($ENV{WANT_AUTOMAKE_1_5}) { - $ENV{WANT_AUTOMAKE} = '1.5'; - } -} +my $binary_1_5 = "$0-1.5"; +my $binary_1_6 = "$0-1.6"; +my $binary_1_7 = "$0-1.7"; +my $binary_1_8 = "$0-1.8"; # question here is do we really want 1.5 or 1.6? Out of a KDE outlook, it # should rather be 1.5, and since most people would rather have migrated to -- cgit v1.2.3-65-gdbad From a748dea265c018d4b717987f68b53b05f1907837 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 14 Nov 2004 05:32:54 +0000 Subject: Punt perl version of wrapper in favor of bash by Gregorio Guidi #66478. --- am-wrapper.pl | 137 ---------------------------------------------------------- am-wrapper.sh | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+), 137 deletions(-) delete mode 100755 am-wrapper.pl create mode 100755 am-wrapper.sh diff --git a/am-wrapper.pl b/am-wrapper.pl deleted file mode 100755 index 4deff78..0000000 --- a/am-wrapper.pl +++ /dev/null @@ -1,137 +0,0 @@ -#!/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.4 -# - runs automake-1.8 if it exists and... -# - envvar WANT_AUTOMAKE is set to `1.8' -# -or- -# - `Makefile.in' was generated by automake-1.8 or superior, which -# specifically needs automake-1.8 -# -or_ -# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 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 or superior, which -# specifically needs automake-1.7 -# -or- -# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifyint the use of 1.7 -# -or- -# - 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 or superior, which -# specifically needs automake-1.6 -# -or- -# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifyint the use of 1.6 -# -or- -# - `configure.in' contains AC_PREREQ and the value's 3 first letters -# are stringwise greater than '2.53c' -# -or- -# - `configure' is already present and was generated by autoconf greater than -# '2.53c' -# - runs automake-1.5 if it exists and... -# - envvar WANT_AUTOMAKE is set to `1.5' -# -or- -# - configure.ac is present -# -or- -# - `configure.in' contains AC_PREREQ and the value's 3 first letters -# are stringwise greater than '2.13' -# -or- -# - `configure' is already present and was generated by autoconf greater than -# '2.13' -# -or- -# - `Makefile.in' was generated by automake-1.5 or superior, which -# specifically needs automake-1.5 -# -#use MDK::Common; - -sub cat_ { local *F; open F, $_[0] or return; my @l = ; wantarray ? @l : join '', @l } -sub am_version { - my $file = cat_(shift); - return (@versions = $file =~ /^\s*\[?AM_AUTOMAKE_VERSION\(\[?([^\)]{3}[0-9]?)[^\)]*\]?\)/mg) ? ((sort @versions)[-1]) : ''; -} -sub ac_version { - my $file = cat_(shift); - return (@versions = $file =~ /^\s*\[?AC_PREREQ\(\[?([^\)]{3}[0-9]?)[^\)]*\]?\)/mg) ? ((sort @versions)[-1]) : ''; -} - - - -my $binary = "$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_1_8 = "$0-1.8"; - -# question here is do we really want 1.5 or 1.6? Out of a KDE outlook, it -# should rather be 1.5, and since most people would rather have migrated to -# 1.5, and then stay with it for a bit (those 1.4 die hards ..), only have -# the 'configure.ac' test for 1.5 ... -if ($ENV{WANT_AUTOMAKE} ne '1.4') { - if (-x $binary_1_8 # user may not have _1_8 ... - && (($ENV{WANT_AUTOMAKE} eq '1.8') - || (cat_('Makefile.in') =~ /^# Makefile\.in generated by automake (\S+)/ ? $1 : '') ge '1.8' - || (cat_('aclocal.m4') =~ /^# aclocal.m4 generated automatically by aclocal (\S+)/ ? $1 : '') ge '1.8' - || am_version('aclocal.m4') ge '1.8')) { - $ENV{WANT_AUTOMAKE} = '1.8'; # to prevent further "cats" and to enhance consistency (possible cwd etc) - $binary = $binary_1_8; - } elsif (-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+)/ ? $1 : '') ge '1.7' - || (cat_('aclocal.m4') =~ /^# aclocal.m4 generated automatically by aclocal (\S+)/ ? $1 : '') ge '1.7' - || am_version('aclocal.m4') ge '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+)/ ? $1 : '') ge '1.6' - || (cat_('aclocal.m4') =~ /^# aclocal.m4 generated automatically by aclocal (\S+)/ ? $1 : '') ge '1.6' - || am_version('aclocal.m4') ge '1.6' - # Autoconf 2.53d and later need automake-1.6c, so enable 1.6 for 2.53 - # and up ..... - || ac_version('configure.in') gt '2.52' - || (cat_('configure') =~ /^# Generated by Autoconf (\S+)/m ? $1 : '') gt '2.52' - || ac_version('aclocal.m4') gt '2.52')) { - $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 have only 1.4 ... - && (($ENV{WANT_AUTOMAKE} eq '1.5') - || -r 'configure.ac' - || (cat_('Makefile.in') =~ /^# Makefile\.in generated by automake (\S+)/ ? $1 : '') ge '1.5' - || (cat_('aclocal.m4') =~ /^# aclocal.m4 generated automatically by aclocal (\S+)/ ? $1 : '') ge '1.5' - || ac_version('configure.in') gt '2.13' - || (cat_('configure') =~ /^# Generated by Autoconf (\S+)/m ? $1 : '') gt '2.13' - || ac_version('aclocal.m4') gt '2.13')) { - $ENV{WANT_AUTOMAKE} = '1.5'; # to prevent further "cats" and to enhance consistency (possible cwd etc) - $binary = $binary_1_5; - } else { - if (-r 'configure.in' || -r 'configure.ac') { - $ENV{WANT_AUTOMAKE} = '1.4'; # for further consistency - } else { - $ENV{WANT_AUTOMAKE} = '1.8'; - $binary = $binary_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"; diff --git a/am-wrapper.sh b/am-wrapper.sh new file mode 100755 index 0000000..6733f65 --- /dev/null +++ b/am-wrapper.sh @@ -0,0 +1,120 @@ +#!/bin/bash +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-1.sh,v 1.1 2004/11/14 05:32:54 vapier Exp $ + +# Based on the am-wrapper.pl script provided by MandrakeSoft +# Rewritten in bash by Gregorio Guidi +# +# Executes the correct automake version. +# +# - defaults to automake-1.8 +# - runs automake-1.7 if: +# - envvar WANT_AUTOMAKE is set to `1.7' +# -or- +# - `Makefile.in' was generated by automake-1.7 +# -or- +# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.7 +# - runs automake-1.6 if: +# - envvar WANT_AUTOMAKE is set to `1.6' +# -or- +# - `Makefile.in' +# -or- +# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.6 +# - runs automake-1.5 if: +# - envvar WANT_AUTOMAKE is set to `1.5' +# -or- +# - `Makefile.in' was generated by automake-1.5 +# -or- +# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.5 +# - runs automake-1.4 if: +# - envvar WANT_AUTOMAKE is set to `1.4' +# -or- +# - `Makefile.in' was generated by automake-1.4 +# -or- +# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.4 + +if [ "${0##*/}" = "am-wrapper.sh" ] ; then + echo "Don't call this script directly." >&2 + exit 1 +fi + +vers="$(seq 1.9 -0.1 1.4)" + +for v in ${vers} ; do + eval binary_${v/./_}="${0}-${v}" +done +binary="binary_1_9" + +# +# autodetect routine +# +for v in ${vers} x ; do + if [ "${v}" = "x" ] ; then + unset WANT_AUTOMAKE + break + fi + + if [ "${WANT_AUTOMAKE}" = "${v}" ] ; then + binary="binary_${v/./_}" + binary="${!binary}" + break + fi +done + +do_awk() { + local file=$1 ; shift + local arg=$1 ; shift + echo $(awk "{ if (match(\$0, \"$*\", res)) { print res[${arg}]; exit } }" ${file}) +} + +if [ -z "${WANT_AUTOMAKE}" ] ; then + if [ -r "Makefile.in" ] ; then + confversion_mf=$(do_awk Makefile.in 2 "^# Makefile.in generated (automatically )?by automake ([0-9].[0-9])") + fi + if [ -r "aclocal.m4" ] ; then + confversion_ac=$(do_awk aclocal.m4 1 'generated automatically by aclocal ([0-9].[0-9])') + confversion_am=$(do_awk aclocal.m4 1 '[[:space:]]*\\[?AM_AUTOMAKE_VERSION\\(\\[?([0-9].[0-9])[^)]*\\]?\\)') + fi + + for v in ${vers} ; do + if [ "${confversion_mf}" = "${v}" ] \ + || [ "${confversion_ac}" = "${v}" ] \ + || [ "${confversion_am}" = "${v}" ] ; then + binary="binary_${v/./_}" + binary="${!binary}" + break + fi + done +fi + +if [ "${WANT_AMWRAPPER_DEBUG}" ] ; then + if [ "${WANT_AUTOMAKE}" ] ; then + echo "am-wrapper: DEBUG: WANT_AUTOMAKE is set to ${WANT_AUTOMAKE}" >&2 + fi + echo "am-wrapper: DEBUG: will execute <$binary>" >&2 +fi + +# +# for further consistency +# +for v in ${vers} ; do + mybin="binary_${v/./_}" + if [ "${binary}" = "${!mybin}" ] ; then + export WANT_AUTOMAKE="${v}" + fi +done + +# +# Now try to run the binary +# +if [ ! -x "${binary}" ] ; then + echo "am-wrapper: $binary is missing or not executable." >&2 + echo " Please try emerging the correct version of automake." >&2 + exit 1 +fi + +exec "$binary" "$@" + +echo "am-wrapper: was unable to exec $binary !?" >&2 +exit 1 -- cgit v1.2.3-65-gdbad From 1902df6a55bd468bb7768d06159cb208852ff8c1 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 14 Nov 2004 05:46:07 +0000 Subject: set binary properly --- am-wrapper.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/am-wrapper.sh b/am-wrapper.sh index 6733f65..e72cd34 100755 --- a/am-wrapper.sh +++ b/am-wrapper.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-1.sh,v 1.1 2004/11/14 05:32:54 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-1.sh,v 1.2 2004/11/14 05:46:07 vapier Exp $ # Based on the am-wrapper.pl script provided by MandrakeSoft # Rewritten in bash by Gregorio Guidi @@ -39,12 +39,12 @@ if [ "${0##*/}" = "am-wrapper.sh" ] ; then exit 1 fi -vers="$(seq 1.9 -0.1 1.4)" +vers="1.9 1.8 1.7 1.6 1.5 1.4)" for v in ${vers} ; do eval binary_${v/./_}="${0}-${v}" done -binary="binary_1_9" +binary="${binary_1_9}" # # autodetect routine -- cgit v1.2.3-65-gdbad From 23f3dc399e7dd4513b52570b22eb933f9f1dccf8 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 15 Nov 2004 00:57:43 +0000 Subject: wrapper updates #71132 --- am-wrapper.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/am-wrapper.sh b/am-wrapper.sh index e72cd34..54935e0 100755 --- a/am-wrapper.sh +++ b/am-wrapper.sh @@ -1,14 +1,20 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-1.sh,v 1.2 2004/11/14 05:46:07 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-1.sh,v 1.3 2004/11/15 00:57:43 vapier Exp $ # Based on the am-wrapper.pl script provided by MandrakeSoft # Rewritten in bash by Gregorio Guidi # # Executes the correct automake version. # -# - defaults to automake-1.8 +# - defaults to automake-1.9 +# - runs automake-1.8 if: +# - envvar WANT_AUTOMAKE is set to `1.8' +# -or- +# - `Makefile.in' was generated by automake-1.8 +# -or- +# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.8 # - runs automake-1.7 if: # - envvar WANT_AUTOMAKE is set to `1.7' # -or- @@ -39,7 +45,7 @@ if [ "${0##*/}" = "am-wrapper.sh" ] ; then exit 1 fi -vers="1.9 1.8 1.7 1.6 1.5 1.4)" +vers="1.9 1.8 1.7 1.6 1.5 1.4" for v in ${vers} ; do eval binary_${v/./_}="${0}-${v}" @@ -47,7 +53,7 @@ done binary="${binary_1_9}" # -# autodetect routine +# Check the WANT_AUTOMAKE setting # for v in ${vers} x ; do if [ "${v}" = "x" ] ; then @@ -68,6 +74,9 @@ do_awk() { echo $(awk "{ if (match(\$0, \"$*\", res)) { print res[${arg}]; exit } }" ${file}) } +# +# autodetect routine +# if [ -z "${WANT_AUTOMAKE}" ] ; then if [ -r "Makefile.in" ] ; then confversion_mf=$(do_awk Makefile.in 2 "^# Makefile.in generated (automatically )?by automake ([0-9].[0-9])") -- cgit v1.2.3-65-gdbad From 52754c88658af380b51d58e6bf4ae767845e3b5c Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 14 May 2005 17:42:00 +0000 Subject: use gawk, not awk #92582 Package-Manager: portage-2.0.51.21-r1 --- am-wrapper.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/am-wrapper.sh b/am-wrapper.sh index 54935e0..b21e0e0 100755 --- a/am-wrapper.sh +++ b/am-wrapper.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-1.sh,v 1.3 2004/11/15 00:57:43 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-1.sh,v 1.4 2005/05/14 17:42:00 vapier Exp $ # Based on the am-wrapper.pl script provided by MandrakeSoft # Rewritten in bash by Gregorio Guidi @@ -71,7 +71,7 @@ done do_awk() { local file=$1 ; shift local arg=$1 ; shift - echo $(awk "{ if (match(\$0, \"$*\", res)) { print res[${arg}]; exit } }" ${file}) + echo $(gawk "{ if (match(\$0, \"$*\", res)) { print res[${arg}]; exit } }" ${file}) } # -- cgit v1.2.3-65-gdbad From aa915853509a1ae605d301989b983722cf82ce6b Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Oct 2006 01:38:59 +0000 Subject: Include support for automake-1.10. Package-Manager: portage-2.1.2_pre2-r9 --- am-wrapper.sh | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/am-wrapper.sh b/am-wrapper.sh index b21e0e0..e3d84a8 100755 --- a/am-wrapper.sh +++ b/am-wrapper.sh @@ -1,14 +1,20 @@ #!/bin/bash -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-1.sh,v 1.4 2005/05/14 17:42:00 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-2.sh,v 1.1 2006/10/16 01:38:59 vapier Exp $ # Based on the am-wrapper.pl script provided by MandrakeSoft # Rewritten in bash by Gregorio Guidi # # Executes the correct automake version. # -# - defaults to automake-1.9 +# - defaults to automake-1.10 +# - runs automake-1.9 if: +# - envvar WANT_AUTOMAKE is set to `1.9' +# -or- +# - `Makefile.in' was generated by automake-1.9 +# -or- +# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.9 # - runs automake-1.8 if: # - envvar WANT_AUTOMAKE is set to `1.8' # -or- @@ -45,12 +51,12 @@ if [ "${0##*/}" = "am-wrapper.sh" ] ; then exit 1 fi -vers="1.9 1.8 1.7 1.6 1.5 1.4" +vers="1.10 1.9 1.8 1.7 1.6 1.5 1.4" for v in ${vers} ; do eval binary_${v/./_}="${0}-${v}" done -binary="${binary_1_9}" +binary="${binary_1_10}" # # Check the WANT_AUTOMAKE setting @@ -79,11 +85,11 @@ do_awk() { # if [ -z "${WANT_AUTOMAKE}" ] ; then if [ -r "Makefile.in" ] ; then - confversion_mf=$(do_awk Makefile.in 2 "^# Makefile.in generated (automatically )?by automake ([0-9].[0-9])") + confversion_mf=$(do_awk Makefile.in 2 "^# Makefile.in generated (automatically )?by automake ([0-9].[0-9]+)") fi if [ -r "aclocal.m4" ] ; then - confversion_ac=$(do_awk aclocal.m4 1 'generated automatically by aclocal ([0-9].[0-9])') - confversion_am=$(do_awk aclocal.m4 1 '[[:space:]]*\\[?AM_AUTOMAKE_VERSION\\(\\[?([0-9].[0-9])[^)]*\\]?\\)') + confversion_ac=$(do_awk aclocal.m4 1 'generated automatically by aclocal ([0-9].[0-9]+)') + confversion_am=$(do_awk aclocal.m4 1 '[[:space:]]*\\[?AM_AUTOMAKE_VERSION\\(\\[?([0-9].[0-9]+)[^)]*\\]?\\)') fi for v in ${vers} ; do -- cgit v1.2.3-65-gdbad From 16f1f8bf11137d5c881f11f038ae10c3a8f756fa Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 5 Nov 2006 08:11:18 +0000 Subject: Make default automake selection more flexible and allow WANT_AUTOMAKE to contain a list of versions. Package-Manager: portage-2.1.2_rc1-r2 --- am-wrapper.sh | 49 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/am-wrapper.sh b/am-wrapper.sh index e3d84a8..0bbb69a 100755 --- a/am-wrapper.sh +++ b/am-wrapper.sh @@ -1,14 +1,14 @@ #!/bin/bash # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-2.sh,v 1.1 2006/10/16 01:38:59 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-3.sh,v 1.1 2006/11/05 08:11:18 vapier Exp $ # Based on the am-wrapper.pl script provided by MandrakeSoft # Rewritten in bash by Gregorio Guidi # # Executes the correct automake version. # -# - defaults to automake-1.10 +# - defaults to newest version available (hopefully automake-1.10) # - runs automake-1.9 if: # - envvar WANT_AUTOMAKE is set to `1.9' # -or- @@ -53,26 +53,45 @@ fi vers="1.10 1.9 1.8 1.7 1.6 1.5 1.4" +# +# Export the proper variable/versions and try to locate a usuable +# default (newer versions are preferred) +# +binary="" for v in ${vers} ; do eval binary_${v/./_}="${0}-${v}" + + if [ -z "${binary}" ] && [ -x "${0}-${v}" ] ; then + binary="${0}-${v}" + fi done -binary="${binary_1_10}" +if [ -z "${binary}" ] ; then + echo "am-wrapper: Unable to locate any usuable version of automake." >&2 + echo " I tried these versions: ${vers}" >&2 + echo " With a base name of '${0}'." >&2 + exit 1 +fi # -# Check the WANT_AUTOMAKE setting +# Check the WANT_AUTOMAKE setting. We accept a whitespace delimited +# list of automake versions. # -for v in ${vers} x ; do - if [ "${v}" = "x" ] ; then - unset WANT_AUTOMAKE - break - fi +if [ -n "${WANT_AUTOMAKE}" ] ; then + for v in ${vers} x ; do + if [ "${v}" = "x" ] ; then + unset WANT_AUTOMAKE + break + fi - if [ "${WANT_AUTOMAKE}" = "${v}" ] ; then - binary="binary_${v/./_}" - binary="${!binary}" - break - fi -done + for wx in ${WANT_AUTOMAKE} ; do + if [ "${wx}" = "${v}" ] ; then + binary="binary_${v/./_}" + binary="${!binary}" + break + fi + done + done +fi do_awk() { local file=$1 ; shift -- cgit v1.2.3-65-gdbad From d49887c1093ecb3150aa89040d5bc38a47a4b907 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 5 Nov 2006 08:22:46 +0000 Subject: make sure we warn when someone uses an invalid WANT_AUTOMAKE value Package-Manager: portage-2.1.2_rc1-r2 --- am-wrapper.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/am-wrapper.sh b/am-wrapper.sh index 0bbb69a..ff8cde7 100755 --- a/am-wrapper.sh +++ b/am-wrapper.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-3.sh,v 1.1 2006/11/05 08:11:18 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-3.sh,v 1.2 2006/11/05 08:22:46 vapier Exp $ # Based on the am-wrapper.pl script provided by MandrakeSoft # Rewritten in bash by Gregorio Guidi @@ -79,6 +79,7 @@ fi if [ -n "${WANT_AUTOMAKE}" ] ; then for v in ${vers} x ; do if [ "${v}" = "x" ] ; then + echo "am-wrapper: warning: invalid WANT_AUTOMAKE '${WANT_AUTOMAKE}'; ignoring." >&2 unset WANT_AUTOMAKE break fi -- cgit v1.2.3-65-gdbad From f6f90290d087a42900f811a28fd3c58326b234af Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 5 Nov 2006 10:22:00 +0000 Subject: Make sure we break out of new loop as reported by Alexis Ballier. Package-Manager: portage-2.1.2_rc1-r2 --- am-wrapper.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/am-wrapper.sh b/am-wrapper.sh index ff8cde7..5596468 100755 --- a/am-wrapper.sh +++ b/am-wrapper.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-3.sh,v 1.2 2006/11/05 08:22:46 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-3.sh,v 1.3 2006/11/05 10:22:00 vapier Exp $ # Based on the am-wrapper.pl script provided by MandrakeSoft # Rewritten in bash by Gregorio Guidi @@ -88,12 +88,16 @@ if [ -n "${WANT_AUTOMAKE}" ] ; then if [ "${wx}" = "${v}" ] ; then binary="binary_${v/./_}" binary="${!binary}" - break + v="x" fi done + [ "${v}" = "x" ] && break done fi +# +# autodetect helpers +# do_awk() { local file=$1 ; shift local arg=$1 ; shift -- cgit v1.2.3-65-gdbad From 88c52a53aa515037f778f6645fc9e4a15ed2fe54 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 17 May 2009 21:36:04 +0000 Subject: Create a real new version rather than mucking with the FILESDIR. Package-Manager: portage-2.2_rc33/cvs/Linux x86_64 --- am-wrapper.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/am-wrapper.sh b/am-wrapper.sh index 5596468..b2adc42 100755 --- a/am-wrapper.sh +++ b/am-wrapper.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-3.sh,v 1.3 2006/11/05 10:22:00 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-4.sh,v 1.1 2009/05/17 21:36:04 vapier Exp $ # Based on the am-wrapper.pl script provided by MandrakeSoft # Rewritten in bash by Gregorio Guidi @@ -51,7 +51,7 @@ if [ "${0##*/}" = "am-wrapper.sh" ] ; then exit 1 fi -vers="1.10 1.9 1.8 1.7 1.6 1.5 1.4" +vers="1.11 1.10 1.9 1.8 1.7 1.6 1.5 1.4" # # Export the proper variable/versions and try to locate a usuable -- cgit v1.2.3-65-gdbad From 6776088b842e845ef7d774d6a2b2fd267260d747 Mon Sep 17 00:00:00 2001 From: Markus Duft Date: Wed, 24 Feb 2010 08:08:28 +0000 Subject: fixed prefix support -> dont use /bin/bash in the shebang, since bash may not be installed in the host system. Package-Manager: portage-2.1.7.16/cvs/Linux i686 --- am-wrapper.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/am-wrapper.sh b/am-wrapper.sh index b2adc42..2b222ce 100755 --- a/am-wrapper.sh +++ b/am-wrapper.sh @@ -1,7 +1,7 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-4.sh,v 1.1 2009/05/17 21:36:04 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-4.sh,v 1.2 2010/02/24 08:08:28 mduft Exp $ # Based on the am-wrapper.pl script provided by MandrakeSoft # Rewritten in bash by Gregorio Guidi -- cgit v1.2.3-65-gdbad From 449e57d55fdde49dfa920ea2fc5848e3e4a80178 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 7 Mar 2010 15:45:40 +0000 Subject: Merge updates from autoconf-wrapper to get POSIX-only code. Package-Manager: portage-2.2_rc65/cvs/Linux x86_64 --- am-wrapper.sh | 51 +++++++++++++++++++++++---------------------------- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/am-wrapper.sh b/am-wrapper.sh index 2b222ce..dbf6df6 100755 --- a/am-wrapper.sh +++ b/am-wrapper.sh @@ -1,7 +1,7 @@ -#!/usr/bin/env bash -# Copyright 1999-2006 Gentoo Foundation +#!/bin/sh +# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-4.sh,v 1.2 2010/02/24 08:08:28 mduft Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-5.sh,v 1.1 2010/03/07 15:45:40 vapier Exp $ # Based on the am-wrapper.pl script provided by MandrakeSoft # Rewritten in bash by Gregorio Guidi @@ -46,9 +46,11 @@ # -or- # - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.4 +warn() { printf "am-wrapper: $*\n" 1>&2; } +err() { warn "$@"; exit 1; } + if [ "${0##*/}" = "am-wrapper.sh" ] ; then - echo "Don't call this script directly." >&2 - exit 1 + err "Don't call this script directly" fi vers="1.11 1.10 1.9 1.8 1.7 1.6 1.5 1.4" @@ -59,17 +61,14 @@ vers="1.11 1.10 1.9 1.8 1.7 1.6 1.5 1.4" # binary="" for v in ${vers} ; do - eval binary_${v/./_}="${0}-${v}" - if [ -z "${binary}" ] && [ -x "${0}-${v}" ] ; then binary="${0}-${v}" fi done if [ -z "${binary}" ] ; then - echo "am-wrapper: Unable to locate any usuable version of automake." >&2 - echo " I tried these versions: ${vers}" >&2 - echo " With a base name of '${0}'." >&2 - exit 1 + err "Unable to locate any usuable version of automake.\n" \ + "\tI tried these versions: ${vers}\n" \ + "\tWith a base name of '${0}'." fi # @@ -79,15 +78,14 @@ fi if [ -n "${WANT_AUTOMAKE}" ] ; then for v in ${vers} x ; do if [ "${v}" = "x" ] ; then - echo "am-wrapper: warning: invalid WANT_AUTOMAKE '${WANT_AUTOMAKE}'; ignoring." >&2 + warn "warning: invalid WANT_AUTOMAKE '${WANT_AUTOMAKE}'; ignoring." unset WANT_AUTOMAKE break fi for wx in ${WANT_AUTOMAKE} ; do if [ "${wx}" = "${v}" ] ; then - binary="binary_${v/./_}" - binary="${!binary}" + binary="${0}-${v}" v="x" fi done @@ -117,11 +115,11 @@ if [ -z "${WANT_AUTOMAKE}" ] ; then fi for v in ${vers} ; do - if [ "${confversion_mf}" = "${v}" ] \ - || [ "${confversion_ac}" = "${v}" ] \ - || [ "${confversion_am}" = "${v}" ] ; then - binary="binary_${v/./_}" - binary="${!binary}" + if [ "${confversion_mf}" = "${v}" ] || \ + [ "${confversion_ac}" = "${v}" ] || \ + [ "${confversion_am}" = "${v}" ] + then + binary="${0}-${v}" break fi done @@ -129,17 +127,16 @@ fi if [ "${WANT_AMWRAPPER_DEBUG}" ] ; then if [ "${WANT_AUTOMAKE}" ] ; then - echo "am-wrapper: DEBUG: WANT_AUTOMAKE is set to ${WANT_AUTOMAKE}" >&2 + warn "DEBUG: WANT_AUTOMAKE is set to ${WANT_AUTOMAKE}" fi - echo "am-wrapper: DEBUG: will execute <$binary>" >&2 + warn "DEBUG: will execute <$binary>" fi # # for further consistency # for v in ${vers} ; do - mybin="binary_${v/./_}" - if [ "${binary}" = "${!mybin}" ] ; then + if [ "${binary}" = "${0}-${v}" ] ; then export WANT_AUTOMAKE="${v}" fi done @@ -148,12 +145,10 @@ done # Now try to run the binary # if [ ! -x "${binary}" ] ; then - echo "am-wrapper: $binary is missing or not executable." >&2 - echo " Please try emerging the correct version of automake." >&2 - exit 1 + err "$binary is missing or not executable.\n" \ + "\tPlease try emerging the correct version of automake." fi exec "$binary" "$@" -echo "am-wrapper: was unable to exec $binary !?" >&2 -exit 1 +err "was unable to exec $binary !?" -- cgit v1.2.3-65-gdbad From 86cc848ce4eb4446b1c5ba8bd43cbbda99d8e067 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 2 Oct 2011 19:51:17 +0000 Subject: Optimize version lookup a bit, and handle the case where $0 is not a full path #385201 by Florian Philipp. Package-Manager: portage-2.2.0_alpha59/cvs/Linux x86_64 --- am-wrapper.sh | 50 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/am-wrapper.sh b/am-wrapper.sh index dbf6df6..f3704d5 100755 --- a/am-wrapper.sh +++ b/am-wrapper.sh @@ -1,7 +1,7 @@ #!/bin/sh -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-5.sh,v 1.1 2010/03/07 15:45:40 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-6.sh,v 1.1 2011/10/02 19:51:17 vapier Exp $ # Based on the am-wrapper.pl script provided by MandrakeSoft # Rewritten in bash by Gregorio Guidi @@ -46,10 +46,38 @@ # -or- # - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.4 -warn() { printf "am-wrapper: $*\n" 1>&2; } +warn() { printf 'am-wrapper: %s: %b\n' "${argv0}" "$*" 1>&2; } err() { warn "$@"; exit 1; } +unset IFS +which() { + local p + IFS=: # we don't use IFS anywhere, so don't bother saving/restoring + for p in ${PATH} ; do + p="${p}/$1" + [ -e "${p}" ] && echo "${p}" && return 0 + done + unset IFS + return 1 +} + +# +# Sanitize argv[0] since it isn't always a full path #385201 +# +argv0=${0##*/} +case ${0} in + ${argv0}) + # find it in PATH + if ! full_argv0=$(which "${argv0}") ; then + err "could not locate ${argv0}; file a bug" + fi + ;; + *) + # re-use full/relative paths + full_argv0=$0 + ;; +esac -if [ "${0##*/}" = "am-wrapper.sh" ] ; then +if [ "${argv0}" = "am-wrapper.sh" ] ; then err "Don't call this script directly" fi @@ -61,14 +89,15 @@ vers="1.11 1.10 1.9 1.8 1.7 1.6 1.5 1.4" # binary="" for v in ${vers} ; do - if [ -z "${binary}" ] && [ -x "${0}-${v}" ] ; then - binary="${0}-${v}" + if [ -z "${binary}" ] && [ -x "${full_argv0}-${v}" ] ; then + binary="${full_argv0}-${v}" + break fi done if [ -z "${binary}" ] ; then err "Unable to locate any usuable version of automake.\n" \ "\tI tried these versions: ${vers}\n" \ - "\tWith a base name of '${0}'." + "\tWith a base name of '${full_argv0}'." fi # @@ -85,7 +114,7 @@ if [ -n "${WANT_AUTOMAKE}" ] ; then for wx in ${WANT_AUTOMAKE} ; do if [ "${wx}" = "${v}" ] ; then - binary="${0}-${v}" + binary="${full_argv0}-${v}" v="x" fi done @@ -119,7 +148,7 @@ if [ -z "${WANT_AUTOMAKE}" ] ; then [ "${confversion_ac}" = "${v}" ] || \ [ "${confversion_am}" = "${v}" ] then - binary="${0}-${v}" + binary="${full_argv0}-${v}" break fi done @@ -136,8 +165,9 @@ fi # for further consistency # for v in ${vers} ; do - if [ "${binary}" = "${0}-${v}" ] ; then + if [ "${binary}" = "${full_argv0}-${v}" ] ; then export WANT_AUTOMAKE="${v}" + break fi done -- cgit v1.2.3-65-gdbad From 04dfe72ec775b832fe6825d3abe3c746e7f4db44 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 26 Apr 2012 05:42:10 +0000 Subject: Support new automake-1.12. Package-Manager: portage-2.2.0_alpha100/cvs/Linux x86_64 --- am-wrapper.sh | 106 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/am-wrapper.sh b/am-wrapper.sh index f3704d5..dd0920f 100755 --- a/am-wrapper.sh +++ b/am-wrapper.sh @@ -1,50 +1,20 @@ #!/bin/sh -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-6.sh,v 1.1 2011/10/02 19:51:17 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-7.sh,v 1.1 2012/04/26 05:42:10 vapier Exp $ # Based on the am-wrapper.pl script provided by MandrakeSoft # Rewritten in bash by Gregorio Guidi # # Executes the correct automake version. # -# - defaults to newest version available (hopefully automake-1.10) -# - runs automake-1.9 if: -# - envvar WANT_AUTOMAKE is set to `1.9' +# - defaults to newest version available (hopefully automake-1.12) +# - runs automake-1.X (where X is a valid automake version) if: +# - envvar WANT_AUTOMAKE is set to `1.X' # -or- -# - `Makefile.in' was generated by automake-1.9 +# - `Makefile.in' was generated by automake-1.X # -or- -# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.9 -# - runs automake-1.8 if: -# - envvar WANT_AUTOMAKE is set to `1.8' -# -or- -# - `Makefile.in' was generated by automake-1.8 -# -or- -# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.8 -# - runs automake-1.7 if: -# - envvar WANT_AUTOMAKE is set to `1.7' -# -or- -# - `Makefile.in' was generated by automake-1.7 -# -or- -# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.7 -# - runs automake-1.6 if: -# - envvar WANT_AUTOMAKE is set to `1.6' -# -or- -# - `Makefile.in' -# -or- -# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.6 -# - runs automake-1.5 if: -# - envvar WANT_AUTOMAKE is set to `1.5' -# -or- -# - `Makefile.in' was generated by automake-1.5 -# -or- -# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.5 -# - runs automake-1.4 if: -# - envvar WANT_AUTOMAKE is set to `1.4' -# -or- -# - `Makefile.in' was generated by automake-1.4 -# -or- -# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.4 +# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.X warn() { printf 'am-wrapper: %s: %b\n' "${argv0}" "$*" 1>&2; } err() { warn "$@"; exit 1; } @@ -81,22 +51,51 @@ if [ "${argv0}" = "am-wrapper.sh" ] ; then err "Don't call this script directly" fi -vers="1.11 1.10 1.9 1.8 1.7 1.6 1.5 1.4" +if ! seq 0 0 2>/dev/null 1>&2 ; then #338518 + seq() { + local f l i + case $# in + 1) f=1 i=1 l=$1;; + 2) f=$1 i=1 l=$2;; + 3) f=$1 i=$2 l=$3;; + esac + while :; do + [ $l -lt $f -a $i -gt 0 ] && break + [ $f -lt $l -a $i -lt 0 ] && break + echo $f + : $(( f += i )) + done + return 0 + } +fi # -# Export the proper variable/versions and try to locate a usuable -# default (newer versions are preferred) +# Set up bindings between actual version and WANT_AUTOMAKE; +# Start with last known versions to speed up lookup process. # +LAST_KNOWN_AUTOMAKE_VER="12" +vers=$(printf '1.%s ' `seq ${LAST_KNOWN_AUTOMAKE_VER} -1 4`) + +find_binary() { + local v + all_vers="${all_vers} $*" + for v in "$@" ; do + if [ -x "${full_argv0}-${v}" ] ; then + binary="${full_argv0}-${v}" + return 0 + fi + done + return 1 +} binary="" -for v in ${vers} ; do - if [ -z "${binary}" ] && [ -x "${full_argv0}-${v}" ] ; then - binary="${full_argv0}-${v}" - break - fi -done +all_vers="" +if ! find_binary ${vers} ; then + find_binary $(printf '1.%s ' `seq 99 -1 ${LAST_KNOWN_AUTOMAKE_VER}`) +fi + if [ -z "${binary}" ] ; then err "Unable to locate any usuable version of automake.\n" \ - "\tI tried these versions: ${vers}\n" \ + "\tI tried these versions:${all_vers}\n" \ "\tWith a base name of '${full_argv0}'." fi @@ -154,11 +153,11 @@ if [ -z "${WANT_AUTOMAKE}" ] ; then done fi -if [ "${WANT_AMWRAPPER_DEBUG}" ] ; then - if [ "${WANT_AUTOMAKE}" ] ; then +if [ -n "${WANT_AMWRAPPER_DEBUG}" ] ; then + if [ -n "${WANT_AUTOMAKE}" ] ; then warn "DEBUG: WANT_AUTOMAKE is set to ${WANT_AUTOMAKE}" fi - warn "DEBUG: will execute <$binary>" + warn "DEBUG: will execute <${binary}>" fi # @@ -175,10 +174,11 @@ done # Now try to run the binary # if [ ! -x "${binary}" ] ; then - err "$binary is missing or not executable.\n" \ + # this shouldn't happen + err "${binary} is missing or not executable.\n" \ "\tPlease try emerging the correct version of automake." fi -exec "$binary" "$@" +exec "${binary}" "$@" -err "was unable to exec $binary !?" +err "was unable to exec ${binary} !?" -- cgit v1.2.3-65-gdbad From 421d53d8d0dd0490d8544e73014c88542d6f8904 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 2 Jan 2013 07:40:09 +0000 Subject: Rewrite logic to be more friendly to missing versions #417745 by Toralf Förster. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Package-Manager: portage-2.2.0_alpha144/cvs/Linux x86_64 Manifest-Sign-Key: 0xFB7C4156 --- am-wrapper.sh | 139 ++++++++++++++++++++++++++++------------------------------ 1 file changed, 68 insertions(+), 71 deletions(-) diff --git a/am-wrapper.sh b/am-wrapper.sh index dd0920f..0e2311a 100755 --- a/am-wrapper.sh +++ b/am-wrapper.sh @@ -1,23 +1,25 @@ #!/bin/sh -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-7.sh,v 1.1 2012/04/26 05:42:10 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-8.sh,v 1.1 2013/01/02 07:40:04 vapier Exp $ -# Based on the am-wrapper.pl script provided by MandrakeSoft -# Rewritten in bash by Gregorio Guidi -# # Executes the correct automake version. # -# - defaults to newest version available (hopefully automake-1.12) -# - runs automake-1.X (where X is a valid automake version) if: -# - envvar WANT_AUTOMAKE is set to `1.X' -# -or- -# - `Makefile.in' was generated by automake-1.X -# -or- -# - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.X - -warn() { printf 'am-wrapper: %s: %b\n' "${argv0}" "$*" 1>&2; } -err() { warn "$@"; exit 1; } +# If WANT_AUTOMAKE is set (can be a whitespace delimited list of versions): +# - attempt to find an installed version using those +# - if magic keyword 'latest' is found, pick the latest version that exists +# - if nothing found, warn, and proceed as if WANT_AUTOMAKE was not set (below) +# If WANT_AUTOMAKE is not set: +# - Try to detect the version of automake used to generate things (look at +# Makefile.in and aclocal.m4 and any other useful file) +# - If detected version is not found, warn and proceed as if blank slate +# - Try to locate the latest version of automake that exists and run it + +(set -o posix) 2>/dev/null && set -o posix + +_stderr() { printf 'am-wrapper: %s: %b\n' "${argv0}" "$*" 1>&2; } +warn() { _stderr "warning: $*"; } +err() { _stderr "error: $*"; exit 1; } unset IFS which() { local p @@ -34,7 +36,7 @@ which() { # Sanitize argv[0] since it isn't always a full path #385201 # argv0=${0##*/} -case ${0} in +case $0 in ${argv0}) # find it in PATH if ! full_argv0=$(which "${argv0}") ; then @@ -47,10 +49,6 @@ case ${0} in ;; esac -if [ "${argv0}" = "am-wrapper.sh" ] ; then - err "Don't call this script directly" -fi - if ! seq 0 0 2>/dev/null 1>&2 ; then #338518 seq() { local f l i @@ -73,24 +71,49 @@ fi # Set up bindings between actual version and WANT_AUTOMAKE; # Start with last known versions to speed up lookup process. # -LAST_KNOWN_AUTOMAKE_VER="12" +LAST_KNOWN_AUTOMAKE_VER="13" vers=$(printf '1.%s ' `seq ${LAST_KNOWN_AUTOMAKE_VER} -1 4`) +# +# Helper to scan for a usable program based on version. +# +binary= +all_vers= find_binary() { local v - all_vers="${all_vers} $*" - for v in "$@" ; do + all_vers="${all_vers} $*" # For error messages. + for v ; do if [ -x "${full_argv0}-${v}" ] ; then binary="${full_argv0}-${v}" + binary_ver=${v} return 0 fi done return 1 } -binary="" -all_vers="" -if ! find_binary ${vers} ; then - find_binary $(printf '1.%s ' `seq 99 -1 ${LAST_KNOWN_AUTOMAKE_VER}`) + +# +# Try and find a usable automake version. First check the WANT_AUTOMAKE +# setting (whitespace delimited list), then fallback to the latest. +# +find_latest() { + if ! find_binary ${vers} ; then + # Brute force it. + find_binary $(printf '1.%s ' `seq 99 -1 ${LAST_KNOWN_AUTOMAKE_VER}`) + fi +} +for wx in ${WANT_AUTOMAKE:-latest} ; do + if [ "${wx}" = "latest" ] ; then + find_latest && break + else + find_binary ${wx} && break + fi +done + +if [ -z "${binary}" ] && [ -n "${WANT_AUTOMAKE}" ] ; then + warn "could not locate installed version for WANT_AUTOMAKE='${WANT_AUTOMAKE}'; ignoring" + unset WANT_AUTOMAKE + find_latest fi if [ -z "${binary}" ] ; then @@ -99,58 +122,38 @@ if [ -z "${binary}" ] ; then "\tWith a base name of '${full_argv0}'." fi -# -# Check the WANT_AUTOMAKE setting. We accept a whitespace delimited -# list of automake versions. -# -if [ -n "${WANT_AUTOMAKE}" ] ; then - for v in ${vers} x ; do - if [ "${v}" = "x" ] ; then - warn "warning: invalid WANT_AUTOMAKE '${WANT_AUTOMAKE}'; ignoring." - unset WANT_AUTOMAKE - break - fi - - for wx in ${WANT_AUTOMAKE} ; do - if [ "${wx}" = "${v}" ] ; then - binary="${full_argv0}-${v}" - v="x" - fi - done - [ "${v}" = "x" ] && break - done -fi - # # autodetect helpers # do_awk() { local file=$1 ; shift local arg=$1 ; shift - echo $(gawk "{ if (match(\$0, \"$*\", res)) { print res[${arg}]; exit } }" ${file}) + local v=$(awk "{ if (match(\$0, \"$*\", res)) { print res[${arg}]; exit } }" "${file}") + case " ${auto_vers} " in + *" ${v} "*) ;; + *) auto_vers="${auto_vers:+${auto_vers} }${v}" ;; + esac } # # autodetect routine # if [ -z "${WANT_AUTOMAKE}" ] ; then + auto_vers= if [ -r "Makefile.in" ] ; then - confversion_mf=$(do_awk Makefile.in 2 "^# Makefile.in generated (automatically )?by automake ([0-9].[0-9]+)") + do_awk Makefile.in 2 "^# Makefile.in generated (automatically )?by automake ([0-9].[0-9]+)" fi if [ -r "aclocal.m4" ] ; then - confversion_ac=$(do_awk aclocal.m4 1 'generated automatically by aclocal ([0-9].[0-9]+)') - confversion_am=$(do_awk aclocal.m4 1 '[[:space:]]*\\[?AM_AUTOMAKE_VERSION\\(\\[?([0-9].[0-9]+)[^)]*\\]?\\)') + do_awk aclocal.m4 1 'generated automatically by aclocal ([0-9].[0-9]+)' + do_awk aclocal.m4 1 '[[:space:]]*\\[?AM_AUTOMAKE_VERSION\\(\\[?([0-9].[0-9]+)[^)]*\\]?\\)' fi - - for v in ${vers} ; do - if [ "${confversion_mf}" = "${v}" ] || \ - [ "${confversion_ac}" = "${v}" ] || \ - [ "${confversion_am}" = "${v}" ] - then - binary="${full_argv0}-${v}" - break + # We don't need to set $binary here as it has already been setup for us + # earlier to the latest available version. + if [ -n "${auto_vers}" ] ; then + if ! find_binary ${auto_vers} ; then + warn "auto-detected versions not found (${auto_vers}); falling back to latest available" fi - done + fi fi if [ -n "${WANT_AMWRAPPER_DEBUG}" ] ; then @@ -163,12 +166,7 @@ fi # # for further consistency # -for v in ${vers} ; do - if [ "${binary}" = "${full_argv0}-${v}" ] ; then - export WANT_AUTOMAKE="${v}" - break - fi -done +export WANT_AUTOMAKE="${binary_ver}" # # Now try to run the binary @@ -176,9 +174,8 @@ done if [ ! -x "${binary}" ] ; then # this shouldn't happen err "${binary} is missing or not executable.\n" \ - "\tPlease try emerging the correct version of automake." + "\tPlease try installing the correct version of automake." fi exec "${binary}" "$@" - -err "was unable to exec ${binary} !?" +# The shell will error out if `exec` failed. -- cgit v1.2.3-65-gdbad From f281f622fcac1bed2d75aa2f2bbecc13c3afdad6 Mon Sep 17 00:00:00 2001 From: Alexis Ballier Date: Mon, 4 Feb 2013 14:00:31 +0000 Subject: Call gawk as before since GNU awk is required and breaks with e.g. BSD awk. Bug #455436 Package-Manager: portage-2.2.0_alpha161/cvs/Linux x86_64 Manifest-Sign-Key: 0x160F534A --- am-wrapper.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/am-wrapper.sh b/am-wrapper.sh index 0e2311a..1602316 100755 --- a/am-wrapper.sh +++ b/am-wrapper.sh @@ -1,7 +1,7 @@ #!/bin/sh # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-8.sh,v 1.1 2013/01/02 07:40:04 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-8.sh,v 1.2 2013/02/04 14:00:23 aballier Exp $ # Executes the correct automake version. # @@ -128,7 +128,7 @@ fi do_awk() { local file=$1 ; shift local arg=$1 ; shift - local v=$(awk "{ if (match(\$0, \"$*\", res)) { print res[${arg}]; exit } }" "${file}") + local v=$(gawk "{ if (match(\$0, \"$*\", res)) { print res[${arg}]; exit } }" "${file}") case " ${auto_vers} " in *" ${v} "*) ;; *) auto_vers="${auto_vers:+${auto_vers} }${v}" ;; -- cgit v1.2.3-65-gdbad From c423d970e28c396430d89ff60db024a1165690f5 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 23 Jun 2013 04:50:50 +0000 Subject: Version bump for automake-1.14. Package-Manager: portage-2.2.0_alpha179/cvs/Linux x86_64 Manifest-Sign-Key: 0xFB7C4156 --- am-wrapper.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/am-wrapper.sh b/am-wrapper.sh index 1602316..2645563 100755 --- a/am-wrapper.sh +++ b/am-wrapper.sh @@ -1,7 +1,7 @@ #!/bin/sh # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-8.sh,v 1.2 2013/02/04 14:00:23 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-9.sh,v 1.1 2013/06/23 04:50:40 vapier Exp $ # Executes the correct automake version. # @@ -71,7 +71,7 @@ fi # Set up bindings between actual version and WANT_AUTOMAKE; # Start with last known versions to speed up lookup process. # -LAST_KNOWN_AUTOMAKE_VER="13" +LAST_KNOWN_AUTOMAKE_VER="14" vers=$(printf '1.%s ' `seq ${LAST_KNOWN_AUTOMAKE_VER} -1 4`) # @@ -127,8 +127,14 @@ fi # do_awk() { local file=$1 ; shift - local arg=$1 ; shift - local v=$(gawk "{ if (match(\$0, \"$*\", res)) { print res[${arg}]; exit } }" "${file}") + local v=$(awk -v regex="$*" '{ + if (ret = match($0, regex)) { + s = substr($0, ret, RLENGTH) + ret = match(s, "[0-9]\\.[0-9]+") + print substr(s, ret, RLENGTH) + exit + } + }' "${file}") case " ${auto_vers} " in *" ${v} "*) ;; *) auto_vers="${auto_vers:+${auto_vers} }${v}" ;; @@ -141,11 +147,11 @@ do_awk() { if [ -z "${WANT_AUTOMAKE}" ] ; then auto_vers= if [ -r "Makefile.in" ] ; then - do_awk Makefile.in 2 "^# Makefile.in generated (automatically )?by automake ([0-9].[0-9]+)" + do_awk Makefile.in '^# Makefile.in generated (automatically )?by automake [0-9]\\.[0-9]+' fi if [ -r "aclocal.m4" ] ; then - do_awk aclocal.m4 1 'generated automatically by aclocal ([0-9].[0-9]+)' - do_awk aclocal.m4 1 '[[:space:]]*\\[?AM_AUTOMAKE_VERSION\\(\\[?([0-9].[0-9]+)[^)]*\\]?\\)' + do_awk aclocal.m4 'generated automatically by aclocal [0-9]\\.[0-9]+' + do_awk aclocal.m4 '[[:space:]]*\\[?AM_AUTOMAKE_VERSION\\(\\[?[0-9]\\.[0-9]+[^)]*\\]?\\)' fi # We don't need to set $binary here as it has already been setup for us # earlier to the latest available version. -- cgit v1.2.3-65-gdbad From 7659e950be380d55413787fa37a49a8f23d90168 Mon Sep 17 00:00:00 2001 From: Lars Wendler Date: Wed, 7 Jan 2015 21:24:42 +0000 Subject: Version bump for automake-1.15 Package-Manager: portage-2.2.15/cvs/Linux x86_64 Manifest-Sign-Key: 0x981CA6FC --- am-wrapper.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/am-wrapper.sh b/am-wrapper.sh index 2645563..84cdc4d 100755 --- a/am-wrapper.sh +++ b/am-wrapper.sh @@ -1,7 +1,7 @@ #!/bin/sh -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-9.sh,v 1.1 2013/06/23 04:50:40 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-10.sh,v 1.1 2015/01/07 21:24:41 polynomial-c Exp $ # Executes the correct automake version. # @@ -71,7 +71,7 @@ fi # Set up bindings between actual version and WANT_AUTOMAKE; # Start with last known versions to speed up lookup process. # -LAST_KNOWN_AUTOMAKE_VER="14" +LAST_KNOWN_AUTOMAKE_VER="15" vers=$(printf '1.%s ' `seq ${LAST_KNOWN_AUTOMAKE_VER} -1 4`) # -- cgit v1.2.3-65-gdbad From 5ec1b1036d0fd0f89f8e6ef6e5bdc62beacb54c9 Mon Sep 17 00:00:00 2001 From: Ulrich Müller Date: Tue, 28 Feb 2017 21:39:46 +0100 Subject: Drop remaining $Id$ and $Header$ from files. Bug: 611234 --- am-wrapper.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/am-wrapper.sh b/am-wrapper.sh index 84cdc4d..235474f 100755 --- a/am-wrapper.sh +++ b/am-wrapper.sh @@ -1,7 +1,6 @@ #!/bin/sh # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/automake-wrapper/files/am-wrapper-10.sh,v 1.1 2015/01/07 21:24:41 polynomial-c Exp $ # Executes the correct automake version. # -- cgit v1.2.3-65-gdbad From fb6d56f97a08a86e5ac559f0195e9f1fac7ee6c4 Mon Sep 17 00:00:00 2001 From: Thomas Deutschmann Date: Mon, 26 Feb 2018 18:48:37 +0100 Subject: sys-devel/automake-wrapper: Bump to v11 Add sys-devel/automake-1.16 support. Package-Manager: Portage-2.3.24, Repoman-2.3.6 --- am-wrapper.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/am-wrapper.sh b/am-wrapper.sh index 235474f..2907626 100755 --- a/am-wrapper.sh +++ b/am-wrapper.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # Executes the correct automake version. @@ -70,7 +70,7 @@ fi # Set up bindings between actual version and WANT_AUTOMAKE; # Start with last known versions to speed up lookup process. # -LAST_KNOWN_AUTOMAKE_VER="15" +LAST_KNOWN_AUTOMAKE_VER="16" vers=$(printf '1.%s ' `seq ${LAST_KNOWN_AUTOMAKE_VER} -1 4`) # -- cgit v1.2.3-65-gdbad