[cheese/gnome-2-26] add dist-hook rule for ChangeLog autogeneration



commit 03e6dff1e6e4db2c478a7b02a7a54396fe97e84d
Author: daniel g. siegel <dgsiegel gnome org>
Date:   Mon May 4 20:38:39 2009 +0200

    add dist-hook rule for ChangeLog autogeneration
    
    added a dist-hook rule, which calls git log and overwrites
    the sample ChangeLog file. we run git log $(CHANGELOG_START)..
    --stat -M -C --name-status --no-color ) | fmt --split-only where
    $CHANGELOG_START is set to 2.26.0
---
 Makefile.am |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index afb6b72..3a3f9ee 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,10 +2,28 @@ SUBDIRS = src po data help
 
 EXTRA_DIST =			\
 	$(cheesedoc_DATA)	\
-	gnome-doc-utils.make
+	gnome-doc-utils.make\
+	ChangeLog.pre-git
 
 DISTCLEANFILES =		\
 	gnome-doc-utils.make
 
 DISTCHECK_CONFIGURE_FLAGS = --disable-schemas-install --disable-scrollkeeper
 
+CHANGELOG_START = 2.26.0
+
+dist-hook:
+	@if test -d "$(srcdir)/.git"; \
+	then \
+		echo Creating ChangeLog && \
+		( cd "$(top_srcdir)" && \
+		  echo '# Generated by Makefile. Do not edit.'; echo; \
+		  $(top_srcdir)/missing --run git log $(CHANGELOG_START).. \
+			--stat -M -C --name-status --no-color ) | \
+			fmt --split-only > ChangeLog.tmp \
+		&& mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \
+		|| ( rm -f ChangeLog.tmp ; \
+		  echo Failed to generate ChangeLog >&2 ); \
+	else \
+		echo A git clone is required to generate a ChangeLog >&2; \
+	fi



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]