First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 66446
Alias:
Product:
Component:
Status: RESOLVED
Resolution: DUPLICATE of bug 68816
Assigned To: Gentoo's Team for Core System packages <base-system@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Vitaly <va@mail.ru>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
am-wrapper.pl.patch inlined patch is not beautiful, send it as attachment patch Vitaly 2004-10-05 11:50 0000 2.89 KB Details | Diff
am-wrapper.pl-1.8-v2.patch fixed patch, right automake version detection in configure.in or configure.ac now patch Vitaly 2004-10-05 23:54 0000 3.16 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 66446 depends on: Show dependency tree
Bug 66446 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-10-05 11:46 0000
This is the simplest patch for
/usr/portage/sys-devel/automake/files/am-wrapper.pl-1.8-v2



Reproducible: Always
Steps to Reproduce:
Run aclocal on project just now created, without aclocal.m4 and Makefile.in
files.

Actual Results:  
In this case aclocal will use old automake version 1.5

Expected Results:  
Even if I use AM_INIT_AUTOMAKE macro in configure.ac for specify automake
version as suggests automake documentation.

quote from gentoo-dev maling list
Hello Dear All

This patch is aimed to fix incorrect automake version detection,
in case when environment variable WANT_AUTOMAKE is not specified and when files
Makefile.in
and aclocal.m4 do not exit. It is a common situation when aclocal is executed
for the first time.
Automake documentation suggests a method how a project can specify its version
requirements:
a macro AM_INIT_AUTOMAKE([options]) should be placed in configure.in or
configure.ac.
For example:
AM_INIT_AUTOMAKE([1.8 gnu])

After applying our patch gentoo aclocal wrapper would first search automake
version requirements
in envvar WANT_AUTOMAKE, Makefile.in, aclocal.m4 and then in configure.in or
configure.ac.

/Best regards, Vitaly

patch:
[begin]
--- am-wrapper.pl.original      2004-10-05 17:24:33.497323688 +0400
+++ am-wrapper.pl       2004-10-05 17:34:36.671627256 +0400
@@ -22,8 +22,10 @@
 #     -or-
 #   - `Makefile.in' was generated by automake-1.8 or superior, which
 #     specifically needs automake-1.8
-#     -or_
+#     -or-
 #   - 'aclocal.m4' contain AM_AUTOMAKE_VERSION, specifying the use of 1.8
+#     -or-
+#   - configure.ac -or- configure.in contain AM_INIT_AUTOMAKE with required
version
 # - runs automake-1.7 if it exists and...
 #   - envvar WANT_AUTOMAKE is set to `1.7'
 #     -or-
@@ -66,13 +68,15 @@
        my $file = cat_(shift);
        return (@versions = $file =~
/^\s*\[?AM_AUTOMAKE_VERSION\(\[?([^\)]{3}[0-9]?)[^\)]*\]?\)/mg) ? ((sort
@versions)[-1]) : '';
 }
+sub am_version_2 {
+       my $file = cat_(shift);
+       return (@versions = $file =~
/^\s*\[?AM_INIT_AUTOMAKE\(\[?([^\)]{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";
@@ -101,14 +105,18 @@
        && (($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')) {
+           || am_version('aclocal.m4') ge '1.8'
+           || am_version_2('configure.ac') ge '1.8'
+           || am_version_2('configure.in') 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')) {
+           || am_version('aclocal.m4') ge '1.7'
+           || am_version_2('configure.ac') ge '1.7'
+           || am_version_2('configure.in') 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 ...
@@ -116,6 +124,8 @@
            || (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'
+           || am_version_2('configure.ac') ge '1.6'
+           || am_version_2('configure.in') 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'
[end]

------- Comment #1 From Vitaly 2004-10-05 11:50:59 0000 -------
Created an attachment (id=41165) [details]
inlined patch is not beautiful, send in as attachment

------- Comment #2 From Vitaly 2004-10-05 11:55:37 0000 -------
(From update of attachment 41165 [details])
Please aply to Gentoo Portage

------- Comment #3 From Gregorio Guidi (RETIRED) 2004-10-05 18:20:22 0000 -------
The patch assumes that the version is the first of the 
options passed to AM_INIT_AUTOMAKE, right?

What about simply using the most recent version as default for 
autoconf/automake? bug 66478 ;)

------- Comment #4 From Vitaly 2004-10-05 23:54:15 0000 -------
Created an attachment (id=41207) [details]
fixed patch, right automake version detection in configure.in or configure.ac
now

------- Comment #5 From Vitaly 2004-10-06 00:03:51 0000 -------
Using the most recent version as default for autoconf/automake is good idea,
but it may be wrong for very old projects. Ebuilds of that projects can fix
problem with using WANT_AUTO* environment variables.

------- Comment #6 From Vitaly 2004-10-25 05:31:53 0000 -------

*** This bug has been marked as a duplicate of 68816 ***

First Last Prev Next    No search results available      Search page      Enter new bug