AboutSummaryRefsLogTreeCommitDiffStats
path: root/makefile.am
diff options
context:
space:
mode:
authorMathieu Lirzin <mthl@gnu.org>2015-07-22 01:00:45 +0200
committerMathieu Lirzin <mthl@gnu.org>2016-05-07 11:32:19 +0200
commit7ed303705c17b127cc224ee1ddecc53a931d65e5 (patch)
tree7dd1605b4a16c655e9cec363f14545f1b032d39b /makefile.am
parentee280d4efc49b54658073aac945a22f81508c086 (diff)
downloadmcron-7ed303705c17b127cc224ee1ddecc53a931d65e5.tar.gz
mcron-7ed303705c17b127cc224ee1ddecc53a931d65e5.tar.bz2
mcron-7ed303705c17b127cc224ee1ddecc53a931d65e5.zip
build: Generate 'ChangeLog' upon 'make dist'.
* ChangeLog: Rename to ... * ChangeLog.old: ... this. * ChangeLog: New file. * Makefile.am (gen_start_date): New variable. (gen-ChangeLog, dist-hook): New targets. (EXTRA_DIST): Add 'ChangeLog.old'. * build-aux/gitlog-to-changelog: New file, from Gnulib.
Diffstat (limited to 'makefile.am')
-rw-r--r--makefile.am17
1 files changed, 16 insertions, 1 deletions
diff --git a/makefile.am b/makefile.am
index da26a89..61fbe56 100644
--- a/makefile.am
+++ b/makefile.am
@@ -26,7 +26,7 @@ CP = @CP@
CLEANFILES = mcron.c
-EXTRA_DIST = makefile.ed mcron.c.template BUGS
+EXTRA_DIST = makefile.ed mcron.c.template BUGS ChangeLog.old
info_TEXINFOS = doc/mcron.texi
doc_mcron_TEXINFOS = doc/fdl.texi
@@ -46,6 +46,21 @@ mcron.c : scm/mcron/main.scm scm/mcron/crontab.scm makefile.ed mcron.c.template
@$(ED) < makefile.ed > /dev/null 2>&1
@rm -f mcron.escaped.scm > /dev/null 2>&1
+dist-hook: gen-ChangeLog
+
+gen_start_date = 2015-06-26
+.PHONY: gen-ChangeLog
+gen-ChangeLog:
+ $(AM_V_GEN)if test -d $(srcdir)/.git; then \
+ log_fix="$(srcdir)/build-aux/git-log-fix"; \
+ test -e "$$log_fix" \
+ && amend_git_log="--amend=$$log_fix" \
+ || amend_git_log=; \
+ $(top_srcdir)/build-aux/gitlog-to-changelog \
+ $$amend_git_log --since=$(gen_start_date) > $(distdir)/cl-t && \
+ { rm -f $(distdir)/ChangeLog && \
+ mv $(distdir)/cl-t $(distdir)/ChangeLog; } \
+ fi
#full program prefix
fpp = $(DESTDIR)$(bindir)/@real_program_prefix@