summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-10-22 15:15:33 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-10-22 15:15:33 (EDT)
commit732551c535ffb6100c2ab3f919e1554834ef7f14 (patch)
tree44527bcec469e76cc6902ce2d6d05295a6e16a91
parentdcfc46ea2334636c9c4dee677e975e1cb96920de (diff)
Makefile.am: Generate ChangeLog in dist-hook.
-rw-r--r--Makefile.am8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index c3d076b..286a770 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -40,6 +40,14 @@ reallyclean: distclean
$(srcdir)/build-aux/ $(srcdir)/INSTALL $(srcdir)/Makefile.in \
$(srcdir)/ChangeLog
+dist-hook:
+ if [ -d '$(srcdir)/.git' ]; then \
+ printf 'Generated file. Do not edit.\n\n' \
+ >'$(distdir)/ChangeLog~'; \
+ git log --stat >>'$(distdir)/ChangeLog~'; \
+ mv '$(distdir)/ChangeLog~' '$(distdir)/ChangeLog'; \
+ fi
+
.sh:
$(MKDIR_P) "$$(dirname $@)"
$(do_subst) $< >$@