The fixed (quoted) patch.
ChangeLog entry:
2000-06-27 Lars J. Aas <[EMAIL PROTECTED]>
* acgeneral.m4: create subdirs, including parent directories that
don't exist already.
Index: acgeneral.m4
===================================================================
RCS file: /cvs/autoconf/acgeneral.m4,v
retrieving revision 1.497
diff -u -r1.497 acgeneral.m4
--- acgeneral.m4 2000/06/26 10:57:46 1.497
+++ acgeneral.m4 2000/06/27 18:18:39
@@ -4488,10 +4488,19 @@
# Remove last slash and all that follows it. Not all systems have dirname.
ac_dir=`echo "$ac_file" | sed 's%/[[^/][^/]]*$%%'`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
-dnl FIXME: should actually be mkinstalldirs (parents may have
-dnl to be created too).
- test -d "$ac_dir" || mkdir "$ac_dir"
+ # The file is in a subdirectory. Create subdir, including parents.
+ if test ! -d "$ac_dir"; then
+ save_IFS=$IFS
+ IFS="/"
+ set $ac_dir
+ IFS=$save_IFS
+ ac_workdir="[$]1"
+ while test [$]# -gt 0; do
+ test ! -d "$ac_workdir" && mkdir "$ac_workdir"
+ shift
+ ac_workdir="$ac_workdir/[$]1"
+ done
+ fi
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'`
@@ -4758,10 +4767,19 @@
# Remove last slash and all that follows it. Not all systems have dirname.
ac_dir=`echo "$ac_file" | sed 's%/[[^/][^/]]*$%%'`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
-dnl FIXME: should actually be mkinstalldirs (parents may have
-dnl to be created too).
- test -d "$ac_dir" || mkdir "$ac_dir"
+ # The file is in a subdirectory. Create subdir, including parents.
+ if test ! -d "$ac_dir"; then
+ save_IFS=$IFS
+ IFS="/"
+ set $ac_dir
+ IFS=$save_IFS
+ ac_workdir="[$]1"
+ while test [$]# -gt 0; do
+ test ! -d "$ac_workdir" && mkdir "$ac_workdir"
+ shift
+ ac_workdir="$ac_workdir/[$]1"
+ done
+ fi
fi
rm -f $ac_file
mv $tmp/config.h $ac_file