[gitg] Small autogen.sh improvements
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Small autogen.sh improvements
- Date: Sat, 26 Nov 2016 09:58:38 +0000 (UTC)
commit 92c76a5570da1d4c9404770941e0b03d5ae0e694
Author: Jesse van den Kieboom <jessevdk gnome org>
Date: Sat Nov 26 10:58:04 2016 +0100
Small autogen.sh improvements
autogen.sh | 58 +++++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 41 insertions(+), 17 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index fced2c9..0c3ecd7 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -7,38 +7,62 @@ test -n "$srcdir" || srcdir=.
olddir=`pwd`
cd "$srcdir"
-INTLTOOLIZE=`which intltoolize`
-if test -z $INTLTOOLIZE; then
- echo "*** No intltoolize found, please install the intltool 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
+ACLOCAL=`which aclocal`
+INTLTOOLIZE=`which intltoolize`
AUTORECONF=`which autoreconf`
-if test -z $AUTORECONF; then
- echo "*** No autoreconf found, please install it ***"
+LIBTOOL=`which libtoolize`
+
+if test -z $ACLOCAL; then
+ echo "*** No aclocal found, please install it ***"
exit 1
fi
-if test -z `which autopoint`; then
- echo "*** No autopoint found, please install it ***"
+if test -z $INTLTOOLIZE; then
+ echo "*** No intltoolize found, please install the intltool package ***"
exit 1
fi
-LIBTOOL=`which libtoolize`
-if test -z $LIBTOOL; then
- echo "*** No libtool found, please install it ***"
+if test -z $AUTORECONF; then
+ echo "*** No autoreconf found, please install it ***"
exit 1
fi
-git submodule update --init --recursive
+if ! test -z `which git` && test -d .git; then
+ git submodule update --init --recursive
-if [ $? != 0 ]; then
- echo "*** Failed to download submodules. Maybe you have a bad connection or a submodule was not forked?"
- exit 1
+ if [ $? != 0 ]; then
+ echo "*** Failed to download submodules. Maybe you have a bad connection or a submodule was
not forked?"
+ exit 1
+ fi
fi
-autopoint --force
-AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install --verbose
+aclocal --install || exit 1
+intltoolize --force --copy --automake || exit 1
+autoreconf --verbose --force --install || 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]