]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autotest/general.m4 (AT_INIT) <at_cmd_line>: Remove.
authorAkim Demaille <akim@epita.fr>
Mon, 27 Aug 2001 07:21:51 +0000 (07:21 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 27 Aug 2001 07:21:51 +0000 (07:21 +0000)
<at_cmd_line>: New.
Pass it to debug-*.sh scripts.
<AUTOTEST_PATH>: May contain absolute dir names.

ChangeLog
lib/autotest/general.m4

index f654e4ac3abaf1845f7c3f2907a78531faff2c16..08511edacdeec237077c4ff3ccb1e3b25bc37c13 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-08-27  Akim Demaille  <akim@epita.fr>
+
+       * lib/autotest/general.m4 (AT_INIT) <at_cmd_line>: Remove.
+       <at_cmd_line>: New.
+       Pass it to debug-*.sh scripts.
+       <AUTOTEST_PATH>: May contain absolute dir names.
+
 2001-08-27  Akim Demaille  <akim@epita.fr>
 
        * lib/autotest/general.m4 (AT_INIT): Log the command line.
index cffa4e263019dc893bc4ec0a2c8f60e06701e3ff..7856fcff247a942335d2a76b7f72e4ee3874e264 100644 (file)
@@ -93,7 +93,7 @@ AS_SHELL_SANITIZE
 SHELL=${CONFIG_SHELL-/bin/sh}
 
 # How were we run?
-at_cmd_line="$[0] $[@]"
+at_cli_args=${1+"$[@]"}
 
 . ./atconfig
 
@@ -228,16 +228,26 @@ at_sep=
 at_path=
 # Build first.
 for at_dir in $AUTOTEST_PATH; do
-  at_dir=`(cd "$top_builddir/$at_dir" && pwd) 2>/dev/null`
-  if test -n "$at_dir"; then
+  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
-  at_dir=`(cd "$top_srcdir/$at_dir" && pwd) 2>/dev/null`
-  if test -n "$at_dir"; then
+  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
@@ -245,7 +255,7 @@ done
 # And finally PATH.
 for at_dir in $PATH; do
   at_dir=`(cd "$at_dir" && pwd) 2>/dev/null`
-  if test -n "$at_dir"; then
+  if test -d "$at_dir"; then
     at_path="$at_path$at_sep$at_dir"
     at_sep=$PATH_SEPARATOR
   fi
@@ -262,7 +272,7 @@ if $1 --version | grep "$at_package.*$at_version" >/dev/null; then
     echo
 
     echo "$as_me: command line was:"
-    echo "  $ $at_cmd_line"
+    echo "  $ $[0] $at_cli_args"
     echo
 
     # Try to find a few ChangeLogs in case it might help determining the
@@ -398,7 +408,8 @@ elif test $at_debug = false; then
   for at_group in $at_fail_list; do
     echo $at_n " $at_group$at_c"
     ( echo "#! /bin/sh"
-      echo 'exec ${CONFIG_SHELL-'"$SHELL"'} '"$[0]"' -v -d '"$at_group"' ${1+"$[@]"}'
+      echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$[0]" \
+           '-v -d' "$at_cli_args" "$at_group" '${1+"$[@]"}'
       echo 'exit 1'
     ) >debug-$at_group.sh
     chmod +x debug-$at_group.sh