From 1657b33535573211422ee3240255ddd24f0015da Mon Sep 17 00:00:00 2001 From: h_vogt Date: Sun, 1 Aug 2010 19:02:23 +0000 Subject: [PATCH] update: remove goto --- ChangeLog | 3 +++ autogen.sh | 25 +++++++++++++------------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 156a19a68..50cefefb7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2010-08-01 Holger Vogt + * autogen.sh: update for adms + 2010-08-01 Robert Larice * src/pkgIndex.tcl.in , * src/tclspice.c , diff --git a/autogen.sh b/autogen.sh index 18ee89a11..4b95a32af 100755 --- a/autogen.sh +++ b/autogen.sh @@ -41,6 +41,14 @@ echo "$PROJECT autogen.sh 1.0" echo } +end_on_error() +{ +if test "$ADMS" -eq 1; then + mv configure.temp configure.in +fi + +exit 1 +} check_autoconf() { @@ -170,27 +178,27 @@ fi echo "Running libtoolize" libtoolize --copy --force -if [ $? -ne 0 ];then echo "libtoolize failed"; goto errorhandler ; fi +if [ $? -ne 0 ];then echo "libtoolize failed"; end_on_error ; fi echo "Running aclocal $ACLOCAL_FLAGS" aclocal $ACLOCAL_FLAGS -if [ $? -ne 0 ]; then echo "aclocal failed"; goto errorhandler ; fi +if [ $? -ne 0 ]; then echo "aclocal failed"; end_on_error ; fi # optional feature: autoheader (autoheader --version) < /dev/null > /dev/null 2>&1 if [ $? -eq 0 ]; then echo "Running autoheader" autoheader - if [ $? -ne 0 ]; then echo "autoheader failed"; goto errorhandler ; fi + if [ $? -ne 0 ]; then echo "autoheader failed"; end_on_error ; fi fi echo "Running automake -Wall --copy --add-missing" automake -Wall --copy --add-missing $am_opt -if [ $? -ne 0 ]; then echo "automake failed"; goto errorhandler ; fi +if [ $? -ne 0 ]; then echo "automake failed"; end_on_error ; fi echo "Running autoconf" autoconf -if [ $? -ne 0 ]; then echo "autoconf failed"; goto errorhandler ; fi +if [ $? -ne 0 ]; then echo "autoconf failed"; end_on_error ; fi if test "$ADMS" -eq 1; then mv configure.temp configure.in @@ -199,10 +207,3 @@ fi echo "Success." exit 0 - -errorhandler: -if test "$ADMS" -eq 1; then - mv configure.temp configure.in -fi - -exit 1 \ No newline at end of file