build: Add `git-to-changelog' and make use of it in `Makefile.am'.
[8sync.git] / Makefile.am
index bd1587a24cb8fbddbb4a3d9c867db5b7a10f2e8e..29a89d2138e6b43a8e4b929c40b4da16209aa135 100644 (file)
@@ -69,3 +69,14 @@ EXTRA_DIST =                                                 \
        $(TESTS)                                        \
        pre-inst-env.in                                 \
        tests/utils.scm
+
+dist-hook: gen-ChangeLog
+# gen-AUTHORS might be useful to borrow from Guix
+
+gen-ChangeLog:
+       if test -d .git; then                           \
+         $(top_srcdir)/build-aux/gitlog-to-changelog --since 2015-11-28        \
+           > $(distdir)/cl-t;                          \
+         rm -f $(distdir)/ChangeLog;                   \
+         mv $(distdir)/cl-t $(distdir)/ChangeLog;      \
+       fi