[libgames-support] Update autogen.sh from GNOME recommendation
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgames-support] Update autogen.sh from GNOME recommendation
- Date: Sun, 31 Jul 2016 01:20:56 +0000 (UTC)
commit 4e5c055356cbedca4f8e79b9d60b5dd2299ca0df
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sat Jul 30 20:19:27 2016 -0500
Update autogen.sh from GNOME recommendation
Our only difference is to enable the style checker
https://wiki.gnome.org/Projects/GnomeCommon/Migration
autogen.sh | 30 ++++++++++++++++--------------
1 files changed, 16 insertions(+), 14 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index 8e72e2d..2b33e32 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,10 +1,14 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
+test -n "$srcdir" || srcdir=$(dirname "$0")
+test -n "$srcdir" || srcdir=.
-(test -f $srcdir/configure.ac) || {
- echo "**Error**: Directory "\`$srcdir\'" does not look like the top-level project directory"
+olddir=$(pwd)
+
+cd $srcdir
+
+(test -f configure.ac) || {
+ echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***"
exit 1
}
@@ -18,27 +22,25 @@ if [ -d $srcdir/.git ]; then
done
fi
-PKG_NAME=`autoconf --trace 'AC_INIT:$1' "$srcdir/configure.ac"`
+# 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 "*** 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
-set -x
aclocal --install || exit 1
-autoreconf --verbose --force --install -Wno-portability || exit 1
-{ set +x; } 2>/dev/null
+autoreconf --verbose --force --install || exit 1
+cd "$olddir"
if [ "$NOCONFIGURE" = "" ]; then
- set -x
$srcdir/configure "$@" || exit 1
- { set +x; } 2>/dev/null
if [ "$1" = "--help" ]; then exit 0 else
- echo "Now type \`make\' to compile $PKG_NAME" || exit 1
+ echo "Now type 'make' to compile $PKG_NAME" || exit 1
fi
else
echo "Skipping configure process."
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]