[gtetrinet] Autogenerate a ChangeLog.



commit a65b45bf4821419cca32e454ba0f76cc4dfdb049
Author: Jordi Mallach <jordi debian org>
Date:   Mon May 2 03:27:29 2011 +0200

    Autogenerate a ChangeLog.
    
    Generate a ChangeLog from 'git log' in the dist-hook.
    Add an empty ChangeLog file with a notice.

 ChangeLog   |    2 ++
 Makefile.am |   16 ++++++++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..1460016
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,2 @@
+The ChangeLog is autogenerated when creating the release.
+If you are seeing this, use 'git log' to view the list of changes.
diff --git a/Makefile.am b/Makefile.am
index 486703a..75cc0d1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,5 +21,17 @@ EXTRA_DIST = ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README	\
 install-data-local:
 	-GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$(schema_DATA)
 
-changelog:
-	cvs2cl -b --utc -S --no-wrap -f ChangeLog.CVS
+# Generate a ChangeLog file from 'git log'
+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 --stat ) > 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]