autoconf-patches
[Top][All Lists]
Advanced

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

60-fyi-wrappers.patch


From: Akim Demaille
Subject: 60-fyi-wrappers.patch
Date: Fri, 31 Aug 2001 15:30:09 +0200

Just in case you didn't notice, I am working currently on improving
the quality of testing.

My thinking/research led me to consider that a major error in most
test suite is that they solely test non installed executables.  Today
I would say we are testing real world features in laboratory
conditions, therefore drawing generic conclusions from completely
articial and prophylactic experimentations.

A test suite *must not know it is testing an uninstalled executable*.
It must run an executable, period.  Let PATH chose between the non
installed/installed version.

The ultimate goal is Automake's installcheck, i.e., running the
testsuite on an installed Autoconf.

I've performed the conversion of Bison's and M4's test suites.
Autoconf is much more delicate, but all rely on a single idea:
wrappers around non installed executables which are the only place
where black spells are cast.

This is a first stab.  If you run the test suite *now* (before the
hopefully following patches, if I don't die in between) it sure will
fail.  The main reason is that sometimes we need files from src,
sometimes from build.

I plan to get rid of all the --autoconf-dir, --localdir etc.  After
all, if you just step back, all these guys are referring to a single
thing: finding files.  Heck, but then there is a very common option
for this kind of things: -I/--include, in almost *all the GNU
programs*.  So let's get standard.

I'm not addressing this now, because check is OK, but only distcheck
fails.  That's a good step to stop at before the patch gets even
bigger.

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * configure.ac: Also find tested executables in bin.
        * bin/autoconf.in, bin/autoheader.in, bin/autoreconf.in,
        * bin/autoscan.in, autoupdate.in: Use exclusively the name of the
        installed peer executables, only PATH is allowed to resolve it.
        Pass `autoconf_dir' via options, not via invisible envvars.
        * lib/Autom4te/General.pm (&find_peer): Remove.
        * lib/autotest/general.m4 (AT_INIT): `AUTOTEST_PATH=a:b' gives
        `abuild:asrc:bbuild:bsrc', not `abuild:bbuild:asrc:bsrc'.
        * man/Makefile.am: Let help2man rely on PATH instead of trying to
        find the executables for it.
        * tests/Makefile.am: Major cleanup.  Too lazy to document...
        * tests/atlocal.in: Remove all the obscure envvar manipulations.
        We only need PERL.
        * tests/atspecific.m4, tests/tools.at: Passing --localdir is
        indeed related to running the test suite, while passing
        --autoconf-dir and others is related to running non installed
        Autoconf executables.  So don't do that, leave it to...
        * tests/autoconf, tests/autoheader, tests/autom4te, tests/autoupdate,
        * tests/autoscan: New.
        * tests/atspecific.m4 (AT_CHECK_M4SUGAR, AT_CHECK_M4SH): Don't
        refer to library files: rely on --language.

Index: configure.ac
--- configure.ac Fri, 24 Aug 2001 19:05:25 +0200 akim
+++ configure.ac Thu, 30 Aug 2001 18:46:58 +0200 akim
@@ -28,7 +28,9 @@
 AM_INIT_AUTOMAKE(autoconf, 2.52c)

 # Initialize the test suite.
-AC_CONFIG_TESTDIR(tests, bin)
+# Some of our bins are location independant, e.g., ifnames.
+# We don't need wrappers for them.
+AC_CONFIG_TESTDIR(tests, tests:bin)
 AC_PATH_PROG(EXPR, expr)

 # We use a path for GNU m4 so even if users have another m4 first in
Index: bin/autoconf.in
--- bin/autoconf.in Tue, 28 Aug 2001 07:50:45 +0200 akim
+++ bin/autoconf.in Thu, 30 Aug 2001 19:50:10 +0200 akim
@@ -86,6 +86,7 @@ Tracing:

 # Variables.
 : address@hidden@}}
+: address@hidden@}
 debug=false
 force=false
 dir=`echo "$0" | sed -e 's,[^\\/]*$,,'`
@@ -97,16 +98,6 @@ Tracing:
 status=0
 verbose=:

-# We test "$dir/autom4te" in case we are in the build tree, in which case
-# the names are not transformed yet.
-for autom4te in "$AUTOM4TE" \
-                "$dir/@autom4te-name@" \
-                "$dir/autom4te" \
-                "@bindir@/@autom4te-name@"; do
-  test -f "$autom4te" && break
-done
-
-
 # Parse command line.
 while test $# -gt 0 ; do
   optarg=`expr "x$1" : 'x--[^=]*=\(.*\)' \| \
@@ -223,17 +214,13 @@ Tracing:
 # Unless specified, the output is stdout.
 test -z "$outfile" && outfile=-

-# Propagate -A.
-if test -n "$autoconf_dir"; then
-  export AC_MACRODIR=$autoconf_dir
-fi
-
 # Running autom4te.
-run_autom4te="$autom4te "\
+run_autom4te="$AUTOM4TE "\
 `$verbose "--verbose "`\
 `$debug && echo "--debug "`\
 `$force && echo "--force "`\
 "--language=autoconf "\
+"--include=$autoconf_dir "\
 "--include=$localdir "\
 `test -n "$warnings" && echo "--warning=$warnings "`\
 "--output=$outfile "\
Index: bin/autoheader.in
--- bin/autoheader.in Sat, 04 Aug 2001 19:23:09 +0200 akim
+++ bin/autoheader.in Thu, 30 Aug 2001 19:50:52 +0200 akim
@@ -79,15 +79,8 @@ Usage: $0 [OPTION] ... [TEMPLATE-FILE]

 # Variables.
 : address@hidden@}}
+: address@hidden@}
 dir=`echo "$0" | sed -e 's,[^/]*$,,'`
-# We test "$dir/autoconf" in case we are in the build tree, in which case
-# the names are not transformed yet.
-for autoconf in "$AUTOCONF" \
-                "$dir/@autoconf-name@" \
-                "$dir/autoconf" \
-                "@bindir@/@autoconf-name@"; do
-  test -f "$autoconf" && break
-done
 debug=false
 localdir=.
 force=false
@@ -260,10 +253,9 @@ Usage: $0 [OPTION] ... [TEMPLATE-FILE]
 esac

 # Set up autoconf.
-autoconf="$autoconf -l $localdir "\
+autoconf="$AUTOCONF -A $autoconf_dir -l $localdir "\
 `$verbose "--verbose "`\
 `$debug && echo "--debug "`
-export autoconf_dir

 # ----------------------- #
 # Real work starts here.  #
Index: bin/autoreconf.in
--- bin/autoreconf.in Sat, 04 Aug 2001 19:23:09 +0200 akim
+++ bin/autoreconf.in Thu, 30 Aug 2001 19:54:19 +0200 akim
@@ -1,7 +1,7 @@
 #! @SHELL@
 # -*- shell-script -*-
 # autoreconf - remake all Autoconf configure scripts in a directory tree
-# Copyright 1994, 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1994, 1999, 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
@@ -91,6 +91,13 @@ Usage: $0 [OPTION] ... [TEMPLATE-FILE]

 # Variables.
 : address@hidden@}}
+: address@hidden@}
+: address@hidden@}
+# Looking for automake.
+: ${AUTOMAKE=automake}
+# Looking for aclocal.
+: ${ACLOCAL=aclocal}
+
 debug=false
 dir=`echo "$0" | sed -e 's,[^\\/]*$,,'`
 force=false
@@ -104,28 +111,6 @@ Usage: $0 [OPTION] ... [TEMPLATE-FILE]
 symlink=false
 verbose=:

-# Looking for autoconf.
-# We test "$dir/autoconf" in case we are in the build tree, in which case
-# the names are not transformed yet.
-for autoconf in "$AUTOCONF" \
-                "$dir/@autoconf-name@" \
-                "$dir/autoconf" \
-                "@bindir@/@autoconf-name@"; do
-  test -f "$autoconf" && break
-done
-
-# Looking for autoheader.
-for autoheader in "$AUTOHEADER" \
-                  "$dir/@autoheader-name@" \
-                  "$dir/autoheader" \
-                  "@bindir@/@autoheader-name@"; do
-  test -f "$autoheader" && break
-done
-# Looking for automake.
-: ${automake=${AUTOMAKE=automake}}
-# Looking for aclocal.
-: ${aclocal=${ACLOCAL=aclocal}}
-
 # Parse command line.
 while test $# -gt 0; do
   optarg=`expr "x$1" : 'x--[^=]*=\(.*\)' \| \
@@ -189,7 +174,7 @@ Usage: $0 [OPTION] ... [TEMPLATE-FILE]

      # Options of Automake.
      --cygnus | --foreign | --gnits | --gnu | --include-deps | -i )
-       automake="$automake $1"; shift ;;
+       AUTOMAKE="$AUTOMAKE $1"; shift ;;

      -- )     # Stop option processing.
        shift; break ;;
@@ -213,22 +198,22 @@ Usage: $0 [OPTION] ... [TEMPLATE-FILE]

 # If verbose, say what you are going to use.
 if test $verbose = echo; then
-  $autoconf --version |
+  $AUTOCONF --version |
     sed "s,.*)\(.*\)$,$me: using autoconf\1: $autoconf,;1q" >&2
-  $autoheader --version |
+  $AUTOHEADER --version |
     sed "s,.*)\(.*\)$,$me: using autoheader\1: $autoheader,;1q" >&2
-  $automake --version |
+  $AUTOMAKE --version |
     sed "s,.*)\(.*\)$,$me: using automake\1: $automake,;1q" >&2
-  $aclocal --version |
+  $ACLOCAL --version |
     sed "s,.*)\(.*\)$,$me: using aclocal\1: $aclocal,;1q" >&2
 fi

 # Dispatch autoreconf's option to the tools.
 # --localdir
-autoconf="$autoconf -l $localdir"
-autoheader="$autoheader -l $localdir"
+autoconf="$AUTOCONF -A $autoconf_dir -l $localdir"
+autoheader="$AUTOHEADER -A $autoconf_dir -l $localdir"
 # --force
-$force || automake="$automake --no-force"
+$force || AUTOMAKE="$AUTOMAKE --no-force"
 $force &&
 {
   autoconf="$autoconf --force"
@@ -238,15 +223,13 @@ Usage: $0 [OPTION] ... [TEMPLATE-FILE]
 autoconf="$autoconf `$verbose --verbose`"
 autoheader="$autoheader `$verbose --verbose`"
 automake="$automake `$verbose --verbose`"
-aclocal="$aclocal `$verbose --verbose`"
+aclocal="$ACLOCAL `$verbose --verbose`"
 # --debug
 $debug &&
 {
   autoconf="$autoconf --debug"
   autoheader="$autoheader --debug"
 }
-# --macrodir
-export autoconf_dir
 # --install and --symlink
 if $install; then
   automake="$automake --add-missing `$symlink || echo --copy`"
Index: bin/autoscan.in
--- bin/autoscan.in Fri, 03 Aug 2001 20:59:48 +0200 akim
+++ bin/autoscan.in Thu, 30 Aug 2001 19:49:24 +0200 akim
@@ -71,7 +71,7 @@
   or die "$me: cannot open $me.log: $!\n";

 # Autoconf and lib files.
-my $autoconf = find_peer ('autoconf', "@bindir@", 'autoconf-name');
+my $autoconf = $ENV{'AUTOCONF'} || '@autoconf_name@';
 my $datadir = $ENV{"AC_MACRODIR"} || "@datadir@";


Index: bin/autoupdate.in
--- bin/autoupdate.in Thu, 23 Aug 2001 23:06:00 +0200 akim
+++ bin/autoupdate.in Thu, 30 Aug 2001 19:59:03 +0200 akim
@@ -37,7 +37,7 @@

 # Lib files.
 my $autoconf_dir = $ENV{"AC_MACRODIR"} || "@datadir@";
-my $autoconf = find_peer ('autoconf', "@bindir@", 'autoconf-name');
+my $autoconf = $ENV{'AUTOCONF'} || '@autoconf-name@';
 my $localdir = '.';
 # m4.
 my $m4 = $ENV{"M4"} || "@M4@";
Index: lib/Autom4te/General.pm
--- lib/Autom4te/General.pm Fri, 03 Aug 2001 20:59:48 +0200 akim
+++ lib/Autom4te/General.pm Thu, 30 Aug 2001 19:49:37 +0200 akim
@@ -28,7 +28,7 @@
 use vars qw (@ISA @EXPORT);

 @ISA = qw (Exporter);
address@hidden = qw (&find_configure_ac &find_peer &mktmpdir &mtime
address@hidden = qw (&find_configure_ac &mktmpdir &mtime
               &uniq &verbose &xsystem
              $me $verbose $debug $tmp);

@@ -101,44 +101,6 @@ sub find_configure_ac ()
       return 'configure.in';
     }
   return;
-}
-
-
-# $PEER_PATH
-# find_peer($PEER, $BINDIR, $PEER-NAME)
-# -------------------------------------
-# Look for $PEER executables: autoconf, autoheader etc.
-# $BINDIR is @bindir@, and $PEER-NAME the transformed peer name
-# (when configured with --transform-program-names etc.).
-# We could have it AC_SUBST'ed in here, but it then means General.pm
-# is in builddir, hence more paths to adjust etc.  Yick.
-sub find_peer ($$$)
-{
-  my ($peer, $bindir, $peer_name) = @_;
-  my $res = undef;
-  my $PEER = uc $peer;
-  my $dir = dirname ($0);
-
-  # We test "$dir/autoconf" in case we are in the build tree, in which case
-  # the names are not transformed yet.
-  foreach my $file ($ENV{"$PEER"} || '',
-                   "$dir/$peer_name",
-                   "$dir/$peer",
-                   "$bindir/$peer_name")
-    {
-      # FIXME: This prevents passing options...  Maybe run --version?
-      if (-x $file)
-       {
-         $res = $file;
-         last;
-       }
-    }
-
-  # This is needed because perl's '-x' isn't a smart as bash's; that
-  # is, it won't find `autoconf.sh' etc.
-  $res ||= $peer;
-
-  return $res;
 }


Index: lib/autotest/general.m4
--- lib/autotest/general.m4 Thu, 30 Aug 2001 16:11:54 +0200 akim
+++ lib/autotest/general.m4 Thu, 30 Aug 2001 19:29:15 +0200 akim
@@ -259,39 +259,28 @@ Tests:
 IFS=$PATH_SEPARATOR
 at_sep=
 at_path=
-# Build first.
-for at_dir in $AUTOTEST_PATH; do
+for at_dir in $AUTOTEST_PATH $PATH
+do
   case $at_dir in
     [[\\/]]* | ?:[[\\/]]* )
-       at_dir=`(cd "$at_dir" && pwd) 2>/dev/null` ;;
+      if test -d "$at_dir"; then
+        at_path="$at_path$at_sep$at_dir"
+        at_sep=$PATH_SEPARATOR
+      fi
+      ;;
     * )
-       at_dir=`(cd "$top_builddir/$at_dir" && pwd) 2>/dev/null` ;;
+      at_build_dir=`(cd "$top_builddir/$at_dir" && pwd) 2>/dev/null`
+      if test -d "$at_build_dir"; then
+        at_path="$at_path$at_sep$at_build_dir"
+        at_sep=$PATH_SEPARATOR
+      fi
+      at_src_dir=`(cd "$top_srcdir/$at_dir" && pwd) 2>/dev/null`
+      if test -d "$at_src_dir"; then
+        at_path="$at_path$at_sep$at_src_dir"
+        at_sep=$PATH_SEPARATOR
+      fi
+      ;;
   esac
-  if test -d "$at_dir"; then
-    at_path="$at_path$at_sep$at_dir"
-    at_sep=$PATH_SEPARATOR
-  fi
-done
-# Then source.
-for at_dir in $AUTOTEST_PATH; do
-  case $at_dir in
-    [[\\/]]* | ?:[[\\/]]* )
-       at_dir=`(cd "$at_dir" && pwd) 2>/dev/null` ;;
-    * )
-       at_dir=`(cd "$top_srcdir/$at_dir" && pwd) 2>/dev/null` ;;
-  esac
-  if test -d "$at_dir"; then
-    at_path="$at_path$at_sep$at_dir"
-    at_sep=$PATH_SEPARATOR
-  fi
-done
-# And finally PATH.
-for at_dir in $PATH; do
-  at_dir=`(cd "$at_dir" && pwd) 2>/dev/null`
-  if test -d "$at_dir"; then
-    at_path="$at_path$at_sep$at_dir"
-    at_sep=$PATH_SEPARATOR
-  fi
 done
 IFS=$at_IFS_save
 PATH=$at_path
Index: man/Makefile.am
--- man/Makefile.am Thu, 30 Aug 2001 16:11:54 +0200 akim
+++ man/Makefile.am Thu, 30 Aug 2001 20:11:58 +0200 akim
@@ -45,17 +45,10 @@ config.sub.1:   $(srcdir)/config.sub.x
 SUFFIXES = .x .1

 .x.1:
-       test -f $(top_builddir)/bin/$* && prog=$(top_builddir)/bin/$*; \
-       test -f $(top_srcdir)/config/$* && prog=$(top_srcdir)/config/$*; \
-       if test -n "$$prog"; then \
-         echo "Updating man page $@"; \
-         autom4te_perllibdir="$(top_srcdir)/lib" \
-         AUTOM4TE_CFG="$(top_builddir)/lib/autom4te.cfg" \
-         $(HELP2MAN) \
+       echo "Updating man page $@"
+       PATH=$(top_builddir)/bin:$(top_srcdir)/config:$$PATH ;\
+       export PATH ;\
+       $(HELP2MAN) \
            --include=$(srcdir)/$*.x \
            --include=$(srcdir)/common.x \
-           --output=$@ $$prog; \
-       else \
-         echo "WARNING: The man page $@ cannot be updated yet."; \
-         echo "         Retry once the corresponding executable is built."; \
-       fi
+           --output=$@ $*
Index: tests/Makefile.am
--- tests/Makefile.am Thu, 30 Aug 2001 16:11:54 +0200 akim
+++ tests/Makefile.am Thu, 30 Aug 2001 19:14:59 +0200 akim
@@ -18,73 +18,95 @@
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.

-AUTOMAKE_OPTIONS = gnits
+# We don't actually distribute the testsuite, since one only
+# needs m4 to build it, m4 being required anyway to install Autoconf.
+EXTRA_DIST = $(WRAPPERS) $(TESTSUITE_AT) atspecific.m4 aclocal.m4 mktests.sh \
+             atlocal.in
+
+# Running the uninstalled scripts.
+WRAPPERS = autoconf autoheader autoreconf autom4te autoupdate

-SUITE_GENERATED = \
+DISTCLEANFILES       = atconfig atlocal $(TESTSUITE)
+
+TESTSUITE_GENERATED_AT = \
        aclang.at acc.at acfortran.at \
        acgeneral.at acstatus.at \
        acautoheader.at acautoupdate.at \
        acspecific.at acfunctions.at acheaders.at actypes.at \
        aclibs.at acprograms.at

-SUITE = suite.at \
+TESTSUITE_HAND_AT = \
+       suite.at \
         m4sugar.at m4sh.at \
         base.at tools.at torture.at \
        compile.at \
-       $(SUITE_GENERATED) \
        semantics.at \
        foreign.at

-# 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 \
-             atlocal.in $(SUITE) mktests.sh
-
-check-local: atconfig atlocal testsuite
-       $(SHELL) testsuite
-
-AUTOM4TE = AUTOM4TE_CFG='$(top_builddir)/lib/autom4te.cfg' \
-           AC_MACRODIR='$(top_srcdir)/lib' \
-           ../bin/autom4te
+TESTSUITE_AT = $(TESTSUITE_GENERATED_AT) $(TESTSUITE_HAND_AT)
+TESTSUITE = ./testsuite
+
+# Run the non installed autom4te.
+AUTOM4TE = $(srcdir)/autom4te
+AUTOTEST = $(AUTOM4TE) --language=autotest
 testsuite: $(top_srcdir)/lib/m4sugar/m4sugar.m4 \
           $(top_srcdir)/lib/m4sugar/m4sh.m4 \
            $(top_srcdir)/lib/autotest/autotest.m4 \
            $(top_srcdir)/lib/autotest/general.m4 \
           atspecific.m4 \
-           $(SUITE)
-       $(AUTOM4TE) --language=autotest -I $(srcdir) -I $(top_srcdir)/lib \
-         suite.at -o address@hidden
+           $(TESTSUITE_AT)
+       $(AUTOTEST) -I $(srcdir) suite.at -o address@hidden
        mv address@hidden $@

-# The files which contains macro we check for syntax.  Don't use $(top_srcdir)
-# here since below we explicitly `cd' to $srcdir.  As for the dependencies,
-# thanks God for VPATH.  Hm...
-MACRO_FILES = $(top_srcdir)/lib/autoconf/general.m4 \
-              $(top_srcdir)/lib/autoconf/status.m4 \
-              $(top_srcdir)/lib/autoconf/autoheader.m4 \
-              $(top_srcdir)/lib/autoconf/autoupdate.m4 \
-              $(top_srcdir)/lib/autoconf/specific.m4 \
-              $(top_srcdir)/lib/autoconf/functions.m4 \
-              $(top_srcdir)/lib/autoconf/lang.m4 \
-              $(top_srcdir)/lib/autoconf/c.m4 \
-              $(top_srcdir)/lib/autoconf/fortran.m4 \
-              $(top_srcdir)/lib/autoconf/headers.m4 \
-              $(top_srcdir)/lib/autoconf/libs.m4 \
-              $(top_srcdir)/lib/autoconf/types.m4      \
-              $(top_srcdir)/lib/autoconf/programs.m4
+atconfig: $(top_builddir)/config.status
+       cd $(top_builddir) && ./config.status tests/$@
+
+atlocal: $(srcdir)/atlocal.in $(top_builddir)/config.status
+       cd $(top_builddir) && ./config.status tests/$@
+
+clean-local:
+       $(SHELL) $(TESTSUITE) --clean
+       rm -rf autom4te.cache
+
+check-local: atconfig atlocal $(TESTSUITE)
+       $(SHELL) $(TESTSUITE)

-$(SUITE_GENERATED): mktests.sh $(MACRO_FILES)
-       cd $(srcdir) && ./mktests.sh $(MACRO_FILES)
+# Run the test suite on the *installed* tree.
+installcheck-local:
+       $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin

-DISTCLEANFILES = atconfig atlocal testsuite


 ## ------------------ ##
 ## Maintainer rules.  ##
 ## ------------------ ##

+MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE_GENERATED_AT)
+
+## Producing the test files.
+
+# The files which contains macro we check for syntax.  Don't use $(top_srcdir)
+# here since below we explicitly `cd' to $srcdir.  As for the dependencies,
+# thanks God for VPATH.  Hm...
+autoconfdir = $(top_srcdir)/lib/autoconf
+AUTOCONF_FILES = $(autoconfdir)/general.m4 \
+                 $(autoconfdir)/status.m4 \
+                 $(autoconfdir)/autoheader.m4 \
+                 $(autoconfdir)/autoupdate.m4 \
+                 $(autoconfdir)/specific.m4 \
+                 $(autoconfdir)/functions.m4 \
+                 $(autoconfdir)/lang.m4 \
+                 $(autoconfdir)/c.m4 \
+                 $(autoconfdir)/fortran.m4 \
+                 $(autoconfdir)/headers.m4 \
+                 $(autoconfdir)/libs.m4 \
+                 $(autoconfdir)/types.m4       \
+                 $(autoconfdir)/programs.m4
+
+$(TESTSUITE_GENERATED_AT): mktests.sh $(AUTOCONF_FILES)
+       cd $(srcdir) && ./mktests.sh $(AUTOCONF_FILES)
+
+
 ## maintainer-check ##

 maintainer-check: maintainer-check-posix maintainer-check-c++
@@ -109,7 +131,3 @@ maintainer-check-posix: expr
 # Try using G++ as a C compiler.
 maintainer-check-c++:
        CC=g++ make check
-
-clean-local:
-       ./testsuite --clean
-       -rm -rf autom4te.cache
Index: tests/atlocal.in
--- tests/atlocal.in Thu, 30 Aug 2001 16:11:54 +0200 akim
+++ tests/atlocal.in Thu, 30 Aug 2001 19:13:55 +0200 akim
@@ -1,20 +1,7 @@
 # -*- shell-script -*-
 # @configure_input@
-# Configurable variable values for building test suites.
+# Configurable variable values for Autoconf test suite.
 # Copyright 2000, 2001 Free Software Foundation, Inc.

-# We need GNU m4, and Perl.
-M4='@M4@'
+# We need Perl.
 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.).
-AC_MACRODIR=$top_srcdir/lib
-export AC_MACRODIR
-autom4te_perllibdir=$top_srcdir/lib
-export autom4te_perllibdir
-autom4te_cfg=$top_builddir/lib
-export autom4te_cfg
Index: tests/atspecific.m4
--- tests/atspecific.m4 Thu, 23 Aug 2001 21:34:53 +0200 akim
+++ tests/atspecific.m4 Thu, 30 Aug 2001 20:18:28 +0200 akim
@@ -27,7 +27,7 @@
 # ----------------------------------------------------------
 m4_define([AT_CHECK_M4SUGAR],
 [AT_CLEANUP_FILES([script.4s script autom4te.cache])dnl
-AT_CHECK([autom4te -I $top_srcdir/lib m4sugar/m4sugar.m4 script.s4g -o script 
$1],
+AT_CHECK([autom4te --language=m4sugar script.s4g -o script $1],
          m4_default([$2], [0]), [$3], [$4])])


@@ -35,7 +35,7 @@ m4_define([AT_CHECK_M4SUGAR],
 # -------------------------------------------------------
 m4_define([AT_CHECK_M4SH],
 [AT_CLEANUP_FILES([script.as script autom4te.cache])dnl
-AT_CHECK([autom4te -I $top_srcdir/lib m4sugar/m4sh.m4 script.as -o script $1],
+AT_CHECK([autom4te --language=m4sh script.as -o script $1],
          m4_default([$2], [0]), [$3], [$4])])


@@ -65,7 +65,7 @@ m4_define([AT_CONFIGURE_AC],
 # -----------------------------------------------------------
 m4_define([AT_CHECK_AUTOCONF],
 [AT_CLEANUP_FILES(configure.in configure autom4te.cache)dnl
-AT_CHECK([autoconf --autoconf-dir ../lib -l $at_srcdir $1],
+AT_CHECK([autoconf --localdir=$srcdir $1],
          m4_default([$2], [0]), [$3], [$4])])


@@ -73,7 +73,7 @@ m4_define([AT_CHECK_AUTOCONF],
 # -------------------
 m4_define([AT_CHECK_AUTOHEADER],
 [AT_CLEANUP_FILES(config.hin)dnl
-AT_CHECK([autoheader --autoconf-dir ../lib -l $at_srcdir], 0, [], [])])
+AT_CHECK([autoheader --localdir=$srcdir], 0, [], [])])


 # AT_CHECK_CONFIGURE(END-COMMAND,
@@ -125,7 +125,7 @@ m4_define([AT_CHECK_DEFINES],
 # AT_CHECK_AUTOUPDATE
 # -------------------
 m4_define([AT_CHECK_AUTOUPDATE],
-[AT_CHECK([autoupdate --autoconf-dir $at_top_srcdir/lib], 0,
+[AT_CHECK([autoupdate], 0,
           [], [autoupdate: `configure.ac' is updated
 ])])

@@ -147,8 +147,9 @@ m4_define([_AT_CHECK_AC_MACRO],
 ])# _AT_CHECK_AC_MACRO


-# AT_CHECK_MACRO(MACRO, [MACRO-USE], [ADDITIONAL-CMDS], [AUTOCONF-FLAGS])
-# -----------------------------------------------------------------------
+# AT_CHECK_MACRO(MACRO, [MACRO-USE], [ADDITIONAL-CMDS],
+#                [AUTOCONF-FLAGS = -W obsolete])
+# -----------------------------------------------------
 # Create a minimalist configure.ac running the macro named
 # NAME-OF-THE-MACRO, check that autoconf runs on that script,
 # and that the shell runs correctly the configure.
Index: tests/tools.at
--- tests/tools.at Thu, 30 Aug 2001 16:11:54 +0200 akim
+++ tests/tools.at Thu, 30 Aug 2001 18:30:44 +0200 akim
@@ -234,8 +234,7 @@ configure.ac:19:TRACE2:bar foo
 # dive into obscure feature interaction...
 # Note that using `-i' means we need the *.m4 files, not the *.m4f files,
 # hence we need srcdir, not builddir.
-AT_CHECK_AUTOCONF([[--autoconf-dir $at_top_srcdir/lib -t define:'$1' -i|
-            sed -n '$p']],
+AT_CHECK_AUTOCONF([[-t define:'$1' -i| sed -n '$p']],
          0,
 [[active
 ]])
@@ -390,7 +389,7 @@ configure:18: error: possibly undefined
 AC_DEFINE(this, "whatever you want.")
 ]])

-AT_CHECK([autoheader --autoconf-dir ../lib -<configure.ac], 0,
+AT_CHECK([autoheader -<configure.ac], 0,
 [[/* config.h.in.  Generated automatically from Standard input by autoheader.  
*/
 /* Define this to whatever you want. */
 #undef this
@@ -404,7 +403,7 @@ configure:18: error: possibly undefined
 AC_DEFINE(that, "whatever you want.")
 ]])

-AT_CHECK([autoheader --autoconf-dir ../lib -<configure.ac], 1, [],
+AT_CHECK([autoheader -<configure.ac], 1, [],
 [autoheader: No template for symbol `that'
 ])

@@ -432,7 +431,7 @@ configure:18: error: possibly undefined
 # Yes, that's right: the `middle' part of `acconfig.h' is still before
 # the AH_TOP part.  But so what, you're not supposed to use the two
 # together.
-AT_CHECK([autoheader --autoconf-dir ../lib -<configure.ac], 0,
+AT_CHECK([autoheader -<configure.ac], 0,
 [[/* config.h.in.  Generated automatically from Standard input by autoheader.  
*/
 /* Top from acconfig.h. */

@@ -485,7 +484,7 @@ configure:18: error: possibly undefined
 AT_CHECK_AUTOUPDATE
 AT_CHECK([cat configure.ac], 0, [expout])
 # Checking that `autoupdate' is idempotent
-AT_CHECK([autoupdate --autoconf-dir $at_top_srcdir/lib], 0, [],
+AT_CHECK([autoupdate], 0, [],
          [autoupdate: `configure.ac' is unchanged
 ])
 AT_CHECK([cat configure.ac], 0, [expout])
@@ -528,16 +527,13 @@ configure:18: error: possibly undefined
 AC_PREREQ($at_version)
 EOF

-AT_CHECK([echo "AC_PREREQ(1.0)" |
-            autoupdate --autoconf-dir $at_top_srcdir/lib -],
+AT_CHECK([echo "AC_PREREQ(1.0)" | autoupdate -],
          0, [expout], [])

-AT_CHECK([echo "AC_PREREQ($at_version)" |
-            autoupdate --autoconf-dir $at_top_srcdir/lib -],
+AT_CHECK([echo "AC_PREREQ($at_version)" | autoupdate -],
          0, [expout], [])

-AT_CHECK([echo "AC_PREREQ(999.99)" |
-            autoupdate --autoconf-dir $at_top_srcdir/lib -],
+AT_CHECK([echo "AC_PREREQ(999.99)" | autoupdate -],
          1, [], [ignore])

 AT_CLEANUP
Index: tests/autoconf
--- tests/autoconf Thu, 30 Aug 2001 20:33:41 +0200 akim
+++ tests/autoconf Thu, 30 Aug 2001 19:30:43 +0200 akim
@@ -0,0 +1,8 @@
+#! /bin/sh
+# Running `autoheader' as if it were installed.
+
+me=`echo "$0" | sed -e 's,.*[\\/],,'`
+
+. ./atconfig
+
+exec ../bin/$me --autoconf-dir ../lib ${1+"$@"}
Index: tests/autoheader
--- tests/autoheader Thu, 30 Aug 2001 20:33:41 +0200 akim
+++ tests/autoheader Thu, 30 Aug 2001 19:30:32 +0200 akim
@@ -0,0 +1,8 @@
+#! /bin/sh
+# Running `autoheader' as if it were installed.
+
+me=`echo "$0" | sed -e 's,.*[\\/],,'`
+
+. ./atconfig
+
+exec ../bin/$me --autoconf-dir ../lib ${1+"$@"}
Index: tests/autom4te
--- tests/autom4te Thu, 30 Aug 2001 20:33:41 +0200 akim
+++ tests/autom4te Thu, 30 Aug 2001 19:34:30 +0200 akim
@@ -0,0 +1,18 @@
+#! /bin/sh
+# Running `autom4te' as if it were installed.
+
+. ./atconfig
+
+# 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
+
+AUTOM4TE_CFG=$top_builddir/lib/autom4te.cfg
+export AUTOM4TE_CFG
+
+# We might need files from build (frozen files), in addition of src files.
+exec ../bin/autom4te -I ../lib -I $top_srcdir/lib ${1+"$@"}
Index: tests/autoreconf
--- tests/autoreconf Thu, 30 Aug 2001 20:33:41 +0200 akim
+++ tests/autoreconf Thu, 30 Aug 2001 19:30:51 +0200 akim
@@ -0,0 +1,8 @@
+#! /bin/sh
+# Running `autoheader' as if it were installed.
+
+me=`echo "$0" | sed -e 's,.*[\\/],,'`
+
+. ./atconfig
+
+exec ../bin/$me --autoconf-dir ../lib ${1+"$@"}
Index: tests/autoupdate
--- tests/autoupdate Thu, 30 Aug 2001 20:33:41 +0200 akim
+++ tests/autoupdate Thu, 30 Aug 2001 19:35:32 +0200 akim
@@ -0,0 +1,14 @@
+#! /bin/sh
+# Running `autoupdate' as if it were installed.
+
+. ./atconfig
+
+# 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
+
+exec ../bin/autoupdate --autoconf-dir ../lib ${1+"$@"}
Index: doesn-t-exist
--- doesn-t-exist
+++ doesn-t-exist
Hey man, don't forget to:
chmod +x tests/{autoconf,autoheader,autom4te,autoreconf,autoupdate}



reply via email to

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