bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

autoscan should not descend AC_CONFIG_SUBDIRS


From: Ralf Wildenhues
Subject: autoscan should not descend AC_CONFIG_SUBDIRS
Date: Thu, 21 Apr 2005 09:58:20 +0200
User-agent: Mutt/1.4.1i

A recent bugreport against Libtool's libltdl[1] uncovered a flaw in
autoscan: I don't think autoscan should descend into subpackages.
It may do so, but should then start over and create configure.scan for
that subpackage.

Situation above: Running autoscan on a package that has libltdl
installed will end up with libltdl/Makefile in toplevel AC_CONFIG_FILES.
This may seem reasonable for the user, but leads to weird error
messages.  Please see the thread for more info.

Unfortunately, I am not in the position to suggest a fix ATM.
I have provided a test case, though, see the patch below.

Credits go to Gideon Go for reporting this bug.
Please Cc me on replies, I am not subscribed to bug-autoconf.

Regards,
Ralf

[1] http://lists.gnu.org/archive/html/bug-libtool/2005-04/msg00134.html
and following thread.


        * tests/autoscan.at: New test, check autoscan descend into subpackages.
        * tests/Makefile.am, tests/suite.at: Use.

--- /dev/null   2005-04-20 12:19:39.420719856 +0200
+++ tests/autoscan.at   2005-04-21 09:52:31.000000000 +0200
@@ -0,0 +1,49 @@
+#                                                      -*- Autotest -*-
+
+AT_BANNER([Autoscan.])
+
+# Copyright (C) 2005 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AT_SETUP([autoscan])
+
+AT_DATA([Makefile.am],
+[[SUBDIRS = subpkg
+]])
+
+AT_DATA([configure.ac],
+[[AC_INIT
+AC_PREREQ(2.59)
+AM_INIT_AUTOMAKE(foreign)
+AC_CONFIG_SUBDIRS(subpkg)
+AC_CONFIG_FILES(Makefile)
+AC_OUTPUT
+]])
+
+mkdir subpkg
+
+AT_DATA([subpkg/Makefile.am], [])
+AT_DATA([subpkg/configure.ac],
+[[AC_INIT
+AM_INIT_AUTOMAKE(foreign)
+AC_CONFIG_FILES(Makefile)
+AC_OUTPUT
+]])
+AT_CHECK([autoscan])
+AT_CHECK([grep subpkg/Makefile configure.scan], [1], [], [ignore])
+
+AT_CLEANUP
Index: tests/Makefile.am
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/Makefile.am,v
retrieving revision 1.92
diff -u -r1.92 Makefile.am
--- tests/Makefile.am   23 Mar 2005 01:02:04 -0000      1.92
+++ tests/Makefile.am   21 Apr 2005 07:57:00 -0000
@@ -92,6 +92,7 @@
        base.at tools.at torture.at \
        compile.at c.at fortran.at \
        semantics.at \
+       autoscan.at \
        foreign.at
 
 TESTSUITE_AT = $(TESTSUITE_GENERATED_AT) $(TESTSUITE_HAND_AT)
Index: tests/suite.at
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/suite.at,v
retrieving revision 1.30
diff -u -r1.30 suite.at
--- tests/suite.at      10 Dec 2004 07:08:52 -0000      1.30
+++ tests/suite.at      21 Apr 2005 07:57:00 -0000
@@ -72,3 +72,6 @@
 
 # Compatibility with foreign tools.
 m4_include([foreign.at])
+
+# Autoscan test
+m4_include([autoscan.at])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]