]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* configure.ac: Also find tested executables in bin.
authorAkim Demaille <akim@epita.fr>
Fri, 31 Aug 2001 13:30:11 +0000 (13:30 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 31 Aug 2001 13:30:11 +0000 (13:30 +0000)
* 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.

19 files changed:
ChangeLog
bin/autoconf.in
bin/autoheader.in
bin/autoreconf.in
bin/autoscan.in
bin/autoupdate.in
configure.ac
lib/Autom4te/General.pm
lib/autotest/general.m4
man/Makefile.am
tests/Makefile.am
tests/atlocal.in
tests/atspecific.m4
tests/autoconf [new file with mode: 0755]
tests/autoheader [new file with mode: 0755]
tests/autom4te [new file with mode: 0755]
tests/autoreconf [new file with mode: 0755]
tests/autoupdate [new file with mode: 0755]
tests/tools.at

index b11a15e77584d96a4f6cacf424511fdf4bb00136..1166b230262cf869bd6f848d466762610adee449 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2001-08-31  Akim Demaille  <akim@epita.fr>
+
+       * 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.
+
 2001-08-29  Akim Demaille  <akim@epita.fr>
 
        * bin/autom4te.in, lib/autom4te.in, bin/autoconf.in:
index 08c0025703137d049a82eaaee4fc277bf583871d..1c7da71b2bda88ce690baa5ed35f79ecf5f1fa8f 100644 (file)
@@ -86,6 +86,7 @@ if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
 
 # Variables.
 : ${autoconf_dir=${AC_MACRODIR=@datadir@}}
+: ${AUTOM4TE=@autom4te-name@}
 debug=false
 force=false
 dir=`echo "$0" | sed -e 's,[^\\/]*$,,'`
@@ -97,16 +98,6 @@ outfile=
 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 @@ esac
 # 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 33e24afa7cb0b4588a67a83e0209f2e90a5895ce..6b3c2c18782aae13b14d5f7e45783105bdd89a83 100644 (file)
@@ -79,15 +79,8 @@ if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
 
 # Variables.
 : ${autoconf_dir=${AC_MACRODIR=@datadir@}}
+: ${AUTOCONF=@autoconf-name@}
 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 @@ case $# in
 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 aa691dea3adcc9450a01368d0661c7846b51b765..2c7115b538bbdb02ba88f265207346b52e7b472d 100644 (file)
@@ -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 @@ if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
 
 # Variables.
 : ${autoconf_dir=${AC_MACRODIR=@datadir@}}
+: ${AUTOCONF=@autoconf-name@}
+: ${AUTOHEADER=@autoheader-name@}
+# Looking for automake.
+: ${AUTOMAKE=automake}
+# Looking for aclocal.
+: ${ACLOCAL=aclocal}
+
 debug=false
 dir=`echo "$0" | sed -e 's,[^\\/]*$,,'`
 force=false
@@ -104,28 +111,6 @@ status=0
 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 @@ while test $# -gt 0; do
 
      # 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 @@ fi
 
 # 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 @@ $force &&
 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 3aba42101a8f1d80288bca30b9ce4b86b606fe34..ce7b5f727bc12fe2ec3eae1fcba784b61004c5dd 100644 (file)
@@ -71,7 +71,7 @@ my $log = new IO::File ">$me.log"
   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 0646f781f6bd746d9bf960ed47e68f81ad267a04..87f4385005f906dc969cfbf80a55abbabe27b8d4 100644 (file)
@@ -37,7 +37,7 @@ use strict;
 
 # 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 413cb3da1e26c1dbd2e03bae8a1fc41ede6d1060..3f3c83ec594af11c7a7f82ac7c928f9bd151cadd 100644 (file)
@@ -28,7 +28,9 @@ AC_CONFIG_AUX_DIR(config)
 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 a084c369a7f13e8e8182a15a21feb9c390395a5f..619dd6a2add1376453e6800ba1b3c9fb4a7f548a 100644 (file)
@@ -28,7 +28,7 @@ use strict;
 use vars qw (@ISA @EXPORT);
 
 @ISA = qw (Exporter);
-@EXPORT = qw (&find_configure_ac &find_peer &mktmpdir &mtime
+@EXPORT = qw (&find_configure_ac &mktmpdir &mtime
               &uniq &verbose &xsystem
              $me $verbose $debug $tmp);
 
@@ -104,44 +104,6 @@ sub find_configure_ac ()
 }
 
 
-# $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;
-}
-
-
 # mktmpdir ($SIGNATURE)
 # ---------------------
 # Create a temporary directory which name is based on $SIGNATURE.
index 2f36f28488c9f8650bd739cafe426a5d2b3ee643..cf8bd5e62b7662b25443f192c9e126dff79f36ab 100644 (file)
@@ -259,39 +259,28 @@ at_IFS_save=$IFS
 IFS=$PATH_SEPARATOR
 at_sep=
 at_path=
-# Build first.
-for at_dir in $AUTOTEST_PATH; do
-  case $at_dir in
-    [[\\/]]* | ?:[[\\/]]* )
-       at_dir=`(cd "$at_dir" && pwd) 2>/dev/null` ;;
-    * )
-       at_dir=`(cd "$top_builddir/$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
-# Then source.
-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_srcdir/$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
-# 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 c422f17026c298c5e6a911967436dd004d52e7c2..2e7369f95448221b1cd5f194018fabf39eaeabf0 100644 (file)
@@ -45,17 +45,10 @@ config.sub.1:   $(srcdir)/config.sub.x    $(top_srcdir)/config/config.sub
 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 9dfbd90859c4138400101666a9cfbca9c09cc3f8..654ef55d3353b6061196d5ec238c644b093def1b 100644 (file)
 ## 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
+
+DISTCLEANFILES       = atconfig atlocal $(TESTSUITE)
 
-SUITE_GENERATED = \
+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
+TESTSUITE_AT = $(TESTSUITE_GENERATED_AT) $(TESTSUITE_HAND_AT)
+TESTSUITE = ./testsuite
 
-AUTOM4TE = AUTOM4TE_CFG='$(top_builddir)/lib/autom4te.cfg' \
-           AC_MACRODIR='$(top_srcdir)/lib' \
-           ../bin/autom4te
+# 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 $@.tmp
+           $(TESTSUITE_AT)
+       $(AUTOTEST) -I $(srcdir) suite.at -o $@.tmp
        mv $@.tmp $@
 
-# 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
-
-$(SUITE_GENERATED): mktests.sh $(MACRO_FILES)
-       cd $(srcdir) && ./mktests.sh $(MACRO_FILES)
-
-DISTCLEANFILES = atconfig atlocal testsuite
+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)
+
+# Run the test suite on the *installed* tree.
+installcheck-local:
+       $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
+
 
 
 ## ------------------ ##
 ## 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 e594b48068931b7dac06efea01ff481bedfd187f..163e12573d1ab909db9bdbd81b07a340b4ce3a4d 100644 (file)
@@ -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 553c29fd3e87276427ded6a44cb77c5e900fcbe4..8a4e3fb58c2cdb91ad0f47207b296a20c6a49db9 100644 (file)
@@ -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 @@ AT_CHECK([autom4te -I $top_srcdir/lib m4sugar/m4sugar.m4 script.s4g -o script $1
 # -------------------------------------------------------
 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 @@ AC_STATE_SAVE(after)
 # -----------------------------------------------------------
 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 @@ AT_CHECK([autoconf --autoconf-dir ../lib -l $at_srcdir $1],
 # -------------------
 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 @@ AT_CHECK_ENV
 ])# _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.
diff --git a/tests/autoconf b/tests/autoconf
new file mode 100755 (executable)
index 0000000..13a1f4d
--- /dev/null
@@ -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+"$@"}
diff --git a/tests/autoheader b/tests/autoheader
new file mode 100755 (executable)
index 0000000..13a1f4d
--- /dev/null
@@ -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+"$@"}
diff --git a/tests/autom4te b/tests/autom4te
new file mode 100755 (executable)
index 0000000..3541a55
--- /dev/null
@@ -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+"$@"}
diff --git a/tests/autoreconf b/tests/autoreconf
new file mode 100755 (executable)
index 0000000..13a1f4d
--- /dev/null
@@ -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+"$@"}
diff --git a/tests/autoupdate b/tests/autoupdate
new file mode 100755 (executable)
index 0000000..5806904
--- /dev/null
@@ -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 065b5423f9bf117cb1b6e34a17b7de3b41a31b1d..dfe6a0399b6689a1961cfcb48bcab6c6b7bc6e36 100644 (file)
@@ -234,8 +234,7 @@ AT_CHECK_AUTOCONF([[-t define | sed -n '$p']],
 # 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 @@ AC_CONFIG_HEADERS(config.h)
 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 @@ AC_CONFIG_HEADERS(config.h)
 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 @@ AH_BOTTOM([Bottom2 from configure.ac.])
 # 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 @@ AC_OUTPUT
 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 @@ cat >expout <<EOF
 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