exit immediately if aclocal, autoheader, automake, or autoconf fails,
authorDan Winship <danw@src.gnome.org>
Sat, 17 Jun 2000 21:00:40 +0000 (21:00 +0000)
committerDan Winship <danw@src.gnome.org>
Sat, 17 Jun 2000 21:00:40 +0000 (21:00 +0000)
* autogen.sh: exit immediately if aclocal, autoheader, automake,
or autoconf fails, rather than continuing on with broken state.
(In the aclocal case, print a hopefully-useful explanatory
message.)

svn path=/trunk/; revision=1277

macros/ChangeLog
macros/autogen.sh

index ac39413..5122c16 100644 (file)
@@ -1,3 +1,10 @@
+2000-06-17  Dan Winship  <danw@helixcode.com>
+
+       * autogen.sh: exit immediately if aclocal, autoheader, automake,
+       or autoconf fails, rather than continuing on with broken state.
+       (In the aclocal case, print a hopefully-useful explanatory
+       message.)
+
 2000-06-13  Martin Baulig  <baulig@suse.de>
 
        * gnome-bonobo-check.am (AM_BONOBO_USES_OAF): New macro.
index 18cfd60..a649be9 100644 (file)
@@ -145,16 +145,26 @@ do
        fi
       fi
       echo "Running aclocal $aclocalinclude ..."
-      aclocal $aclocalinclude
+      aclocal $aclocalinclude || {
+       echo
+       echo "**Error**: aclocal failed. This may mean that you have not"
+       echo "installed all of the packages you need, or you may need to"
+       echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
+       echo "for the prefix where you installed the packages whose"
+       echo "macros were not found"
+       exit 1
+      }
+
       if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
        echo "Running autoheader..."
-       autoheader
+       autoheader || { echo "**Error**: autoheader failed."; exit 1; }
       fi
       echo "Running automake --gnu $am_opt ..."
-      automake --add-missing --gnu $am_opt
+      automake --add-missing --gnu $am_opt ||
+       { echo "**Error**: automake failed."; exit 1; }
       echo "Running autoconf ..."
-      autoconf
-    )
+      autoconf || { echo "**Error**: autoconf failed."; exit 1; }
+    ) || exit 1
   fi
 done