summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-11-11 22:24:33 +0100
committerJim Meyering <meyering@redhat.com>2009-11-11 22:30:14 +0100
commit3504236b28c6d92653675b3d80361dafed381e0d (patch)
tree0ad6f1a591f656b4e9b6acb8710e7fba81b9d1a2 /Makefile.am
parent9bfafb33a6fad87d9b3fc41f0d8e97f9eac8f848 (diff)
downloaddiffutils-3504236b28c6d92653675b3d80361dafed381e0d.tar.gz
build: generate ChangeLog (from git logs) into distribution tarball
* Makefile.am (dist-hook, gen-ChangeLog): New rules. (gen_start_date): Define. * bootstrap.conf (gnulib_modules): Add gitlog-to-changelog.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am15
1 files changed, 15 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 4c9b40f..ec51c32 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,3 +20,18 @@ EXTRA_DIST = bootstrap exgettext ChangeLog-2008
SUBDIRS = lib ms src doc man po
ACLOCAL_AMFLAGS = -I m4
+
+# Arrange so that .tarball-version appears only in the distribution
+# tarball, and never in a checked-out repository.
+dist-hook: gen-ChangeLog
+ $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
+
+gen_start_date = '2009-11-11 15:00'
+.PHONY: gen-ChangeLog
+gen-ChangeLog:
+ $(AM_V_GEN)if test -d .git; then \
+ $(top_srcdir)/build-aux/gitlog-to-changelog \
+ --since=$(gen_start_date) > $(distdir)/cl-t; \
+ rm -f $(distdir)/ChangeLog; \
+ mv $(distdir)/cl-t $(distdir)/ChangeLog; \
+ fi