[accerciser/jjardon/gnome-common-remove] Use autoreconf instead deprecated gnome-autogen



commit 3976c3a5b978d38218871d3ffba0dcdd0e777bfb
Author: Javier Jardón <jjardon gnome org>
Date:   Sat Feb 9 11:46:30 2019 +0000

    Use autoreconf instead deprecated gnome-autogen
    
    See https://wiki.gnome.org/Projects/GnomeCommon/Migration

 autogen.sh | 42 +++++++++++++++++++++++++++++++++---------
 1 file changed, 33 insertions(+), 9 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index 1b9420f..d9d12ec 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,14 +1,38 @@
-# Calls gnome-autogen to build Makefiles and run configure
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+test -n "$srcdir" || srcdir=$(dirname "$0")
+test -n "$srcdir" || srcdir=.
 
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
+olddir=$(pwd)
 
+cd $srcdir
 
-GNOMEDOC=`which yelp-build`
-if test -z $GNOMEDOC; then
-echo "*** The tools to build the documentation are not found,"
-echo " please install the yelp-tool package ***"
+(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
 
-REQUIRED_AUTOMAKE_VERSION=1.7.2
-USE_GNOME2_MACROS=1 . gnome-autogen.sh
+autoreconf --verbose --force --install || exit 1
+
+cd "$olddir"
+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]