On 3 August 2011 11:46, Spencer Oliver <[email protected]> wrote:
> On 3 August 2011 11:28, Luca Bruno <[email protected]> wrote:
>> 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
>>
>

Full amended patch below:
No objections i will commit.

Spen

From bc7f9b5ff0be806d27e88ffcc570f120691a299f Mon Sep 17 00:00:00 2001
From: Luca Bruno <[email protected]>
Date: Wed, 3 Aug 2011 14:20:06 +0100
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 <[email protected]>
Signed-off-by: Spencer Oliver <[email protected]>
---
 Makefile.am |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 461bca4..7bc25af 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 --git-dir $(srcdir)/.git log | 
$(srcdir)/tools/git2cl/git2cl >
$(distdir)/ChangeLog ; \
+       fi
        for i in $$($(TCL_FILES)); do \
                j="$(distdir)/$(TCL_PATH)/$$i" && \
                mkdir -p "$$(dirname $$j)" && \
-- 
1.7.0.4
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to