[gnome-web-photo] build: Generate ChangeLog on make dist, instead of using a phony rule



commit 8b6005f9bb4afc4cdfef8ba3874cc0ab767e51c8
Author: Vincent Untz <vuntz gnome org>
Date:   Wed Feb 22 15:18:02 2012 +0100

    build: Generate ChangeLog on make dist, instead of using a phony rule

 ChangeLog.README => ChangeLog |    8 ++++----
 Makefile.am                   |   18 +++++++++++-------
 2 files changed, 15 insertions(+), 11 deletions(-)
---
diff --git a/ChangeLog.README b/ChangeLog
similarity index 89%
rename from ChangeLog.README
rename to ChangeLog
index 4a123a2..a4b7786 100644
--- a/ChangeLog.README
+++ b/ChangeLog
@@ -1,8 +1,8 @@
-=== No ChangeLog ===
+=== ChangeLog discontinued ===
 
- Since this module is using git, we rely on commit messages to provide change
- history. Please write commit messages in the format described at
- http://live.gnome.org/Git/CommitMessages
+ With the move to git, this module is switching from a ChangeLog file to
+ relying on commit messages to provide change history. Please write commit
+ messages in the format described at http://live.gnome.org/Git/CommitMessages
 
  Below is a copy of this format:
 
diff --git a/Makefile.am b/Makefile.am
index fb1d19d..6bc7565 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,7 +4,6 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 
 EXTRA_DIST = 			\
 	autogen.sh		\
-	ChangeLog		\
 	COPYING.README		\
 	COPYING			\
 	HACKING			\
@@ -13,7 +12,6 @@ EXTRA_DIST = 			\
 DISTCLEANFILES =
 
 MAINTAINERCLEANFILES = \
-	ChangeLog \
 	$(srcdir)/INSTALL \
 	$(srcdir)/aclocal.m4 \
 	$(srcdir)/autoscan.log \
@@ -39,12 +37,18 @@ DISTCHECK_CONFIGURE_FLAGS = \
 	--disable-silent-rules \
 	--disable-schemas-install
 
-ChangeLog:
-	$(AM_V_GEN) if test -f $(top_srcdir)/.git/HEAD; then \
-		git log --stat > $@; \
+CHANGELOG_GIT_RANGE =
+dist-hook:
+	$(AM_V_GEN)if test -d "$(srcdir)/.git"; then \
+	  ( echo '# Generated by Makefile. Do not edit.'; echo; \
+	    GIT_DIR="$(top_srcdir)/.git" ./missing --run \
+	    git log $(CHANGELOG_GIT_RANGE) --no-color -M -C --name-status ) \
+	  > ChangeLog.tmp \
+	  && mv -f ChangeLog.tmp $(distdir)/ChangeLog \
+	  || ( rm -f ChangeLog.tmp ; echo Failed to generate ChangeLog >&2 ); \
+	else \
+	  echo A git checkout is required to generate ChangeLog >&2; \
 	fi
 
-.PHONY: ChangeLog
-
 GITIGNOREFILES = $(PACKAGE)-\*.tar.{gz,bz2,xz}
 -include $(top_srcdir)/git.mk



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