summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-02-10 10:27:42 +0100
committerJim Meyering <meyering@redhat.com>2008-02-10 10:53:16 +0100
commit61d93cb0d886e272705abd596c32d00705953292 (patch)
tree93d2c5dcbac1eaef6e414f8812398dc742439fba
parent29ebe8f50afa9bb6fc83374f443c13f18268740b (diff)
downloadcoreutils-61d93cb0d886e272705abd596c32d00705953292.tar.xz
Generate ChangeLog from git log.
* bootstrap.conf (gnulib_modules): Add gitlog-to-changelog. Ensure that ChangeLog exists, for automake. * Makefile.am (gen-ChangeLog): New rule. (dist-hook): Depend on it. (EXTRA_DIST): Add ChangeLog-2006, ChangeLog-2007, ChangeLog-2008. Signed-off-by: Jim Meyering <meyering@redhat.com>
-rw-r--r--Makefile.am15
-rw-r--r--bootstrap.conf4
2 files changed, 18 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 820587564..a7083be31 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -31,6 +31,9 @@ EXTRA_DIST = Makefile.cfg Makefile.maint GNUmakefile \
.x-sc_unmarked_diagnostics \
.x-sc_useless_cpp_parens \
ChangeLog-2005 \
+ ChangeLog-2006 \
+ ChangeLog-2007 \
+ ChangeLog-2008 \
bootstrap \
bootstrap.conf \
build-aux/cvsu \
@@ -74,10 +77,20 @@ BUILT_SOURCES = .version
# tarball, and never in a checked-out repository.
# The perl substitution is to change some key uses of "rm" to "/bin/rm".
# See the rm_subst comment for details.
-dist-hook:
+dist-hook: gen-ChangeLog
echo $(VERSION) > $(distdir)/.tarball-version
perl -pi -e '$(rm_subst)' $(distdir)/src/Makefile.in
+gen_start_date = 2008-02-08
+.PHONY: gen-ChangeLog
+gen-ChangeLog:
+ 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
+
distcheck-hook:
$(MAKE) my-distcheck
diff --git a/bootstrap.conf b/bootstrap.conf
index 92bee986d..bd76ba731 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -55,6 +55,7 @@ gnulib_modules="
getline getloadavg getndelim2 getopt getpagesize getpass-gnu
gettext gettime gettimeofday getugroups getusershell
git-version-gen
+ gitlog-to-changelog
gnu-make gnupload
group-member hard-locale hash hash-pjw host-os human idcache
inttostr inttypes isapipe
@@ -140,3 +141,6 @@ if test $gettext_external = 1; then
fi
gnulib_tool_option_extras="--tests-base=$bt/gnulib-tests --with-tests"
+
+# Automake requires that ChangeLog exist.
+touch ChangeLog