[alacarte] build: don't use gnome-autogen.sh
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [alacarte] build: don't use gnome-autogen.sh
- Date: Mon, 21 Mar 2022 12:13:31 +0000 (UTC)
commit f609501337b17c4ec34e8fbbc3f08859d14ea94d
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Mon Mar 21 14:13:11 2022 +0200
build: don't use gnome-autogen.sh
https://wiki.gnome.org/Projects/GnomeCommon/Migration
Makefile.am | 2 +-
autogen.sh | 70 +++++++++++++++++++++++++++++-------------------------------
configure.ac | 5 ++---
3 files changed, 37 insertions(+), 40 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index a094252..5c77fb1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,6 +36,7 @@ MAINTAINERCLEANFILES = \
$(srcdir)/INSTALL \
$(srcdir)/config.h.in~ \
$(srcdir)/configure \
+ $(srcdir)/build-aux/py-compile \
$(srcdir)/po/Makefile.in.in \
$(srcdir)/po/Makevars.template \
$(srcdir)/po/Rules-quot \
@@ -47,7 +48,6 @@ MAINTAINERCLEANFILES = \
$(srcdir)/po/quot.sed \
$(srcdir)/po/remove-potcdate.sin \
$(srcdir)/po/stamp-po \
- $(srcdir)/py-compile \
$(NULL)
ChangeLog:
diff --git a/autogen.sh b/autogen.sh
index b30cd59..8abcdc9 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,44 +1,42 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
-srcdir=`dirname $0`
+srcdir=$(dirname "$0")
test -z "$srcdir" && srcdir=.
-PKG_NAME="alacarte"
-REQUIRED_AUTOCONF_VERSION=2.53
-REQUIRED_AUTOMAKE_VERSION=${REQUIRED_AUTOMAKE_VERSION:-1.9}
-
-(test -f $srcdir/configure.ac \
- && test -f $srcdir/autogen.sh) || {
- echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
- echo " top-level $PKG_NAME directory"
- exit 1
-}
-
-DIE=0
-
-# This is a bit complicated here since we can't use gnome-config yet.
-# It'll be easier after switching to pkg-config since we can then
-# use pkg-config to find the gnome-autogen.sh script.
-
-gnome_autogen=
-gnome_datadir=
-
-ifs_save="$IFS"; IFS=":"
-for dir in $PATH ; do
- test -z "$dir" && dir=.
- if test -f $dir/gnome-autogen.sh ; then
- gnome_autogen="$dir/gnome-autogen.sh"
- gnome_datadir=`echo $dir | sed -e 's,/bin$,/share,'`
- break
- fi
-done
-IFS="$ifs_save"
-
-if test -z "$gnome_autogen" ; then
- echo "You need to install the gnome-common module and make"
- echo "sure the gnome-autogen.sh script is in your \$PATH."
+if [ ! -f $srcdir/configure.ac ]; then
+ echo "**Error**: Directory "\'$srcdir\'" does not look like the top-level" \
+ "project directory."
exit 1
fi
-GNOME_DATADIR="$gnome_datadir" USE_GNOME2_MACROS=1 . $gnome_autogen
+olddir=$(pwd)
+cd "$srcdir"
+
+PKG_NAME=$(autoconf --trace 'AC_INIT:$1' "$srcdir/configure.ac")
+
+if [ "$#" = 0 ] && [ -z "$NOCONFIGURE" ]; 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 '$0'" \
+ "command line." >&2
+fi
+
+set -x
+autoreconf --verbose --force --install || exit 1
+{ set +x; } 2>/dev/null
+
+cd "$olddir"
+
+if [ -z "$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
+ fi
+else
+ echo "Skipping configure process."
+fi
diff --git a/configure.ac b/configure.ac
index df4c8f0..a1bb63b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,12 +5,11 @@ AC_INIT(alacarte, 3.44.0, http://bugzilla.gnome.org/enter_bug.cgi?product=alacar
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_CONFIG_SRCDIR(alacarte.in)
AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([1.7 no-dist-gzip dist-xz])
AM_MAINTAINER_MODE
-dnl put the ACLOCAL flags in the makefile
-ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
-
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.19.8])
AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.8])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]