check return code of mkdir, print error message on failure. addresses bug #2079
authorK. Richard Pixley <rich@cygnus>
Mon, 1 Feb 1993 20:39:43 +0000 (20:39 +0000)
committerK. Richard Pixley <rich@cygnus>
Mon, 1 Feb 1993 20:39:43 +0000 (20:39 +0000)
ChangeLog
configure

index 5e876bea91a35b3d920f31d403e072981b0bc3d9..cfdbf29d5811d4789fae130a5a04cb0a5e7cffaf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Feb  1 12:35:41 1993  K. Richard Pixley  (rich@rtl.cygnus.com)
+
+       * configure: check return code from mkdir, print error message and
+         exit on failure.
+
 Sat Jan 30 16:40:28 1993  John Gilmore  (gnu@cygnus.com)
 
        * Makefile.in (make-gdb.tar.Z):  New location for texinfo.tex.
index add8d6bc486dc63b0a906c84c5d0f7e5e4141af7..a4d173b6a9fcc8b45322f4d23b6ca2b5a24401f8 100755 (executable)
--- a/configure
+++ b/configure
@@ -561,7 +561,12 @@ for subdir in . ${subdirs} ; do
     fi
 
     if [ ! -d ${subdir} ] ; then
-       mkdir ${subdir}
+       if mkdir ${subdir} ; then
+               true
+        else
+               echo '***' "${progname}: could not make ${PWD=`pwd`}/${subdir}" 1>&2
+               exit 1
+        fi
     fi
 
     case "${removing}" in
@@ -815,14 +820,19 @@ done
 # If there are subdirectories, then recur. 
 if [ -z "${norecursion}" -a -n "${configdirs}" ] ; then 
        for configdir in ${configdirs} ; do
-               eval echo Configuring ${configdir}... ${redirect}
 
                if [ -d ${srcdir}/${configdir} ] ; then
+                       eval echo Configuring ${configdir}... ${redirect}
                        case "${srcdir}" in
                        ".") ;;
                        *)
                                if [ ! -d ./${configdir} ] ; then
-                                       mkdir ./${configdir}
+                                       if mkdir ./${configdir} ; then
+                                               true
+                                       else
+                                               echo '***' "${progname}: could not make ${PWD=`pwd`}/${configdir}" 1>&2
+                                               exit 1
+                                       fi
                                fi
                                ;;
                        esac
@@ -863,8 +873,6 @@ if [ -z "${norecursion}" -a -n "${configdirs}" ] ; then
                        fi
 
                        cd ${POPDIR}
-               else
-                       eval echo Warning: source directory \"${srcdir}/${configdir}\" is missing. ${redirect}
                fi
        done
 fi