[libvirt] [PATCH 4/4] generate ChangeLog from git logs into distribution tarball

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is what I started out working on,
before I noticed the "make distcheck" failures.

>From 9fd0624b8cee33b8c725464d289cc5ce33ffc1c3 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@xxxxxxxxxx>
Date: Wed, 8 Jul 2009 08:54:25 +0200
Subject: [PATCH 4/4] generate ChangeLog from git logs into distribution tarball

No longer maintain a version-controlled ChangeLog file, but do
continue to include a ChangeLog file in distribution tarball.
* Makefile.am (gen-ChangeLog): New rule.
(dist-hook): Depend on it.
(EXTRA_DIST): Add ChangeLog-old.
* bootstrap (modules): Add gitlog-to-changelog.
* ChangeLog: Remove file.  Renamed to...
* ChangeLog-old: ...this.  New file.
* autogen.sh: Touch ChangeLog, to ensure it exists.  For automake.
---
 ChangeLog => ChangeLog-old |    2 +-
 Makefile.am                |   15 +++++++++++++++
 autogen.sh                 |    3 +++
 bootstrap                  |    1 +
 build-aux/.gitignore       |    1 +
 5 files changed, 21 insertions(+), 1 deletions(-)
 rename ChangeLog => ChangeLog-old (99%)

diff --git a/ChangeLog b/ChangeLog-old
similarity index 99%
rename from ChangeLog
rename to ChangeLog-old
index b266de6..c3b41e2 100644
--- a/ChangeLog
+++ b/ChangeLog-old
@@ -1207,7 +1207,7 @@ Fri Apr 24 13:17:47 BST 2009 Daniel P. Berrange <berrange@xxxxxxxxxx>
 	Fix network config in XM driver
 	* src/xm_internal.c: Fix setting of bridge & script parameters
 	in VIF config
-	* src/xend_internal.h, src/xend_internal.c: Export the 
+	* src/xend_internal.h, src/xend_internal.c: Export the
 	default bridge script name to XM driver
 	* tests/xmconfigdata/*: Update to take account of script=
 	setting in VIF config
diff --git a/Makefile.am b/Makefile.am
index c251f96..f9efff5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,6 +9,7 @@ SUBDIRS = gnulib/lib include src qemud tools proxy docs gnulib/tests \
 ACLOCAL_AMFLAGS = -I m4 -I gnulib/m4

 EXTRA_DIST = \
+  ChangeLog-old \
   libvirt.spec libvirt.spec.in \
   mingw32-libvirt.spec.in \
   libvirt.pc libvirt.pc.in \
@@ -49,3 +50,17 @@ clean-cov:

 # disable this check
 distuninstallcheck:
+
+dist-hook: gen-ChangeLog
+
+# Generate the ChangeLog file (with all entries since the switch to git)
+# and insert it into the directory we're about to use to create a tarball.
+gen_start_date = 2009-07-04
+.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
diff --git a/autogen.sh b/autogen.sh
index 788729f..c026112 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -54,6 +54,9 @@ if test -z "$*"; then
         echo "to pass any to it, please specify them on the $0 command line."
 fi

+# Automake requires that ChangeLog exist.
+touch ChangeLog
+
 autopoint --force
 #rm -rf m4
 libtoolize --copy --force
diff --git a/bootstrap b/bootstrap
index b0de3df..0754d02 100755
--- a/bootstrap
+++ b/bootstrap
@@ -78,6 +78,7 @@ getaddrinfo
 gethostname
 getpass
 gettext
+gitlog-to-changelog
 gnumakefile
 inet_pton
 ioctl
diff --git a/build-aux/.gitignore b/build-aux/.gitignore
index af6c366..62188c1 100644
--- a/build-aux/.gitignore
+++ b/build-aux/.gitignore
@@ -10,3 +10,4 @@ mkinstalldirs
 mktempd
 /useless-if-before-free
 /vc-list-files
+/gitlog-to-changelog
--
1.6.3.3.524.g8586b

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]