Adjust callers.
Reported by Paul Eggert.
* tests/m4sh.at: Sort.
+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".
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
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'`
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
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'`
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
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
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'`
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
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'`
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
[[\\/]]* | ?:[[\\/]]* ) 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
. : '\(.\)'])
m4_define([AS_DIRNAME_SED],
-[echo "X[]$1" |
+[echo X[]$1 |
sed ['/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
[[\\/]]* | ?:[[\\/]]* ) 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
. : '\(.\)'])
m4_define([AS_DIRNAME_SED],
-[echo "X[]$1" |
+[echo X[]$1 |
sed ['/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
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. ##
## ----------------------------- ##
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)