diff options
author | Jim Meyering <meyering@redhat.com> | 2011-03-17 11:01:49 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-03-17 11:12:37 +0100 |
commit | 764d0ea12e5fd8b15ab32f724ffcba0be33dd73f (patch) | |
tree | ad333965c6f08be1324173f988dd20704fd5ee45 | |
parent | 8678ae92eac4712eadeeb72cec1b53b395a0e546 (diff) | |
download | patch-764d0ea12e5fd8b15ab32f724ffcba0be33dd73f.tar.gz |
do not version-control ChangeLog; instead, generate it from git log
With this change, all ChangeLog entries going forward are generated
into a file named ChangeLog in each distribution tarball.
ChangeLog entries prior to today's date are in ChangeLog-2011.
* Makefile.am (gen-ChangeLog): New rule.
(dist-hook): Depend on it.
(EXTRA_DIST): Add ChangeLog-2011.
* ChangeLog-2011: Renamed from ChangeLog
* ChangeLog: Remove file.
* .gitignore: Ignore ChangeLog.
* bootstrap.conf: Ensure that ChangeLog exists.
(gnulib_modules): Add gitlog-to-changelog.
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | ChangeLog-2011 (renamed from ChangeLog) | 6 | ||||
-rw-r--r-- | Makefile.am | 13 | ||||
-rw-r--r-- | bootstrap.conf | 4 |
4 files changed, 23 insertions, 1 deletions
@@ -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 |