[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: autoreconf no longer works outside the current directory
From: |
Ralf Wildenhues |
Subject: |
Re: autoreconf no longer works outside the current directory |
Date: |
Tue, 16 May 2006 12:56:27 +0200 |
User-agent: |
Mutt/1.5.11 |
Hi Olly, all,
* Olly Betts wrote on Tue, May 16, 2006 at 07:45:38AM CEST:
> autoreconf is documented to work outside the current directory, and used
> to in autoconf 2.59. The patch below fixes that.
Confirmed. Thanks very much for the bug report!
> To reproduce, pick any autoconf-ed project, change to the directory
> above and run "autoreconf PROJECTDIRECTORY".
>
> I also notice a worrying mismatch between the comment and the code just
> above the patched location:
>
> # Autoreconf all the given configure.ac. A while loop, not a for,
> # since the list can change at runtime because of AC_CONFIG_SUBDIRS.
> for my $directory (@ARGV)
Yep. While looking into this, I found another couple of bugs: with
`configure.in' instead of `configure.ac', your patch wasn't sufficient.
The other issue is somewhat larger: autoreconf claims to also accept a
file name instead of a directory, using that instead of `configure.ac'.
Fixing this right will be somewhat more intrusive, but AFAICS that was
already broken in 2.59; and given the limited usefulness, I'm not sure
whether we should rather instead fix the documentation to not mention
this possibility? After all, both aclocal and automake (at least) won't
pick up the renamed file.
While working on this, I again forgot to note which files are imported
from Automake. So I propose the following two patches against Automake
and Autoconf, respectively, to make me not forget again, fix Olly's bug,
my followup bug, and add testsuite exposure to both packages.
OK?
Cheers,
Ralf
Automake:
* lib/Autom4te/Configure_ac.pm (find_configure_ac): Use
`$configure_in' instead of `configure.in', to preserve
directory component.
* lib/Automake/Configure_ac.pm: Add note that Automake owns
this file.
* lib/Automake/Channels.pm: Likewise.
* lib/Automake/FileUtils.pm: Likewise.
* lib/Automake/Struct.pm: Likewise.
Index: lib/Automake/Configure_ac.pm
===================================================================
RCS file: /cvs/automake/automake/lib/Automake/Configure_ac.pm,v
retrieving revision 1.6
diff -u -r1.6 Configure_ac.pm
--- lib/Automake/Configure_ac.pm 14 May 2005 20:28:51 -0000 1.6
+++ lib/Automake/Configure_ac.pm 16 May 2006 08:20:51 -0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,6 +15,11 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
+###############################################################
+# The main copy of this file is in Automake's CVS repository. #
+# Updates should be sent to address@hidden #
+###############################################################
+
package Automake::Configure_ac;
use strict;
@@ -67,7 +72,7 @@
}
return $configure_ac
}
- elsif (-f 'configure.in')
+ elsif (-f $configure_in)
{
return $configure_in;
}
Index: lib/Automake/Channels.pm
===================================================================
RCS file: /cvs/automake/automake/lib/Automake/Channels.pm,v
retrieving revision 1.12
diff -u -r1.12 Channels.pm
--- lib/Automake/Channels.pm 13 May 2006 09:28:36 -0000 1.12
+++ lib/Automake/Channels.pm 16 May 2006 08:20:51 -0000
@@ -15,6 +15,11 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
+###############################################################
+# The main copy of this file is in Automake's CVS repository. #
+# Updates should be sent to address@hidden #
+###############################################################
+
package Automake::Channels;
=head1 NAME
Index: lib/Automake/FileUtils.pm
===================================================================
RCS file: /cvs/automake/automake/lib/Automake/FileUtils.pm,v
retrieving revision 1.9
diff -u -r1.9 FileUtils.pm
--- lib/Automake/FileUtils.pm 17 Apr 2006 12:14:07 -0000 1.9
+++ lib/Automake/FileUtils.pm 16 May 2006 08:20:51 -0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,6 +15,11 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
+###############################################################
+# The main copy of this file is in Automake's CVS repository. #
+# Updates should be sent to address@hidden #
+###############################################################
+
package Automake::FileUtils;
=head1 NAME
Index: lib/Automake/Struct.pm
===================================================================
RCS file: /cvs/automake/automake/lib/Automake/Struct.pm,v
retrieving revision 1.4
diff -u -r1.4 Struct.pm
--- lib/Automake/Struct.pm 14 May 2005 20:28:51 -0000 1.4
+++ lib/Automake/Struct.pm 16 May 2006 08:20:51 -0000
@@ -1,5 +1,5 @@
# autoconf -- create `configure' using m4 macros
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,6 +22,11 @@
# if we `use' a Perl module (e.g., File::stat) that uses Class::Struct,
# we would have two packages defining the same symbols. Boom.
+###############################################################
+# The main copy of this file is in Automake's CVS repository. #
+# Updates should be sent to address@hidden #
+###############################################################
+
package Automake::Struct;
## See POD after __END__
Autoconf:
2006-05-16 Olly Betts <address@hidden> (tiny change)
and Ralf Wildenhues <address@hidden>
* bin/autoreconf.in: Pass the directory argument to
`require_configure_ac'. Fix comment.
* tests/torture.at (Configuring subdirectories): Expose this.
[patch not shown for:]
* lib/Automake/Configure_ac.pm, lib/Automake/Channels.pm,
lib/Automake/FileUtils.pm, lib/Automake/Struct.pm: Sync from
Automake as follows:
* lib/Autom4te/Configure_ac.pm (find_configure_ac): Use
`$configure_in' instead of `configure.in', to preserve
directory component.
Index: bin/autoreconf.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/bin/autoreconf.in,v
retrieving revision 1.131
diff -u -r1.131 autoreconf.in
--- bin/autoreconf.in 5 Apr 2006 20:54:17 -0000 1.131
+++ bin/autoreconf.in 16 May 2006 06:40:14 -0000
@@ -664,11 +664,11 @@
$ENV{'TMPDIR'} = $tmp;
parse_args;
-# Autoreconf all the given configure.ac. A while loop, not a for,
-# since the list can change at runtime because of AC_CONFIG_SUBDIRS.
+# Autoreconf all the given configure.ac. Unless `--no-recursive' is passed,
+# AC_CONFIG_SUBDIRS will be traversed in &autoreconf_current_directory.
for my $directory (@ARGV)
{
- require_configure_ac;
+ require_configure_ac ($directory);
autoreconf ($directory);
}
Index: lib/Autom4te/Configure_ac.pm
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/Autom4te/Configure_ac.pm,v
retrieving revision 1.6
diff -u -r1.6 Configure_ac.pm
--- lib/Autom4te/Configure_ac.pm 14 May 2005 07:00:39 -0000 1.6
+++ lib/Autom4te/Configure_ac.pm 16 May 2006 06:40:14 -0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -67,7 +67,7 @@
}
return $configure_ac
}
- elsif (-f 'configure.in')
+ elsif (-f $configure_in)
{
return $configure_in;
}
Index: tests/torture.at
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/torture.at,v
retrieving revision 1.61
diff -u -r1.61 torture.at
--- tests/torture.at 9 May 2006 21:25:42 -0000 1.61
+++ tests/torture.at 16 May 2006 07:49:57 -0000
@@ -853,6 +853,14 @@
prefix=/good
])
+# Make sure we can run autoreconf on a subdirectory
+rm -f configure configure.in
+AT_CHECK([autoreconf inner], [], [], [ignore])
+
+# Make sure we can pass a configure.ac name
+AT_CHECK([cd inner && autoreconf configure.in], [], [], [ignore])
+AT_CHECK([autoreconf inner/configure.in], [], [], [ignore])
+
AT_CLEANUP