From 755001303a7b58bc869034c5ba98b66b394d817e Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Wed, 22 Feb 2012 14:40:41 +0100 Subject: build: Generate ChangeLog on make dist --- Makefile.am | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Makefile.am b/Makefile.am index d95348e..fc507f6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,4 +18,17 @@ MAINTAINERCLEANFILES = \ $(srcdir)/configure \ $(srcdir)/m4/*.m4 +CHANGELOG_GIT_RANGE = +dist-hook: + $(AM_V_GEN)if test -d "$(srcdir)/.git"; then \ + ( echo '# Generated by Makefile. Do not edit.'; echo; \ + GIT_DIR="$(top_srcdir)/.git" ./missing --run \ + git log $(CHANGELOG_GIT_RANGE) --no-color -M -C --name-status ) \ + > ChangeLog.tmp \ + && mv -f ChangeLog.tmp $(distdir)/ChangeLog \ + || ( rm -f ChangeLog.tmp ; echo Failed to generate ChangeLog >&2 ); \ + else \ + echo A git checkout is required to generate ChangeLog >&2; \ + fi + -include $(top_srcdir)/git.mk -- cgit v1.2.3