]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* m4sh.m4 (AS_MKDIR_P, AS_DIRNAME_SED): Don't shell quote $1.
authorAkim Demaille <akim@epita.fr>
Fri, 10 Nov 2000 10:14:44 +0000 (10:14 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 10 Nov 2000 10:14:44 +0000 (10:14 +0000)
Adjust callers.
Reported by Paul Eggert.
* tests/m4sh.at: Sort.

ChangeLog
acgeneral.m4
lib/autoconf/general.m4
lib/m4sugar/m4sh.m4
m4sh.m4
tests/m4sh.at

index b26de77ae50403e07aee9f55dc56b680547b8f35..2ada205cff5e012b7cbcacd665d2eef1f573cb64 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2000-11-10  Akim Demaille  <akim@epita.fr>
+
+       * m4sh.m4 (AS_MKDIR_P, AS_DIRNAME_SED): Don't shell quote $1.
+       Adjust callers.
+       Reported by Paul Eggert.
+       * tests/m4sh.at: Sort.
+
 2000-11-09  Pavel Roskin  <proski@gnu.org>
 
        * install-sh: Use ":" instead of "true".
index b8f444ce48decc1e53514e983768f93cadc0c4cf..45fe472ef798eaa607cc3261826e98418a775180 100644 (file)
@@ -2698,7 +2698,7 @@ dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
   echo $ECHO_N "checking for prefix by $ECHO_C" >&AC_FD_MSG
   AC_PATH_PROG(m4_quote(AC_Prog), [$1])
   if test -n "$ac_cv_path_[]AC_Prog"; then
-    prefix=`AS_DIRNAME([$ac_cv_path_[]AC_Prog])`
+    prefix=`AS_DIRNAME(["$ac_cv_path_[]AC_Prog"])`
   fi
 fi
 m4_popdef([AC_Prog])dnl
@@ -4273,9 +4273,9 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
   esac
 
   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-  ac_dir=`AS_DIRNAME("$ac_file")`
+  ac_dir=`AS_DIRNAME(["$ac_file"])`
   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    AS_MKDIR_P("$ac_dir")
+    AS_MKDIR_P(["$ac_dir"])
     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
     # A "../" for each directory in $ac_dir_suffix.
     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[[^/]]*,../,g'`
@@ -4595,9 +4595,9 @@ cat >>$CONFIG_STATUS <<\EOF
     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
       echo "$ac_file is unchanged"
     else
-      ac_dir=`AS_DIRNAME("$ac_file")`
+      ac_dir=`AS_DIRNAME(["$ac_file"])`
       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-        AS_MKDIR_P("$ac_dir")
+        AS_MKDIR_P(["$ac_dir"])
       fi
       rm -f $ac_file
       mv $tmp/config.h $ac_file
@@ -4646,9 +4646,9 @@ for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
   rm -f $ac_dest
 
   # Make relative symlinks.
-  ac_dest_dir=`AS_DIRNAME("$ac_dest")`
+  ac_dest_dir=`AS_DIRNAME(["$ac_dest"])`
   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
-    AS_MKDIR_P("$ac_dest_dir")
+    AS_MKDIR_P(["$ac_dest_dir"])
     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's,^\./,,'`"
     # A "../" for each directory in $ac_dest_dir_suffix.
     ac_dots=`echo $ac_dest_dir_suffix|sed 's,/[[^/]]*,../,g'`
@@ -4757,10 +4757,10 @@ AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
     echo configuring in $ac_subdir
     case $srcdir in
     .) ;;
-    *) AS_MKDIR_P(./$ac_subdir)
+    *) AS_MKDIR_P(["./$ac_subdir"])
        if test -d ./$ac_subdir; then :;
        else
-         AC_MSG_ERROR(cannot create `pwd`/$ac_subdir)
+         AC_MSG_ERROR([cannot create `pwd`/$ac_subdir])
        fi
        ;;
     esac
index b8f444ce48decc1e53514e983768f93cadc0c4cf..45fe472ef798eaa607cc3261826e98418a775180 100644 (file)
@@ -2698,7 +2698,7 @@ dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
   echo $ECHO_N "checking for prefix by $ECHO_C" >&AC_FD_MSG
   AC_PATH_PROG(m4_quote(AC_Prog), [$1])
   if test -n "$ac_cv_path_[]AC_Prog"; then
-    prefix=`AS_DIRNAME([$ac_cv_path_[]AC_Prog])`
+    prefix=`AS_DIRNAME(["$ac_cv_path_[]AC_Prog"])`
   fi
 fi
 m4_popdef([AC_Prog])dnl
@@ -4273,9 +4273,9 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
   esac
 
   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-  ac_dir=`AS_DIRNAME("$ac_file")`
+  ac_dir=`AS_DIRNAME(["$ac_file"])`
   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    AS_MKDIR_P("$ac_dir")
+    AS_MKDIR_P(["$ac_dir"])
     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
     # A "../" for each directory in $ac_dir_suffix.
     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[[^/]]*,../,g'`
@@ -4595,9 +4595,9 @@ cat >>$CONFIG_STATUS <<\EOF
     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
       echo "$ac_file is unchanged"
     else
-      ac_dir=`AS_DIRNAME("$ac_file")`
+      ac_dir=`AS_DIRNAME(["$ac_file"])`
       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-        AS_MKDIR_P("$ac_dir")
+        AS_MKDIR_P(["$ac_dir"])
       fi
       rm -f $ac_file
       mv $tmp/config.h $ac_file
@@ -4646,9 +4646,9 @@ for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
   rm -f $ac_dest
 
   # Make relative symlinks.
-  ac_dest_dir=`AS_DIRNAME("$ac_dest")`
+  ac_dest_dir=`AS_DIRNAME(["$ac_dest"])`
   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
-    AS_MKDIR_P("$ac_dest_dir")
+    AS_MKDIR_P(["$ac_dest_dir"])
     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's,^\./,,'`"
     # A "../" for each directory in $ac_dest_dir_suffix.
     ac_dots=`echo $ac_dest_dir_suffix|sed 's,/[[^/]]*,../,g'`
@@ -4757,10 +4757,10 @@ AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
     echo configuring in $ac_subdir
     case $srcdir in
     .) ;;
-    *) AS_MKDIR_P(./$ac_subdir)
+    *) AS_MKDIR_P(["./$ac_subdir"])
        if test -d ./$ac_subdir; then :;
        else
-         AC_MSG_ERROR(cannot create `pwd`/$ac_subdir)
+         AC_MSG_ERROR([cannot create `pwd`/$ac_subdir])
        fi
        ;;
     esac
index e62e1701369d03aee94277cc2d97433383ab83e9..7817aeeae0a4fb9287878311efb6694b8dcc70a1 100644 (file)
@@ -133,7 +133,7 @@ m4_define([AS_MKDIR_P],
   [[\\/]]* | ?:[[\\/]]* ) ac_incr_dir=;;
   *)                      ac_incr_dir=.;;
 esac
-ac_dummy="$1"
+ac_dummy=$1
 for ac_mkdir_dir in `IFS=/; set X $ac_dummy; shift; echo "$[@]"`; do
   ac_incr_dir=$ac_incr_dir/$ac_mkdir_dir
   test -d $ac_incr_dir || mkdir $ac_incr_dir
@@ -160,7 +160,7 @@ m4_define([AS_DIRNAME_EXPR],
       .     : '\(.\)'])
 
 m4_define([AS_DIRNAME_SED],
-[echo "X[]$1" |
+[echo X[]$1 |
     sed ['/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
          /^X\(\/\/\)$/{ s//\1/; q; }
diff --git a/m4sh.m4 b/m4sh.m4
index e62e1701369d03aee94277cc2d97433383ab83e9..7817aeeae0a4fb9287878311efb6694b8dcc70a1 100644 (file)
--- a/m4sh.m4
+++ b/m4sh.m4
@@ -133,7 +133,7 @@ m4_define([AS_MKDIR_P],
   [[\\/]]* | ?:[[\\/]]* ) ac_incr_dir=;;
   *)                      ac_incr_dir=.;;
 esac
-ac_dummy="$1"
+ac_dummy=$1
 for ac_mkdir_dir in `IFS=/; set X $ac_dummy; shift; echo "$[@]"`; do
   ac_incr_dir=$ac_incr_dir/$ac_mkdir_dir
   test -d $ac_incr_dir || mkdir $ac_incr_dir
@@ -160,7 +160,7 @@ m4_define([AS_DIRNAME_EXPR],
       .     : '\(.\)'])
 
 m4_define([AS_DIRNAME_SED],
-[echo "X[]$1" |
+[echo X[]$1 |
     sed ['/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
          /^X\(\/\/\)$/{ s//\1/; q; }
index d1ab5be961b34ef9dcd214c0834d1b7b2ca6a67d..5e6e2e7a3a04344b6d48b9f5e997ab8af4e6027b 100644 (file)
@@ -7,36 +7,6 @@ Autoshell.
 EOF
 
 
-## ------------ ##
-## AS_MKDIR_P.  ##
-## ------------ ##
-
-# Build nested dirs.
-
-AT_SETUP(AC_SHELL_MKDIR_P)
-
-AT_DATA(configure.in,
-[[AC_PLAIN_SCRIPT
-pwd=`pwd`
-set -e
-# Absolute
-AS_MKDIR_P($pwd/1/2/3/4/5/6)
-test -d $pwd/1/2/3/4/5/6 ||
-  AC_MSG_ERROR([$pwd/1/2/3/4/5/6 has not been properly created])
-# Relative
-AS_MKDIR_P(a/b/c/d/e/f)
-test -d a/b/c/d/e/f ||
-  AC_MSG_ERROR([a/b/c/d/e/f has not been properly created])
-AS_EXIT(0)
-]])
-
-AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir], 0, [], [])
-AT_CHECK([./configure], 0)
-
-AT_CLEANUP(configure 1 a)
-
-
-
 ## ----------------------------- ##
 ## AS_DIRNAME & AS_DIRNAME_SED.  ##
 ## ----------------------------- ##
@@ -102,7 +72,37 @@ AS_DIRNAME_SED_TEST([../../2//3/],  [../../2])
 AS_EXIT(0)
 ]])
 
-AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir], 0, [], [])
+AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir], 0, [], [])
 AT_CHECK([./configure], 0)
 
 AT_CLEANUP(configure)
+
+
+
+## ------------ ##
+## AS_MKDIR_P.  ##
+## ------------ ##
+
+# Build nested dirs.
+
+AT_SETUP(AC_SHELL_MKDIR_P)
+
+AT_DATA(configure.in,
+[[AC_PLAIN_SCRIPT
+pwd=`pwd`
+set -e
+# Absolute
+AS_MKDIR_P(["$pwd/1/2/3/4/5/6"])
+test -d "$pwd/1/2/3/4/5/6" ||
+  AC_MSG_ERROR([$pwd/1/2/3/4/5/6 has not been properly created])
+# Relative
+AS_MKDIR_P(["a/b/c/d/e/f"])
+test -d a/b/c/d/e/f ||
+  AC_MSG_ERROR([a/b/c/d/e/f has not been properly created])
+AS_EXIT(0)
+]])
+
+AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir], 0, [], [])
+AT_CHECK([./configure], 0)
+
+AT_CLEANUP(configure 1 a)