Andreas Fritiofson scrisse:

> > > make dist should use git2cl to genereate ChangeLog from git
> > > history, populating the placeholder file in released tarball.

> > Still not working for srcdir != builddir
> >
> > make[1]: Entering directory `/home/soliver/openocd/openocd-rel'
> > if test -d ../openocd/.git -a \( ! -e openocd-0.5.0-dev/ChangeLog -o
> > -w openocd-0.5.0-dev/ChangeLog \) ; then \
> >                ../openocd/tools/git2cl/git2cl >
> > openocd-0.5.0-dev/ChangeLog ; \
> >        fi
> > fatal: Not a git repository (or any of the parent directories): .git
> >

> Current directory needs to be $(srcdir) before running git2cl.

I suspect this will get tricky, as $(distdir) is relative to
$(builddir). It could be easier to directly feed git2cl with a pipe
from `git log -- $(srcdir)`, as in the attached patch.
Spen, can you please check if this is ok for you?
Jean-Christophe, could you consider it for inclusion in
0.5.0 (if ACKed)?

Ciao, Luca

P.S. sorry for the delay in this iteration, I'm moving home.

-- 
 .''`.  ** Debian GNU/Linux **  | Luca Bruno (kaeso)
: :'  :   The Universal O.S.    | lucab (AT) debian.org
`. `'`                          | GPG Key ID: 3BFB9FB3
  `-     http://www.debian.org  | Debian GNU/Linux Developer
From f920c3c2927a54af0edc002d343c1af937711918 Mon Sep 17 00:00:00 2001
From: Luca Bruno <lu...@debian.org>
Date: Sun, 10 Jul 2011 15:35:12 +0200
Subject: [PATCH] Automatically generate ChangeLog from git log for release
 tarball

make dist should use git2cl to generate ChangeLog from git history,
populating the placeholder file in released tarball.

Signed-off-by: Luca Bruno <lu...@debian.org>
---
 Makefile.am |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 461bca4..52eafae 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -68,6 +68,9 @@ TCL_FILES = find $(srcdir)/$(TCL_PATH) -name '*.cfg' -o -name '*.tcl' | \
 		sed -e 's,^$(srcdir)/$(TCL_PATH),,'
 
 dist-hook:
+	if test -d $(srcdir)/.git -a \( ! -e $(distdir)/ChangeLog -o -w $(distdir)/ChangeLog \) ; then \
+		git log -- $(srcdir) | $(srcdir)/tools/git2cl/git2cl > $(distdir)/ChangeLog ; \
+	fi
 	for i in $$($(TCL_FILES)); do \
 		j="$(distdir)/$(TCL_PATH)/$$i" && \
 		mkdir -p "$$(dirname $$j)" && \
-- 
1.7.5.4

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to