Auto generate ChangeLog for 'dist' target as found in geany Makefile.am (https:/...
authorAlexander Koenig <alex@lisas.de>
Sat, 8 Feb 2014 10:34:04 +0000 (11:34 +0100)
committerAlexander Koenig <alex@lisas.de>
Sat, 8 Feb 2014 10:34:04 +0000 (11:34 +0100)
ChangeLog [deleted file]
Makefile.am

diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644 (file)
index 10950fc..0000000
--- a/ChangeLog
+++ /dev/null
@@ -1,4 +0,0 @@
-The ChangeLog is no longer being maintained, however the web frontend to 
-the terminatorX git repository should be a workable replacement:
-
-https://lisas.de/git/?p=terminatorX.git
index a4e1d7fe56776e67b47c684a433ac359fd86bf5e..33575f9c80672998dfa5ced9a665436ed935a425 100644 (file)
@@ -18,3 +18,16 @@ mimedir = $(datadir)/mime-info
 mime_DATA = terminatorX.mime terminatorX.keys
 
 man_MANS = terminatorX.1
+
+dist-hook:
+       @if test -d "$(top_srcdir)/.git"; then \
+               echo ' GEN ChangeLog'; \
+               ( cd "$(top_srcdir)" && \
+               echo '# Generated by Makefile. Do not edit.' && echo && \
+               git log --stat ) > ChangeLog.tmp \
+               && mv -f ChangeLog.tmp "$(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