From 2663b7a6b31e5e3d03b42a50b27f64737a35e9aa Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Fri, 14 Nov 2008 22:38:27 +0100 Subject: define and use XORG_CHANGELOG macro --- Makefile.am | 2 +- configure.ac | 1 + xorgversion.m4 | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 3e7ff73..112c7c6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -33,7 +33,7 @@ EXTRA_DIST = ChangeLog .PHONY: ChangeLog ChangeLog: - (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2) + $(CHANGELOG_CMD) dist-hook: ChangeLog diff --git a/configure.ac b/configure.ac index 78daa0d..45bb9ab 100644 --- a/configure.ac +++ b/configure.ac @@ -32,5 +32,6 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2]) m4_include([xorgversion.m4]) XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile xorg-macros.m4:xorg-macros.m4.in:xorgversion.m4]) diff --git a/xorgversion.m4 b/xorgversion.m4 index 7d3dda8..edfc0fb 100644 --- a/xorgversion.m4 +++ b/xorgversion.m4 @@ -59,3 +59,17 @@ AC_DEFUN([XORG_RELEASE_VERSION],[ [$PVP], [Patch version of this package]) ]) + +# XORG_CHANGELOG() +# ---------------- +# Minimum version: 1.2.0 +# +# Defines the variable CHANGELOG_CMD as the command to generate +# ChangeLog from git. +# +AC_DEFUN([XORG_CHANGELOG], [ +CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ +mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ +echo 'git directory not found: installing possibly empty changelog.' >&2)" +AC_SUBST([CHANGELOG_CMD]) +]) # XORG_CHANGELOG -- cgit v1.2.3