[dconf-editor] Update autogen.sh file.



commit 807d5b7224423a1e79a3828f3f1f98653f386aa0
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Sun Jan 1 08:13:46 2017 +0100

    Update autogen.sh file.

 autogen.sh |   31 +++++++++++++++++++++++++------
 1 files changed, 25 insertions(+), 6 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index f2bcbf5..85ae182 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,17 +1,31 @@
 #!/bin/sh
 
+# See template at https://wiki.gnome.org/Projects/GnomeCommon/Migration
+
+# Exit if a single command fails
 set -e
 
+# Run this to generate all the initial makefiles, etc.
 test -n "$srcdir" || srcdir=`dirname "$0"`
 test -n "$srcdir" || srcdir=.
 
 olddir=`pwd`
+
 cd "$srcdir"
 
-if automake-1.11 --version > /dev/null 2>&1; then
-  automake_suffix='-1.11'
-else
-  automake_suffix=''
+(test -f configure.ac) || {
+        echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***"
+        exit 1
+}
+
+# shellcheck disable=SC2016
+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=`which autoreconf`
@@ -27,7 +41,12 @@ export CFLAGS LDFLAGS
 autoreconf --force --install --verbose
 
 cd "$olddir"
+if [ "$NOCONFIGURE" = "" ]; then
+        $srcdir/configure "$@" || exit 1
 
-if test -z "$NOCONFIGURE"; then
-  "$srcdir"/configure "$@"
+        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]