summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--ChangeLog-2011 (renamed from ChangeLog)6
-rw-r--r--Makefile.am13
-rw-r--r--bootstrap.conf4
4 files changed, 23 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 1d3147f..120c9e7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@
.deps/
/.pc/
/.version
+/ChangeLog
/INSTALL
/VERSION
/aclocal.m4
diff --git a/ChangeLog b/ChangeLog-2011
index 77fb4d0..87e7fce 100644
--- a/ChangeLog
+++ b/ChangeLog-2011
@@ -1,3 +1,9 @@
+2011-03-17 Jim Meyering <meyering@redhat.com>
+
+ don't version-control ChangeLog; instead, generate it from git log
+ * Makefile.am (gen-ChangeLog): New rule.
+ * .gitignore: List ChangeLog.
+
2011-02-20 Jim Meyering <meyering@redhat.com>
maint: remove unnecessary tests before free
diff --git a/Makefile.am b/Makefile.am
index 970232d..918c5eb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,6 +21,7 @@ ACLOCAL_AMFLAGS = -I m4
SUBDIRS = lib src tests
dist_man1_MANS = patch.man
EXTRA_DIST = \
+ ChangeLog-2011 \
m4/mkdir.m4 \
m4/setmode.m4 \
m4/utimbuf.m4 \
@@ -37,9 +38,19 @@ endif
BUILT_SOURCES = $(top_srcdir)/.version
$(top_srcdir)/.version:
echo $(VERSION) > $@-t && mv $@-t $@
-dist-hook:
+dist-hook: gen-ChangeLog
echo $(VERSION) > $(distdir)/.tarball-version
+gen_start_date = 2011-02-22
+.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
+
tell-upload:
echo; \
(echo "Upload with: "; \
diff --git a/bootstrap.conf b/bootstrap.conf
index 688fde0..376e26e 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -31,6 +31,7 @@ full-write
getdate
getopt-gnu
gettime
+gitlog-to-changelog
git-version-gen
hash
lchmod
@@ -97,3 +98,6 @@ xalloc
# m4/xsize.m4
# '
# fi
+
+# Automake requires that ChangeLog exist.
+touch ChangeLog || exit 1