[gnome-scan/gnome-scan-0-6: 23/23] Add a rule to generate ChangeLog



commit e760b870e747f5e9bd64d75917e525bb205dca8e
Author: Philipp Sadleder <philipp sadleder de>
Date:   Tue Apr 21 17:22:44 2009 +0200

    Add a rule to generate ChangeLog
    
    We use the same rule pango uses to create a ChangeLog file with the help
    of git-log. The format is somewhat different from traditional ChangeLog,
    but it contains the relevant information.
---
 Makefile.am |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index f06e4c6..1e52fa4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -40,7 +40,7 @@ po/POTFILES.in: $(C)
 	@echo $(desktop_IN) >> $@
 
 EXTRA_DIST = \
-	ChangeLog		\
+	ChangeLog.pre-0-6-2	\
 	MAINTAINERS		\
         intltool-extract.in     \
         intltool-merge.in       \
@@ -49,6 +49,8 @@ EXTRA_DIST = \
         po/POTFILES.in		\
 	$(desktop_IN)
 
+BUILT_EXTRA_DIST = \
+	ChangeLog
 
 DISTCLEANFILES = \
 	intltool-extract	\
@@ -63,3 +65,19 @@ dist-hook:
 			cp -p $$specfile $(distdir); \
 		fi \
 	done
+
+ChangeLog:
+	@echo Creating $@
+	@if test -d "$(srcdir)/.git"; then \
+	  (GIT_DIR=$(top_srcdir)/.git ./missing --run git log GNOME_SCAN_0_6_2.. --stat) | fmt --split-only > $  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
+
+.PHONY: ChangeLog



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