[gvfs] build: Use autoreconf instead custom script
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] build: Use autoreconf instead custom script
- Date: Thu, 11 Aug 2016 06:20:30 +0000 (UTC)
commit c641009dec6873aed9bbc00c74936263148b5d4c
Author: Javier Jardón <jjardon gnome org>
Date: Tue Jul 12 01:24:10 2016 +0100
build: Use autoreconf instead custom script
The patch uses autogen.sh template from:
https://wiki.gnome.org/Projects/GnomeCommon/Migration
Modified by Ondrej Holy.
https://bugzilla.gnome.org/show_bug.cgi?id=768707
.gitignore | 1 +
autogen.sh | 135 +++++++++++-------------------------------------------------
2 files changed, 25 insertions(+), 111 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index da256a1..3f0d0cf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -44,3 +44,4 @@ common/gvfsdbus.*
man/*.1
man/*.7
test-driver
+INSTALL
diff --git a/autogen.sh b/autogen.sh
index c7b81cf..bc7661a 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,126 +1,39 @@
#!/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)
-ORIGDIR=`pwd`
cd $srcdir
-PROJECT=GVfs
-TEST_TYPE=-f
-FILE=client/gdaemonvfs.h
-DIE=0
-
-have_libtool=false
-if libtoolize --version < /dev/null > /dev/null 2>&1 ; then
- libtool_version=`libtoolize --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
- case $libtool_version in
- 1.4*|1.5*|2.2*|2.4*)
- have_libtool=true
- ;;
- esac
-fi
-if $have_libtool ; then : ; else
- echo
- echo "You must have libtool 1.4 installed to compile $PROJECT."
- echo "Install the appropriate package for your distribution,"
- echo "or get the source tarball at http://ftp.gnu.org/gnu/libtool/"
- DIE=1
-fi
-
-(intltoolize --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "You must have intltool installed to compile $PROJECT."
- echo "Install the appropriate package for your distribution,"
- echo "or get the source tarball at http://ftp.gnome.org/pub/GNOME/sources/intltool"
- DIE=1
-}
-
-(gtkdocize --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "You must have gtk-doc installed to compile $PROJECT."
- echo "Install the appropriate package for your distribution,"
- echo "or get the source tarball at http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
- DIE=1
+(test -f configure.ac) || {
+ echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***"
+ exit 1
}
-(autoconf --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "You must have autoconf installed to compile $PROJECT."
- echo "Install the appropriate package for your distribution,"
- echo "or get the source tarball at http://ftp.gnu.org/gnu/autoconf/"
- DIE=1
-}
+# shellcheck disable=SC2016
+PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac)
-if automake --version < /dev/null > /dev/null 2>&1 ; then
- AUTOMAKE=automake
- ACLOCAL=aclocal
-else
- echo
- echo "You must have automake 1.7.x installed to compile $PROJECT."
- echo "Install the appropriate package for your distribution,"
- echo "or get the source tarball at http://ftp.gnu.org/gnu/automake/"
- DIE=1
+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
-if test "$DIE" -eq 1; then
- exit 1
-fi
+aclocal --install || exit 1
+gtkdocize --copy || exit 1
+intltoolize --force --copy --automake || exit 1
+autoreconf --verbose --force --install || exit 1
-test $TEST_TYPE $FILE || {
- echo "You must run this script in the top-level $PROJECT directory"
- exit 1
-}
+cd "$olddir"
+if [ "$NOCONFIGURE" = "" ]; then
+ $srcdir/configure "$@" || exit 1
-if test -z "$AUTOGEN_SUBDIR_MODE"; then
- if test -z "$*"; then
- echo "I am going to run ./configure with no arguments - if you wish "
- echo "to pass any to it, please specify them on the $0 command line."
+ if [ "$1" = "--help" ]; then exit 0 else
+ echo "Now type 'make' to compile $PKG_NAME" || exit 1
fi
-fi
-
-if test -z "$ACLOCAL_FLAGS"; then
-
- acdir=`$ACLOCAL --print-ac-dir`
- m4list="glib-2.0.m4 glib-gettext.m4"
-
- for file in $m4list
- do
- if [ ! -f "$acdir/$file" ]; then
- echo "WARNING: aclocal's directory is $acdir, but..."
- echo " no file $acdir/$file"
- echo " You may see fatal macro warnings below."
- echo " If these files are installed in /some/dir, set the ACLOCAL_FLAGS "
- echo " environment variable to \"-I /some/dir\", or install"
- echo " $acdir/$file."
- echo ""
- fi
- done
-fi
-
-rm -rf autom4te.cache
-
-# README and INSTALL are required by automake, but may be deleted by clean
-# up rules. to get automake to work, simply touch these here, they will be
-# regenerated from their corresponding *.in files by ./configure anyway.
-touch README INSTALL
-
-libtoolize --force --copy || exit $?
-intltoolize --force --copy --automake || exit $?
-gtkdocize --copy || exit $?
-
-$ACLOCAL $ACLOCAL_FLAGS || exit $?
-
-autoheader || exit $?
-
-$AUTOMAKE --add-missing || exit $?
-autoconf || exit $?
-cd $ORIGDIR || exit $?
-
-if test -z "$AUTOGEN_SUBDIR_MODE" && test -z "$NOCONFIGURE"; then
- $srcdir/configure $AUTOGEN_CONFIGURE_ARGS "$@" || exit $?
-
- echo
- echo "Now type 'make' to compile $PROJECT."
+else
+ echo "Skipping configure process."
fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]