]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/status.m4 (_AC_SRCPATHS): Compute and provide
authorAkim Demaille <akim@epita.fr>
Sun, 23 Sep 2001 17:17:46 +0000 (17:17 +0000)
committerAkim Demaille <akim@epita.fr>
Sun, 23 Sep 2001 17:17:46 +0000 (17:17 +0000)
ac_buildpath, ac_top_buildpath, ac_srcpath, and ac_top_srcpath.
(_AC_OUTPUT_FILES): Also substitute srcpath, top_srcpath,
builddir, buildpath, top_builddir, and top_buildpath.
(_AC_OUTPUT_SUBDIRS): Compute the dir variables *before* changing
the current directory.
* lib/autoconf/general.m4 (_AC_INIT_HELP): Compute the dir
variables *before* changing the current directory.
Skip nonexistent dirs.
* doc/autoconf.texi (Preset Output Variables): Document these
variables.
* lib/autotest/general.m4: Do not reset AT_victims.
Don't compute at_srcdir nor at_top_srcdir.
* tests/tools.at: Hence use top_srcdir.
* tests/Makefile.am, tests/autoconf, tests/autoheader,
* tests/autom4te, tests/autoreconf, tests/autoupdate, tests/ifnames:
Remove.
* tests/autoreconf.in, tests/wrappl.in, tests/autom4te.in,
* tests/wrapsh.in, tests/autoupdate.in: New.
* tests/Makefile.am (DISTCLEANFILES, EXTRA_DIST): Adjust.
* configure.ac: Build the position independent wrappers.
* man/Makefile.am: Now that test wrappers are position
independent, use them and drop dark envvar magic.

22 files changed:
ChangeLog
Makefile.am
Makefile.in
NEWS
configure
configure.ac
doc/autoconf.texi
lib/autoconf/autotest.m4
lib/autoconf/general.m4
lib/autoconf/status.m4
lib/autotest/general.m4
man/Makefile.am
man/Makefile.in
tests/Makefile.am
tests/Makefile.in
tests/autom4te.in [moved from tests/autom4te with 71% similarity, mode: 0644]
tests/autoreconf.in [moved from tests/autoreconf with 55% similarity, mode: 0644]
tests/autoupdate.in [moved from tests/autoupdate with 62% similarity, mode: 0644]
tests/ifnames [deleted file]
tests/tools.at
tests/wrappl.in [moved from tests/autoheader with 67% similarity, mode: 0644]
tests/wrapsh.in [moved from tests/autoconf with 56% similarity, mode: 0644]

index 37cbca32dc151630fae73580aa40e331fd5b6362..1d85be7d3882ba6ad2b94a3dc805cc8b7507e8a9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,33 @@
+2001-09-23  Akim Demaille  <akim@epita.fr>
+
+       * lib/autoconf/status.m4 (_AC_SRCPATHS): Compute and provide
+       ac_buildpath, ac_top_buildpath, ac_srcpath, and ac_top_srcpath.
+       (_AC_OUTPUT_FILES): Also substitute srcpath, top_srcpath,
+       builddir, buildpath, top_builddir, and top_buildpath.
+       (_AC_OUTPUT_SUBDIRS): Compute the dir variables *before* changing
+       the current directory.
+       * lib/autoconf/general.m4 (_AC_INIT_HELP): Compute the dir
+       variables *before* changing the current directory.
+       Skip nonexistent dirs.
+       * doc/autoconf.texi (Preset Output Variables): Document these
+       variables.
+
+       * lib/autotest/general.m4: Do not reset AT_victims.
+       Don't compute at_srcdir nor at_top_srcdir.
+
+       * tests/tools.at: Hence use top_srcdir.
+
+       * tests/Makefile.am, tests/autoconf, tests/autoheader,
+       * tests/autom4te, tests/autoreconf, tests/autoupdate, tests/ifnames:
+       Remove.
+       * tests/autoreconf.in, tests/wrappl.in, tests/autom4te.in,
+       * tests/wrapsh.in, tests/autoupdate.in: New.
+       * tests/Makefile.am (DISTCLEANFILES, EXTRA_DIST): Adjust.
+       * configure.ac: Build the position independent wrappers.
+
+       * man/Makefile.am: Now that test wrappers are position
+       independent, use them and drop dark envvar magic.
+
 2001-09-23  Akim Demaille  <akim@epita.fr>
 
        * doc/autoconf.texi (Common Shell Constructs): Rename as...
index 2b97d7eee498d37a3ff742c20d3366a4dc2d404b..5328e5ca12d4cc7cea9f250ad846618c8bd74341 100644 (file)
@@ -31,7 +31,7 @@ EXTRA_DIST = ChangeLog.0 ChangeLog.1 ChangeLog.2 \
 
 # Automake is unable to look into our special aclocal.m4...
 AMTAR = @AMTAR@
-
+AWK   = @AWK@
 
 ## -------------------- ##
 ## Forwarding targets.  ##
index c6a50c913fe055f0bbc323d461f8d9982e0f9952..f2f295077f25e2f2c12ab36e917f1b155f9db012 100644 (file)
@@ -76,6 +76,7 @@ EXTRA_DIST = ChangeLog.0 ChangeLog.1 ChangeLog.2 \
 
 # Automake is unable to look into our special aclocal.m4...
 AMTAR = @AMTAR@
+AWK = @AWK@
 
 pkgdata_DATA = INSTALL
 MAKEINFO = @MAKEINFO@ --no-headers --no-validate --no-split
@@ -252,6 +253,7 @@ distdir: $(DISTFILES)
        fi
        -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
        mkdir $(distdir)
+       $(mkinstalldirs) $(distdir)/tests
        @for file in $(DISTFILES); do \
          if test -f $$file; then d=.; else d=$(srcdir); fi; \
          dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
diff --git a/NEWS b/NEWS
index e9ba3da8c5eb315a07808c839cd4582fa1674c74..18f3b766a755864d8a448df7f4b37996a2fe90c3 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,18 +6,22 @@
 ** Documentation
 - AC_INIT
   Argument requirements, output variables, defined macros.
-- Autotest
-  First sketch of its documentation.
+- M4sugar, M4sh, Autotest
+  First sketch.
 - Double quoting macros
   AC_TRY_CPP, AC_TRY_COMPILE, AC_TRY_LINK and AC_TRY_RUN.
 - Licensing
   The Autoconf manual is now distributed under the terms of the GNU FDL.
 
-** $LINENO
-  Is now used instead of hard coded line numbers.
+** configure
+- $LINENO
+  Now used instead of hard coded line numbers.
   This eases the comparison of `configure's, and diminishes the
   pressure over control version archives.
   Automatic replacement for shells that don't support this feature.
+- New output variables
+  @builddir@, @top_builddir@, @srcpath@, @top_srcpath@, @buildpath@,
+  @top_buildpath@.
 
 ** autom4te
   New executable, used by the Autoconf suite to cache and speed up
 
 ** Generic macros
 - AC_CONFIG_COMMANDS, HEADERS, FILES, LINKS.
-  Provide the user with srcdir, ac_top_srcdir, ac_top_builddir, ac_srcdir.
+  Provide the user with srcdir, ac_srcdir, ac_top_srcdir, ac_builddir,
+  ac_top_builddir, ac_srcpath, ac_top_srcpath, ac_buildpath,
+  ac_top_buildpath.
+
 \f
 * Major changes in Autoconf 2.52
 ** Documentation
index a121f16d1852cfdf3a46a0d8b5543ec5643f9f5d..c0e6c4a8a2fb7d47bf0a6f87aba4245d589506dc 100755 (executable)
--- a/configure
+++ b/configure
@@ -1124,8 +1124,10 @@ _ACEOF
 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
 rm conftest.sed
 
-test x"${MISSING+set}" = xset ||
-  MISSING="\${SHELL} `CDPATH=:; cd $ac_aux_dir && pwd`/missing"
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
 # Use eval to expand $SHELL
 if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
@@ -1136,9 +1138,6 @@ else
 echo "$as_me: WARNING: ${am_backtick}missing' script is too old or missing" >&2;}
 fi
 
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
-
 for ac_prog in mawk gawk nawk awk
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -1237,7 +1236,7 @@ fi
 rmdir .deps 2>/dev/null
 
 # test to see if srcdir already configured
-if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
    test -f $srcdir/config.status; then
   { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
@@ -1259,14 +1258,6 @@ _ACEOF
 # Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
 # the ones we care about.
 
-# Autoconf 2.50 always computes EXEEXT.  However we need to be
-# compatible with 2.13, for now.  So we always define EXEEXT, but we
-# don't compute it.
-
-# Similar for OBJEXT -- only we only use OBJEXT if the user actually
-# requests that it be used.  This is a bit dumb.
-: ${OBJEXT=o}
-
 # Some tools Automake needs.
 
 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"}
@@ -1288,9 +1279,7 @@ INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
 
-# Initialize the test suite.
-# Some of our bins are location independant, e.g., ifnames.
-# We don't need wrappers for them.
+# Initialize the test suite and build position independent wrappers.
 ac_config_commands="$ac_config_commands tests/package.m4"
 
 ac_config_commands="$ac_config_commands tests/atconfig"
@@ -1300,6 +1289,20 @@ if test -f $srcdir/tests/atlocal.in; then
 
 fi
 
+ac_config_files="$ac_config_files tests/autoconf:tests/wrapsh.in"
+
+ac_config_files="$ac_config_files tests/autoheader:tests/wrappl.in"
+
+ac_config_files="$ac_config_files tests/autom4te"
+
+ac_config_files="$ac_config_files tests/autoreconf"
+
+ac_config_files="$ac_config_files tests/autoscan:tests/wrappl.in"
+
+ac_config_files="$ac_config_files tests/autoupdate"
+
+ac_config_files="$ac_config_files tests/ifnames:tests/wrappl.in"
+
 # Extract the first word of "expr", so it can be a program name with args.
 set dummy expr; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -1894,6 +1897,13 @@ do
   case "$ac_config_target" in
   # Handling of arguments.
   "tests/atlocal" ) CONFIG_FILES="$CONFIG_FILES tests/atlocal" ;;
+  "tests/autoconf" ) CONFIG_FILES="$CONFIG_FILES tests/autoconf:tests/wrapsh.in" ;;
+  "tests/autoheader" ) CONFIG_FILES="$CONFIG_FILES tests/autoheader:tests/wrappl.in" ;;
+  "tests/autom4te" ) CONFIG_FILES="$CONFIG_FILES tests/autom4te" ;;
+  "tests/autoreconf" ) CONFIG_FILES="$CONFIG_FILES tests/autoreconf" ;;
+  "tests/autoscan" ) CONFIG_FILES="$CONFIG_FILES tests/autoscan:tests/wrappl.in" ;;
+  "tests/autoupdate" ) CONFIG_FILES="$CONFIG_FILES tests/autoupdate" ;;
+  "tests/ifnames" ) CONFIG_FILES="$CONFIG_FILES tests/ifnames:tests/wrappl.in" ;;
   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
   "m4/Makefile" ) CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;;
   "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
@@ -1995,8 +2005,6 @@ s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
 s,@PACKAGE@,$PACKAGE,;t t
 s,@VERSION@,$VERSION,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
 s,@ACLOCAL@,$ACLOCAL,;t t
 s,@AUTOCONF@,$AUTOCONF,;t t
 s,@AUTOMAKE@,$AUTOMAKE,;t t
@@ -2192,6 +2200,16 @@ s,@INSTALL@,$ac_INSTALL,;t t
     rm -f $tmp/out
   fi
 
+  # Run the commands associated with the file.
+  case $ac_file in
+    tests/autoconf ) chmod +x tests/autoconf ;;
+    tests/autoheader ) chmod +x tests/autoheader ;;
+    tests/autom4te ) chmod +x tests/autom4te ;;
+    tests/autoreconf ) chmod +x tests/autoreconf ;;
+    tests/autoscan ) chmod +x tests/autoscan ;;
+    tests/autoupdate ) chmod +x tests/autoupdate ;;
+    tests/ifnames ) chmod +x tests/ifnames ;;
+  esac
 done
 _ACEOF
 cat >>$CONFIG_STATUS <<\_ACEOF
@@ -2259,7 +2277,7 @@ srcdir='$ac_srcdir'
 top_srcdir='$ac_top_srcdir'
 top_builddir='$ac_top_builddir'
 
-AUTOTEST_PATH='tests:bin'
+AUTOTEST_PATH='tests'
 
 SHELL=\${CONFIG_SHELL-'$SHELL'}
 ATEOF
index 5b490812252da9a7f4c776f9af196013a5fa79be..6907da21050d4a2629314d09201298080988cd6b 100644 (file)
@@ -27,10 +27,22 @@ AC_CONFIG_SRCDIR(ChangeLog)
 AC_CONFIG_AUX_DIR(config)
 AM_INIT_AUTOMAKE(autoconf, 2.52e)
 
-# Initialize the test suite.
-# Some of our bins are location independant, e.g., ifnames.
-# We don't need wrappers for them.
-AC_CONFIG_TESTDIR(tests, tests:bin)
+# Initialize the test suite and build position independent wrappers.
+AC_CONFIG_TESTDIR(tests)
+AC_CONFIG_FILES([tests/autoconf:tests/wrapsh.in],
+                [chmod +x tests/autoconf])
+AC_CONFIG_FILES([tests/autoheader:tests/wrappl.in],
+                [chmod +x tests/autoheader])
+AC_CONFIG_FILES([tests/autom4te],
+                [chmod +x tests/autom4te])
+AC_CONFIG_FILES([tests/autoreconf],
+                [chmod +x tests/autoreconf])
+AC_CONFIG_FILES([tests/autoscan:tests/wrappl.in],
+                [chmod +x tests/autoscan])
+AC_CONFIG_FILES([tests/autoupdate],
+                [chmod +x tests/autoupdate])
+AC_CONFIG_FILES([tests/ifnames:tests/wrappl.in],
+                [chmod +x tests/ifnames])
 AC_PATH_PROG(EXPR, expr)
 
 # We use a path for GNU m4 so even if users have another m4 first in
index d2632173aa05f4248ab121a384d75992041404df..bf364a1938cec541271f6f963fdac27e4dc1c4f1 100644 (file)
@@ -2073,15 +2073,47 @@ those libraries are found and provide necessary functions, see
 programs to test for C, C++ and Fortran 77 features.
 @end defvar
 
+@defvar builddir
+@ovindex builddir
+Rigorously equal to @samp{.}.  Added for symmetry only.
+@end defvar
+
+@defvar buildpath
+@ovindex buildpath
+Absolute path of @code{builddir}.
+@end defvar
+
+@defvar top_builddir
+@ovindex top_builddir
+The relative path to the top-level of the current build tree.  In the
+top-level directory, this is the same as @code{srcbuild}.
+@end defvar
+
+@defvar top_buildpath
+@ovindex top_buildpath
+Absolute path of @code{top_builddir}.
+@end defvar
+
 @defvar srcdir
 @ovindex srcdir
-The directory that contains the source code for that @file{Makefile}.
+The relative path to the directory that contains the source code for
+that @file{Makefile}.
+@end defvar
+
+@defvar srcpath
+@ovindex srcpath
+Absolute path of @code{srcdir}.
 @end defvar
 
 @defvar top_srcdir
 @ovindex top_srcdir
-The top-level source code directory for the package.  In the top-level
-directory, this is the same as @code{srcdir}.
+The relative path to the top-level source code directory for the
+package.  In the top-level directory, this is the same as @code{srcdir}.
+@end defvar
+
+@defvar top_srcpath
+@ovindex top_srcpath
+Absolute path of @code{top_srcdir}.
 @end defvar
 
 @node Installation Directory Variables
index cead6da726c403e53e14a5d527ab29ae78244d13..9bcde42a63989af269222a2797e5760275bf724e 100644 (file)
@@ -86,9 +86,13 @@ AC_CONFIG_COMMANDS([$1/atconfig],
 @%:@ Copyright 2000, 2001 Free Software Foundation, Inc.
 
 at_testdir='$1'
+buildpath='$ac_buildpath'
 srcdir='$ac_srcdir'
+srcpath='$ac_srcpath'
 top_srcdir='$ac_top_srcdir'
+top_srcpath='$ac_top_srcpath'
 top_builddir='$ac_top_builddir'
+top_buildpath='$ac_top_buildpath'
 
 AUTOTEST_PATH='m4_default([$2], [$1])'
 
index 445601b4a75399ab012d760be967a5f11853f717..dff6175ebf58b99ecc0067f24bf7bca7945f7778 100644 (file)
@@ -1084,8 +1084,9 @@ if test "$ac_init_help" = "recursive"; then
   # If there are subdirs, report their specific --help.
   ac_popdir=`pwd`
   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    cd $ac_dir
+    test -d $ac_dir || continue
     _AC_SRCPATHS(["$ac_dir"])
+    cd $ac_dir
     # Check for guested configure; otherwise get Cygnus style configure.
     if test -f $ac_srcdir/configure.gnu; then
       echo
index 60a0a61cbfcf8fd02108887bd37db06654925d94..90bd75b50f9a4026bc37b9b7f315dd598017d9c5 100644 (file)
 #   - `$srcdir' is `top-build -> top-src'
 #
 # Ouputs:
+# - `ac_builddir' is `.', for symmetry only.
 # - `ac_top_builddir' is `build -> top_build'.
 #      If not empty, has a trailing slash.
 # - `ac_srcdir' is `build -> src'.
-# - `ac_top_srcdir' is `build -> top-src'
+# - `ac_top_srcdir' is `build -> top-src'.
+#
+# and `ac_buildpath' etc., the absolute paths.
 m4_define([_AC_SRCPATHS],
-[if test $1 != .; then
+[ac_builddir=.
+
+if test $1 != .; then
   ac_dir_suffix=/`echo $1 | sed 's,^\.[[\\/]],,'`
   # A "../" for each directory in $ac_dir_suffix.
   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[[^\\/]]*,../,g'`
@@ -155,6 +160,12 @@ case $srcdir in
     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
     ac_top_srcdir=$ac_top_builddir$srcdir ;;
 esac
+# Don't blindly perform a `cd $1/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_buildpath=`cd $1 && cd $ac_builddir && pwd`
+ac_top_buildpath=`cd $1 && cd $ac_top_builddir && pwd`
+ac_srcpath=`cd $1 && cd $ac_srcdir && pwd`
+ac_top_srcpath=`cd $1 && cd $ac_top_srcdir && pwd`
 ])# _AC_SRCPATHS
 
 
@@ -949,7 +960,13 @@ cat >>$CONFIG_STATUS <<\_ACEOF
 [/@[a-zA-Z_][a-zA-Z_0-9]*@/!b]
 s,@configure_input@,$configure_input,;t t
 s,@srcdir@,$ac_srcdir,;t t
+s,@srcpath@,$ac_srcpath,;t t
 s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@top_srcpath@,$ac_top_srcpath,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@buildpath@,$ac_buildpath,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@top_buildpath@,$ac_top_buildpath,;t t
 AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [s,@INSTALL@,$ac_INSTALL,;t t
 ])dnl
 dnl The parens around the eval prevent an "illegal io" in Ultrix sh.
@@ -1058,6 +1075,7 @@ if test "$no_recursion" != yes; then
   # in subdir configurations.
   ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args"
 
+  ac_popdir=`pwd`
   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
 
     # Do not complain, so a configure script can configure whichever
@@ -1066,10 +1084,9 @@ if test "$no_recursion" != yes; then
 
     AC_MSG_NOTICE([configuring in $ac_dir])
     AS_MKDIR_P(["$ac_dir"])
+    _AC_SRCPATHS(["$ac_dir"])
 
-    ac_popdir=`pwd`
     cd $ac_dir
-    _AC_SRCPATHS(["$ac_dir"])
 
     # Check for guested configure; otherwise get Cygnus style configure.
     if test -f $ac_srcdir/configure.gnu; then
index a288254a56705d29423236cfe88d8c83f89a2e73..a2be7f633f1f02184270ad132e6a9e0d424904db 100644 (file)
@@ -95,7 +95,6 @@ m4_define([AT_TESTSUITE_NAME],
 m4_define([AT_ordinal], 0)
 m4_define([AT_banner_ordinal], 0)
 m4_define([AT_data_files], [stdout expout at-* stderr experr])
-m4_define([AT_victims], [])
 m4_divert_text([BINSH], [@%:@! /bin/sh])
 m4_divert_push([DEFAULT])dnl
 
@@ -112,11 +111,7 @@ do
   . ./$at_file || AS_ERROR([invalid content: $at_file])
 done
 
-AUTOTEST_PATH=`echo $AUTOTEST_PATH |tr ':' $PATH_SEPARATOR`
-
-# Use absolute file notations, as the test might change directories.
-at_srcdir=`cd "$srcdir" && pwd`
-at_top_srcdir=`cd "$top_srcdir" && pwd`
+AUTOTEST_PATH=`echo $AUTOTEST_PATH | tr ':' $PATH_SEPARATOR`
 
 # Not all shells have the 'times' builtin; the subshell is needed to make
 # sure we discard the 'times: not found' message from the shell.
index 03e19a194fd8fb7e81eaef69c39517d44fff9837..62280d9d7216cd848f89e96c4ee2226c73e944e1 100644 (file)
@@ -46,12 +46,8 @@ SUFFIXES = .x .1
 
 .x.1:
        echo "Updating man page $@"
-       PATH="$(top_builddir)/bin@PATH_SEPARATOR@$(top_srcdir)/config@PATH_SEPARATOR@$$PATH"; \
+       PATH="$(top_builddir)/tests@PATH_SEPARATOR@$(top_srcdir)/config@PATH_SEPARATOR@$$PATH"; \
        export PATH; \
-       autom4te_perllibdir=$(top_srcdir)/lib; \
-       export autom4te_perllibdir; \
-       AUTOM4TE_CFG=$(top_srcdir)/lib/autom4te.cfg; \
-       export AUTOM4TE_CFG; \
        $(HELP2MAN) \
            --include=$(srcdir)/$*.x \
            --include=$(srcdir)/common.x \
index 55642e1662cebebeea330cb662394289b306cabb..10ba412de62b36aca3bf4e43c3b1b62a6afa50fc 100644 (file)
@@ -255,12 +255,8 @@ config.sub.1:   $(srcdir)/config.sub.x    $(top_srcdir)/config/config.sub
 
 .x.1:
        echo "Updating man page $@"
-       PATH="$(top_builddir)/bin@PATH_SEPARATOR@$(top_srcdir)/config@PATH_SEPARATOR@$$PATH"; \
+       PATH="$(top_builddir)/tests@PATH_SEPARATOR@$(top_srcdir)/config@PATH_SEPARATOR@$$PATH"; \
        export PATH; \
-       autom4te_perllibdir=$(top_srcdir)/lib; \
-       export autom4te_perllibdir; \
-       AUTOM4TE_CFG=$(top_srcdir)/lib/autom4te.cfg; \
-       export AUTOM4TE_CFG; \
        $(HELP2MAN) \
            --include=$(srcdir)/$*.x \
            --include=$(srcdir)/common.x \
index 10f01c9ab10fc31731f1b83b7706c10410597050..bc58fe6c411a3ba53fbe92caabe6cf1da1e83738 100644 (file)
 
 # 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 \
+EXTRA_DIST = $(TESTSUITE_AT) atspecific.m4 aclocal.m4 mktests.sh \
              atlocal.in
 
 # Running the uninstalled scripts.
-WRAPPERS = autoconf autoheader autoreconf autom4te autoupdate ifnames
+WRAPPERS = autoconf autoheader autoreconf autom4te autoscan autoupdate ifnames
 
-DISTCLEANFILES       = atconfig atlocal package.m4 $(TESTSUITE)
+DISTCLEANFILES = atconfig atlocal package.m4 $(TESTSUITE) $(WRAPPERS)
 
 TESTSUITE_GENERATED_AT = \
        aclang.at acc.at acfortran.at \
@@ -47,8 +47,9 @@ TESTSUITE_AT = $(TESTSUITE_GENERATED_AT) $(TESTSUITE_HAND_AT)
 TESTSUITE = ./testsuite
 
 # Run the non installed autom4te.
-AUTOM4TE = $(srcdir)/autom4te
-AUTOTEST = $(AUTOM4TE) --language=autotest
+# Don't use AUTOM4TE since `make alpha' makes it unavailable although
+# we are allowed to use it (since we ship it).
+AUTOTEST = ./autom4te --language=autotest
 testsuite: $(top_srcdir)/lib/m4sugar/m4sugar.m4 \
           $(top_srcdir)/lib/m4sugar/m4sh.m4 \
            $(top_srcdir)/lib/autotest/autotest.m4 \
index 4f4a3af2c3b06a486d343feddd363e56ffd42642..941f57bfbdf79d295d0832955a1672b66148cfc8 100644 (file)
@@ -66,14 +66,14 @@ PACKAGE_NAME = @PACKAGE_NAME@
 PERL = @PERL@
 VERSION = @VERSION@
 
-EXTRA_DIST = $(WRAPPERS) $(TESTSUITE_AT) atspecific.m4 aclocal.m4 mktests.sh \
+EXTRA_DIST = $(TESTSUITE_AT) atspecific.m4 aclocal.m4 mktests.sh \
              atlocal.in
 
 
 # Running the uninstalled scripts.
-WRAPPERS = autoconf autoheader autoreconf autom4te autoupdate ifnames
+WRAPPERS = autoconf autoheader autoreconf autom4te autoscan autoupdate ifnames
 
-DISTCLEANFILES = atconfig atlocal package.m4 $(TESTSUITE)
+DISTCLEANFILES = atconfig atlocal package.m4 $(TESTSUITE) $(WRAPPERS)
 
 TESTSUITE_GENERATED_AT = \
        aclang.at acc.at acfortran.at \
@@ -96,8 +96,9 @@ TESTSUITE_AT = $(TESTSUITE_GENERATED_AT) $(TESTSUITE_HAND_AT)
 TESTSUITE = ./testsuite
 
 # Run the non installed autom4te.
-AUTOM4TE = $(srcdir)/autom4te
-AUTOTEST = $(AUTOM4TE) --language=autotest
+# Don't use AUTOM4TE since `make alpha' makes it unavailable although
+# we are allowed to use it (since we ship it).
+AUTOTEST = ./autom4te --language=autotest
 
 MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE_GENERATED_AT)
 
@@ -124,9 +125,11 @@ AUTOCONF_FILES = $(autoconfdir)/general.m4 \
 CLEANFILES = expr
 subdir = tests
 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = autoconf autoheader autom4te autoreconf autoscan \
+       autoupdate ifnames
 DIST_SOURCES =
-DIST_COMMON = README Makefile.am Makefile.in
+DIST_COMMON = README Makefile.am Makefile.in autom4te.in autoreconf.in \
+       autoupdate.in wrappl.in wrapsh.in
 all: all-am
 
 .SUFFIXES:
@@ -137,6 +140,20 @@ Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
        cd $(top_builddir) && \
          CONFIG_HEADERS= CONFIG_LINKS= \
          CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+autoconf: $(top_builddir)/config.status wrapsh.in
+       cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@:tests/wrapsh.in CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+autoheader: $(top_builddir)/config.status wrappl.in
+       cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@:tests/wrappl.in CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+autom4te: $(top_builddir)/config.status autom4te.in
+       cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+autoreconf: $(top_builddir)/config.status autoreconf.in
+       cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+autoscan: $(top_builddir)/config.status wrappl.in
+       cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@:tests/wrappl.in CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+autoupdate: $(top_builddir)/config.status autoupdate.in
+       cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+ifnames: $(top_builddir)/config.status wrappl.in
+       cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@:tests/wrappl.in CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
 uninstall-info-am:
 tags: TAGS
 TAGS:
old mode 100755 (executable)
new mode 100644 (file)
similarity index 71%
rename from tests/autom4te
rename to tests/autom4te.in
index 3541a55..7202d2f
@@ -1,18 +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
+autom4te_perllibdir=@top_srcpath@/lib
 export autom4te_perllibdir
 
-AUTOM4TE_CFG=$top_builddir/lib/autom4te.cfg
+AUTOM4TE_CFG=@top_buildpath@/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+"$@"}
+exec @top_buildpath@/bin/autom4te \
+     -I @top_buildpath@/lib \
+     -I @top_srcpath@/lib ${1+"$@"}
old mode 100755 (executable)
new mode 100644 (file)
similarity index 55%
rename from tests/autoreconf
rename to tests/autoreconf.in
index c290a17..5f56726
@@ -3,6 +3,4 @@
 
 me=`echo "$0" | sed -e 's,.*[\\/],,'`
 
-. ./atconfig
-
-exec ../bin/$me --autoconf-dir ../lib ${1+"$@"}
+exec @top_buildpath@/bin/$me --autoconf-dir @top_buildpath@/lib ${1+"$@"}
old mode 100755 (executable)
new mode 100644 (file)
similarity index 62%
rename from tests/autoupdate
rename to tests/autoupdate.in
index 52ac2a4..fbcb9c9
@@ -1,14 +1,15 @@
 #! /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
+autom4te_perllibdir=@top_srcpath@/lib
 export autom4te_perllibdir
 
-exec ../bin/autoupdate --include ../lib --include $top_srcdir/lib ${1+"$@"}
+# We might need files from build (frozen files), in addition of src files.
+exec @top_buildpath@/bin/autoupdate \
+     -I @top_buildpath@/lib \
+     -I @top_srcpath@/lib ${1+"$@"}
diff --git a/tests/ifnames b/tests/ifnames
deleted file mode 100755 (executable)
index 0fce008..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#! /bin/sh
-# Running `ifnames' 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/ifnames ${1+"$@"}
index e71cba182c5a9d4ed5df843b9b453a3b0650bf35..5a812d801dc16aa5dff846230a29dc1ccc0c853d 100644 (file)
@@ -77,9 +77,9 @@ AT_CHECK([/bin/sh -n ../bin/autoconf],   0)
 AT_CHECK([/bin/sh -n ../bin/autoreconf], 0)
 
 # These are not built, they are in the src tree.
-AT_CHECK([/bin/sh -n $at_top_srcdir/config/install-sh], 0)
-AT_CHECK([/bin/sh -n $at_top_srcdir/config/mkinstalldirs], 0)
-AT_CHECK([/bin/sh -n $at_top_srcdir/config/missing], 0)
+AT_CHECK([/bin/sh -n $top_srcdir/config/install-sh], 0)
+AT_CHECK([/bin/sh -n $top_srcdir/config/mkinstalldirs], 0)
+AT_CHECK([/bin/sh -n $top_srcdir/config/missing], 0)
 
 AT_CLEANUP
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 67%
rename from tests/autoheader
rename to tests/wrappl.in
index 9239683..578c2a0
@@ -1,14 +1,14 @@
 #! /bin/sh
-# Running `autoheader' as if it were installed.
+# Running `$0' as if it were installed.
 
-. ./atconfig
+me=`echo "$0" | sed -e 's,.*[\\/],,'`
 
 # 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
+autom4te_perllibdir=@top_srcpath@/lib
 export autom4te_perllibdir
 
-exec ../bin/autoheader --include ../lib ${1+"$@"}
+exec @top_buildpath@/bin/$me ${1+"$@"}
old mode 100755 (executable)
new mode 100644 (file)
similarity index 56%
rename from tests/autoconf
rename to tests/wrapsh.in
index 8e72c56..46b61c1
@@ -3,6 +3,4 @@
 
 me=`echo "$0" | sed -e 's,.*[\\/],,'`
 
-. ./atconfig
-
-exec ../bin/$me --include ../lib ${1+"$@"}
+exec @top_buildpath@/bin/$me --include @top_buildpath@/lib ${1+"$@"}