[giggle] Modernize autogen.sh a bit



commit 21ff51663d61e58c0db88c52481f809fe71e353d
Author: Javier Jardón <jjardon gnome org>
Date:   Fri Nov 13 14:39:33 2015 +0000

    Modernize autogen.sh a bit
    
    As suggested in https://wiki.gnome.org/Projects/GnomeCommon/Migration

 autogen.sh |   34 ++++++++++++++++++++++------------
 1 files changed, 22 insertions(+), 12 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index ab25fef..0f50916 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,26 +1,36 @@
 #!/bin/sh
 # Run this to generate all the initial makefiles, etc.
-
 test -n "$srcdir" || srcdir=`dirname "$0"`
 test -n "$srcdir" || srcdir=.
 
 olddir=`pwd`
+
 cd $srcdir
 
-AUTORECONF=`which autoreconf`
-if test -z $AUTORECONF; then
-        echo "*** No autoreconf found, please install it ***"
+(test -f configure.ac) || {
+        echo "*** ERROR: Directory "\`$srcdir\'" does not look like the top-level project directory ***"
         exit 1
-fi
+}
 
-GNOMEDOC=`which yelp-build`
-if test -z $GNOMEDOC; then
-        echo "*** The tools to build the documentation are not found,"
-        echo "    please install the yelp-tools package ***"
-        exit 1
+PKG_NAME=`autoconf --trace 'AC_INIT:$1' configure.ac`
+
+if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
+        echo "*** WARNING: I am going to run \`configure' with no arguments." >&2
+        echo "*** If you wish to pass any to it, please specify them on the" >&2
+        echo "*** \`$0\' command line." >&2
+        echo "" >&2
 fi
 
-autoreconf --force --install --verbose || exit $?
+aclocal --install || exit 1
+autoreconf --verbose --force --install -Wno-portability || exit 1
 
 cd $olddir
-test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
+if [ "$NOCONFIGURE" = "" ]; then
+        $srcdir/configure "$@" || exit 1
+
+        if [ "$1" = "--help" ]; then exit 0 else
+                echo "Now type \`make\' to compile $PKG_NAME" || exit 1
+        fi
+else
+        echo "Skipping configure process."
+fi


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]