DIST_SUBDIRS = $(SUBDIRS) libevent
dist_doc_DATA = README.md NEWS
-doc_DATA = ChangeLog
-# Not able to add a .PHONY target
-force-changelog-generation:
-ChangeLog: force-changelog-generation
+# Build changelog from git history
+dist-hook: $(distdir)/ChangeLog
+__force-changelog-generation:
+$(distdir)/ChangeLog: __force-changelog-generation
$(AM_V_GEN)if test -d $(top_srcdir)/.git; then \
prev=$$(git describe --tags --always --match [0-9]* 2> /dev/null) ; \
for tag in $$(git tag | grep -E '^[0-9]+(\.[0-9]+){1,}$$' | sort -rn); do \