[gnome-documents] build: Port away from gnome-autogen.sh
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] build: Port away from gnome-autogen.sh
- Date: Wed, 23 Aug 2017 11:05:08 +0000 (UTC)
commit 758385e0a7ad2177cecb03dafccdb8e8aafef65f
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Aug 17 11:42:53 2017 +0200
build: Port away from gnome-autogen.sh
The AX_COMPILER_FLAGS macro wasn't used. It kept breaking the build due
to its inability to install the AX_COMPILER_FLAGS_CXXFLAGS macro. I
don't know why.
See: https://wiki.gnome.org/Projects/GnomeCommon/Migration
https://bugzilla.gnome.org/show_bug.cgi?id=786418
autogen.sh | 54 ++++++++++++++++++++++++++++++++----------------------
configure.ac | 8 ++++++--
2 files changed, 38 insertions(+), 24 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index e008406..77e683f 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,32 +1,42 @@
#!/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)
-olddir=`pwd`
+cd $srcdir
-PKG_NAME="gnome-documents"
-ACLOCAL_FLAGS="-I libgd $ACLOCAL_FLAGS"
-
-(test -f $srcdir/src/main.js) || {
- echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
- echo " top-level $PKG_NAME directory"
- exit 1
+(test -f configure.ac) || {
+ echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***"
+ exit 1
}
-which gnome-autogen.sh || {
- echo "You need to install gnome-common from the GNOME git"
- 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
-# We need to run git submodule update inside the src directory
-cd "$srcdir"
-git submodule update --init --recursive
+git submodule update --init --recursive || exit 1
+
+aclocal --install || exit 1
+intltoolize --force --copy --automake || exit 1
+autoreconf --verbose --force --install || exit 1
cd "$olddir"
-REQUIRED_AUTOCONF_VERSION=2.59
-REQUIRED_AUTOMAKE_VERSION=1.9
-REQUIRED_INTLTOOL_VERSION=0.40.0
-REQUIRED_PKG_CONFIG_VERSION=0.22
-. gnome-autogen.sh
+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
diff --git a/configure.ac b/configure.ac
index 328d906..857b31d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,12 +15,16 @@ AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([1.11 dist-xz no-dist-gzip tar-ustar foreign])
AM_MAINTAINER_MODE([enable])
+AX_IS_RELEASE([git-directory])
+AX_CHECK_ENABLE_DEBUG([yes],,, [$ax_is_release])
+
GETTEXT_PACKAGE=AC_PACKAGE_NAME
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The name of the gettext domain])
IT_PROG_INTLTOOL(0.50.1)
PKG_PROG_PKG_CONFIG([0.22])
+AX_REQUIRE_DEFINED([YELP_HELP_INIT])
YELP_HELP_INIT
GOBJECT_INTROSPECTION_REQUIRE([0.9.6])
@@ -43,7 +47,9 @@ AC_PROG_LIBTOOL
## don't rerun to this point if we abort
AC_CACHE_SAVE
+AX_REQUIRE_DEFINED([GLIB_GSETTINGS])
GLIB_GSETTINGS
+
GETTING_STARTED_INIT
AC_CHECK_LIBM
@@ -147,6 +153,4 @@ echo "
prefix: ${prefix}
compiler: ${CC}
-
- Now type 'make' to build $PACKAGE
"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]