Commit 8a4ad11a authored by Rico Tzschichholz's avatar Rico Tzschichholz

build: Require gnome-common and build a proper Changelog

Includes further fixes for "make distcheck"
parent 82245d1b
......@@ -17,6 +17,7 @@ config.*
ABOUT-NLS
aclocal.m4
autom4te.cache
build-aux
ChangeLog
INSTALL
Makefile.in
......
......@@ -56,16 +56,24 @@ coverage-report: coverage
genhtml --title "@PACKAGE_STRING@" --output-directory $(top_builddir)/coverage $(top_builddir)/lcov.info
#endif
dist-hook: gen-ChangeLog
distclean-local:
if test "x$(srcdir)" = "x."; then :; else \
rm -f ChangeLog; \
fi
.PHONY: ChangeLog
gen_start_date = 2009-04-10
.PHONY: gen-ChangeLog
gen-ChangeLog:
if test -d .git; then \
$(top_srcdir)/gitlog-to-changelog \
--since=$(gen_start_date) > $(distdir)/cl-t; \
rm -f $(distdir)/ChangeLog; \
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
ChangeLog:
$(AM_V_GEN) if test -d "$(srcdir)/.git"; then \
$(top_srcdir)/gitlog-to-changelog --since=$(gen_start_date) > $@.tmp \
&& mv -f $@.tmp $@ \
|| ($(RM) $@.tmp; \
echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
(test -f $@ || echo git-log is required to generate this file >> $@)); \
else \
test -f $@ || \
(echo A git checkout and git-log is required to generate ChangeLog >&2 && \
echo A git checkout and git-log is required to generate this file >> $@); \
fi
functional-test:
......
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
#
# NOTE: compare_versions() is stolen from gnome-autogen.sh
REQUIRED_VALA_VERSION=0.18.0
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
# Usage:
# compare_versions MIN_VERSION ACTUAL_VERSION
# returns true if ACTUAL_VERSION >= MIN_VERSION
compare_versions() {
ch_min_version=$1
ch_actual_version=$2
ch_status=0
IFS="${IFS= }"; ch_save_IFS="$IFS"; IFS="."
set $ch_actual_version
for ch_min in $ch_min_version; do
ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes
if [ -z "$ch_min" ]; then break; fi
if [ -z "$ch_cur" ]; then ch_status=1; break; fi
if [ $ch_cur -gt $ch_min ]; then break; fi
if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi
done
IFS="$ch_save_IFS"
return $ch_status
}
# Vala version check
test -z "$VALAC" && VALAC=valac
VALA_VERSION=`$VALAC --version | cut -d" " -f2`
PKG_NAME="tracker"
if [ -z "$VALA_VERSION" ]; then
echo "**Error**: valac not installed or broken. You must have valac >= $REQUIRED_VALA_VERSION"
echo "installed to build."
(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
fi
}
echo "Found Vala $VALA_VERSION"
DIE=0
if ! compare_versions $REQUIRED_VALA_VERSION $VALA_VERSION; then
echo "**Error**: You must have valac >= $REQUIRED_VALA_VERSION installed to build, you have $VALA_VERSION"
exit 1
if ! which gnome-autogen.sh ; then
echo "You need to install the gnome-common module and make"
echo "sure the gnome-autogen.sh script is in your \$PATH."
exit 1
fi
# Generate required files
test -n "$srcdir" || srcdir=`dirname "$0"`
test -n "$srcdir" || srcdir=.
(
cd "$srcdir" &&
touch ChangeLog && # Automake requires that ChangeLog exist
gtkdocize --flavour no-tmpl &&
autopoint --force &&
AUTOPOINT='intltoolize --automake --copy' autoreconf --verbose --force --install
) || exit
test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
. gnome-autogen.sh
......@@ -47,6 +47,7 @@ AC_INIT([tracker],
[http://www.tracker-project.org])
AC_CONFIG_SRCDIR([src/tracker-store/tracker-main.vala])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
......@@ -504,24 +505,19 @@ PKG_CHECK_MODULES(TRACKER_NAUTILUS_EXTENSION, [$TRACKER_NAUTILUS_EXTENSION_REQUI
[have_tracker_nautilus_extension=no])
# Check we have Vala valac command we need
AC_PATH_PROG(VALAC, valac, valac)
if test -z $VALAC; then
AC_MSG_ERROR([Could not find 'valac'])
VALA_MIN_VERSION=0.18.0
AM_PROG_VALAC([$VALA_MIN_VERSION])
if test "x$VALAC" = "x"; then
AC_MSG_ERROR([Vala requested but valac >= $VALA_MIN_VERSION is not installed])
fi
AC_SUBST(VALAC)
####################################################################
# Check gettext/intltool support
####################################################################
IT_PROG_INTLTOOL([0.40.0])
AM_GNU_GETTEXT_VERSION([0.17])
AM_GNU_GETTEXT([external])
GETTEXT_PACKAGE=AC_PACKAGE_NAME
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [The gettext translation domain])
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define the gettext package to be used])
IT_PROG_INTLTOOL([0.40.0])
####################################################################
# Check if we should enable GCOV coverage reporting support
......
......@@ -90,3 +90,6 @@ EXTRA_DIST += \
ontologies/20-dc.ontology \
ontologies/31-nao.ontology \
ontologies/90-tracker.ontology
clean-local:
rm -rf $(abs_builddir)/test-cache
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment