]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Just source 40.lineno
authorAkim Demaille <akim@epita.fr>
Tue, 2 Oct 2001 14:37:07 +0000 (14:37 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 2 Oct 2001 14:37:07 +0000 (14:37 +0000)
instead of exec'ing to preserve $0 and $@.

ChangeLog
doc/autoconf.texi
lib/m4sugar/m4sh.m4

index 11d5f752d035105a9a762a649a58cf6bf7b3211d..72faacd06bf1e15f3298733802a6d48152400962 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-10-02  Akim Demaille  <akim@epita.fr>
+
+       * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Just source 40.lineno
+       instead of exec'ing to preserve $0 and $@.
+
 2001-10-01  Akim Demaille  <akim@epita.fr>
 
        * tests/testsuite (AT_INIT) <at_pass_list>: New.
index 354f8dc42aeb346b74c08014b6a18e294f0ef49c..0d49600c5d88bca26dab66ae12f26648fe2114c9 100644 (file)
@@ -8298,6 +8298,7 @@ the @samp{x} into account later in the pipe.
 @table @asis
 @item @command{.}
 @prindex @command{.}
+@prindex @command{source}
 Use @command{.} only with regular files (use @samp{test -f}).  Bash
 2.03, for instance, chokes on @samp{. /dev/null}.  Also, remember that
 @command{.} is not expected to look in the current directory, hence you
@@ -8549,6 +8550,7 @@ processing as soon as a non-option argument is found.  Therefore, use
 set x $my_list; shift
 @end example
 
+
 @item @command{shift}
 @c ------------------
 @prindex @command{shift}
@@ -8556,6 +8558,12 @@ Not only is @command{shift}ing a bad idea when there is nothing left to
 shift, but in addition it is not portable: the shell of @sc{mips
 risc/os} 4.52 refuses to do it.
 
+
+@item @command{source}
+@c -------------------
+See the item @command{.} above.
+
+
 @item @command{test}
 @c -----------------
 @prindex @command{test}
@@ -8575,6 +8583,7 @@ statement, keep in mind that they have equal precedence.
 You may use @samp{!} with @command{test}, but not with @command{if}:
 @samp{test ! -r foo || exit 1}.
 
+
 @item @command{test} (files)
 @c -------------------------
 To enable @code{configure} scripts to support cross-compilation, they
index ff0c9f960584bb6ec7b1a4bbb08115eb2aa8116c..f0738013fb8403551ac5eacdc71df4408f3026dc 100644 (file)
@@ -151,7 +151,12 @@ if test "x$as_lineno_1"  = "x$as_lineno_2" ||
           }' <$as_myself >$as_me.lineno
     chmod +x $as_me.lineno
   fi
-  exec ${SHELL-/bin/sh} ./$as_me.lineno ${1+"$[@]"}
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  source ./$as_me.lineno
+  exit 0
 fi
 
 _AS_CR_PREPARE