[gtksourceview] Improve ChangeLog generation



commit 93920a1d4d01eb33d1b2d26a58d85152c41b9b65
Author: Paolo Borelli <porelli gnome org>
Date:   Sat May 16 17:39:59 2009 +0200

    Improve ChangeLog generation
    
    Use dist-hook for generating ChangeLogs so that it is just put in
    distdir
---
 Makefile.am |   36 +++++++++++++++++-------------------
 1 files changed, 17 insertions(+), 19 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 5352e7b..bdab9e5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -11,7 +11,10 @@ EXTRA_DIST = \
 	gtksourceview-zip.in \
 	COPYING.lib \
 	HACKING \
-	MAINTAINERS
+	MAINTAINERS \
+	ChangeLog.20070526 \
+	ChangeLog.soc-2006 \
+	ChangeLog-20090418
 
 DISTCLEANFILES = \
 	intltool-extract \
@@ -20,25 +23,20 @@ DISTCLEANFILES = \
 
 DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
 
-distclean-local:
-	if test $(srdcir) = .; then :; else \
-		rm -f ChangeLog; \
-	fi
-
-ChangeLog:
-	@echo Creating $@
-	@if test -d "$(srcdir)/.git"; then \
-	  (GIT_DIR=$(top_srcdir)/.git ./missing --run git log GTKSOURCEVIEW_2_26_1^^.. --stat -M -C --name-status  --date=short --no-color) | 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 >> $@)); \
+CHANGELOG_START = GTKSOURCEVIEW_2_6_1
+
+dist-hook:
+	@if test -d "$(srcdir)/.git"; \
+	then \
+		echo Creating ChangeLog && \
+		(GIT_DIR=$(top_srcdir)/.git \
+		  ./missing --run git log $(CHANGELOG_START)^^.. --stat -M -C --name-status  --date=short --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 \
-	  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 >> $@); \
+		echo A git clone is required to generate a ChangeLog >&2; \
 	fi
 
-.PHONY: ChangeLog
-
 -include $(top_srcdir)/git.mk



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