]> hydra-www.ietfng.org Git - gtetrinet/commitdiff
Autogenerate a ChangeLog.
authorJordi Mallach <jordi@debian.org>
Mon, 2 May 2011 01:27:29 +0000 (03:27 +0200)
committerJordi Mallach <jordi@debian.org>
Mon, 2 May 2011 01:27:29 +0000 (03:27 +0200)
Generate a ChangeLog from 'git log' in the dist-hook.
Add an empty ChangeLog file with a notice.

ChangeLog [new file with mode: 0644]
Makefile.am

diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
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.
index 486703a820d66e3b63c400bd395ce03cfbcd1003..75cc0d17a217d1ca1d051c84d2c88738db255de4 100644 (file)
@@ -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