autoconf-patches
[Top][All Lists]
Advanced

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

34-atconfig.patch


From: Akim Demaille
Subject: 34-atconfig.patch
Date: Mon, 20 Aug 2001 16:48:00 +0200

If I don't stop soon, I'm afraid Autotest might become usable, or even
pleasant to use!!!

There are still a few issues to clean up, but I have my own idea about
them...  For instance, I think AT_CONFIG should soon become

        AC_CONFIG_TESTDIR

or so.  What is not clear yet is that Autotest needs to run the
executables in the package, so it needs to be given the path to these
executables.  What I don't like is the src vs build issue: currently,
if you mean src executables, you need to explicitly pass, e.g.,
$top_srcdir/bin.  Puke puke puke.

I also think it is AC_CONFIG_TESTDIR that should AC_CONFIG_FILES the
Makefile or the dir.  Any problem with that (but the fact that again,
since Automake doesn't use the traces yet, it won't be able to
understand it has to ship it, just as the old days before it
understands AC_CONFIG_FILES)?

So I'm considering doing just as in config.status: the path dir1:dir2
given to AT_CONFIG is expanded into
builddir1:srcdir1:builddir2:srcdir2 etc.  Does someone see a problem
with that approach?


Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * lib/autoconf/general.m4 (_AC_OUTPUT_COMMANDS): Say what you do.
        * m4/atconfig.m4 (AT_CONFIG): $1 is now the directory where the
        test suite lives.
        Create `atconfig' automagically.
        Configure atlocal.in if present.
        * tests/atconfig.in: Remove.
        * tests/atlocal.in: New.
        * tests/Makefile.am: Adjust.

Index: configure.ac
--- configure.ac Tue, 14 Aug 2001 01:47:02 +0200 akim
+++ configure.ac Sun, 19 Aug 2001 12:48:13 +0200 akim
@@ -26,7 +26,7 @@
 AM_INIT_AUTOMAKE(autoconf, 2.52c)

 # Initialize the test suite.
-AT_CONFIG(../bin)
+AT_CONFIG(tests, ../bin)
 AC_PATH_PROG(EXPR, expr)

 # We use a path for GNU m4 so even if users have another m4 first in
@@ -68,7 +68,7 @@
                 lib/m4sugar/Makefile
                 lib/autoconf/Makefile lib/autotest/Makefile
                 bin/Makefile
-                tests/Makefile tests/atconfig)
+                tests/Makefile)

 AC_OUTPUT
 # Report the state of this version of Autoconf if this is a beta.
Index: lib/autoconf/general.m4
--- lib/autoconf/general.m4 Sun, 19 Aug 2001 12:28:04 +0200 akim
+++ lib/autoconf/general.m4 Sun, 19 Aug 2001 12:37:17 +0200 akim
@@ -4343,10 +4343,7 @@ m4_define([_AC_OUTPUT_COMMANDS],
   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
   ac_source=`echo "$ac_file" | sed 's,[[^:]]*:,,'`

-dnl FIXME: Until Automake uses the new features of config.status, we
-dnl should keep this silent.  Otherwise, because Automake runs this in
-dnl each directory, it quickly becomes annoying.
-dnl  echo "executing commands of $ac_dest"
+  AC_MSG_NOTICE([executing $ac_dest commands])
   case $ac_dest in
 AC_LIST_COMMANDS_COMMANDS()dnl
   esac
Index: m4/atconfig.m4
--- m4/atconfig.m4 Tue, 14 Aug 2001 01:47:02 +0200 akim
+++ m4/atconfig.m4 Sun, 19 Aug 2001 12:46:06 +0200 akim
@@ -2,7 +2,7 @@
 ## Prepare for testing.  ##
 ## ----------------------##

-#serial 4
+#serial 5

 # Copyright 2000, 2001 Free Software Foundation, Inc.
 #
@@ -21,8 +21,8 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 # 02111-1307, USA.

-# AT_CONFIG([AUTOTEST-PATH = .])
-# ------------------------------
+# AT_CONFIG(TEST-DIRECTORY, [AUTOTEST-PATH = .])
+# ----------------------------------------------
 # Configure the test suite.
 #
 # AUTOTEST-PATH must help the test suite to find the executables, i.e.,
@@ -30,4 +30,43 @@
 # pass `../src'.  If there are also executables in the source tree, use
 # `../src:$top_srcdir/src'.
 AC_DEFUN([AT_CONFIG],
-[AC_SUBST([AUTOTEST_PATH], [m4_default([$1], [.])])])
+[AC_CONFIG_COMMANDS([$1/atconfig],
+[cat >$1/atconfig <<EOF
+# Configurable variable values for building test suites.
+# Generated by $[0]
+# Copyright 2000, 2001 Free Software Foundation, Inc.
+
+at_package='$at_package'
+at_version='$at_version'
+at_bugreport='$at_bugreport'
+
+at_n='$at_n'
+at_c='$at_c'
+
+srcdir='$srcdir'
+top_srcdir='$top_srcdir'
+AUTOTEST_PATH='m4_default([$2], [.])'
+
+SHELL=\${CONFIG_SHELL-'$at_shell'}
+PATH_SEPARATOR='$at_path_separator'
+
+EOF
+],
+[at_package='$PACKAGE_NAME'
+at_version='$PACKAGE_VERSION'
+at_bugreport='$PACKAGE_BUGREPORT'
+
+at_n='$ECHO_N'
+at_c='$ECHO_C'
+
+srcdir='$srcdir'
+top_srcdir='$top_srcdir'
+
+at_shell='$SHELL'
+at_path_separator='$PATH_SEPARATOR'
+])
+
+if test -f $srcdir/$1/atlocal.in; then
+  AC_CONFIG_FILES([$1/atlocal])
+fi
+])# AT_CONFIG
Index: tests/Makefile.am
--- tests/Makefile.am Wed, 15 Aug 2001 18:25:22 +0200 akim
+++ tests/Makefile.am Sun, 19 Aug 2001 12:47:55 +0200 akim
@@ -35,7 +35,7 @@
              atspecific.m4 aclocal.m4 \
              $(SUITE) mktests.sh

-check-local: atconfig testsuite
+check-local: atconfig atlocal testsuite
        $(SHELL) testsuite

 AUTOM4TE = autom4te_perllibdir='$(top_srcdir)/lib' ../bin/autom4te
@@ -96,7 +96,7 @@ actypes.at: mktests.sh $(MACRO_FILES)
        expr                                    \
        libtool ltconfig ltmain.sh

-DISTCLEANFILES = atconfig testsuite testsuite.log
+DISTCLEANFILES = atconfig atlocal testsuite testsuite.log


 ## ------------------ ##
Index: tests/atlocal.in
--- 0.694/tests/atlocal.in Sun, 19 Aug 2001 12:53:57 +0200 akim ()
+++ tests/atlocal.in Sun, 19 Aug 2001 12:46:37 +0200 akim
@@ -0,0 +1,16 @@
+# -*- shell-script -*-
+# @configure_input@
+# Configurable variable values for building test suites.
+# Copyright 2000, 2001 Free Software Foundation, Inc.
+
+# We need GNU m4, and Perl.
+M4='@M4@'
+PERL='@PERL@'
+
+# Be sure to use the non installed Perl modules.
+# We need no special protection for the subtools (e.g., autoheader runs
+# autoconf which runs autom4te) because by themselves, they try to use
+# subtools from the same directory (i.e., foo/autoheader will run
+# foo/autoconf etc.).
+autom4te_perllibdir=$top_srcdir/lib
+export autom4te_perllibdir
Index: tests/atconfig.in
--- tests/atconfig.in Sun, 29 Jul 2001 09:44:07 +0200 akim
+++ 0.694(w)/tests/atconfig.in Sun, 19 Aug 2001 12:53:57 +0200 akim ()
@@ -1,76 +0,0 @@
-# -*- shell-script -*-
-# @configure_input@
-# Configurable variable values for building test suites.
-# Copyright 2000, 2001 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.
-
-# This script is part of Autotest.  Unlimited permission to copy,
-# distribute and modify the testing scripts that are the output of
-# that Autotest script is given.  You need not follow the terms of the
-# GNU General Public License when using or distributing such scripts,
-# even though portions of the text of Autotest appear in them.  The
-# GNU General Public License (GPL) does govern all other use of the
-# material that constitutes the Autotest.
-#
-# Certain portions of the Autotest source text are designed to be
-# copied (in certain cases, depending on the input) into the output of
-# Autotest.  We call these the "data" portions.  The rest of the
-# Autotest source text consists of comments plus executable code that
-# decides which of the data portions to output in any given case.  We
-# call these comments and executable code the "non-data" portions.
-# Autotest never copies any of the non-data portions into its output.
-#
-# This special exception to the GPL applies to versions of Autotest
-# released by the Free Software Foundation.  When you make and
-# distribute a modified version of Autotest, you may extend this
-# special exception to the GPL to apply to your modified version as
-# well, *unless* your modified version has the potential to copy into
-# its output some of the text that was the non-data portion of the
-# version that you started with.  (In other words, unless your change
-# moves or copies text from the non-data portions to the data
-# portions.)  If your modification has such potential, you must delete
-# any notice of this special exception to the GPL from your modified
-# version.
-
-# This debugging script has been automatically generated from `make check'.
-# Call it with `--help' to get a quick usage summary.
-
-at_package='@PACKAGE_NAME@'
-at_version='@PACKAGE_VERSION@'
-at_bugreport='@PACKAGE_BUGREPORT@'
-
-at_n='@ECHO_N@'
-at_c='@ECHO_C@'
-
-srcdir='@srcdir@'
-top_srcdir='@top_srcdir@'
-AUTOTEST_PATH='@AUTOTEST_PATH@'
-
-SHELL=${CONFIG_SHELL-'@SHELL@'}
-PATH_SEPARATOR='@PATH_SEPARATOR@'
-
-# We need GNU m4, and Perl.
-M4='@M4@'
-PERL='@PERL@'
-
-# Be sure to use the non installed Perl modules.
-# We need no special protection for the subtools (e.g., autoheader runs
-# autoconf which runs autom4te) because by themselves, they try to use
-# subtools from the same directory (i.e., foo/autoheader will run
-# foo/autoconf etc.).
-autom4te_perllibdir=$top_srcdir/lib
-export autom4te_perllibdir
Index: tests/Makefile.am
--- tests/Makefile.am Sun, 19 Aug 2001 13:08:48 +0200 akim
+++ tests/Makefile.am Sun, 19 Aug 2001 13:15:55 +0200 akim
@@ -31,9 +31,10 @@

 # We don't actually distribute the testsuite, since one only
 # needs m4 to build it, m4 being required anyway to install Autoconf.
+# atlocal.in is to be listed, since Automake doesn't see it...
 EXTRA_DIST = README \
              atspecific.m4 aclocal.m4 \
-             $(SUITE) mktests.sh
+             atlocal.in $(SUITE) mktests.sh

 check-local: atconfig atlocal testsuite
        $(SHELL) testsuite



reply via email to

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