Re: [Openocd-development] [PATCH] Automatically generate ChangeLog from git log for release tarball

2011-08-03 Thread Luca Bruno
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



signature.asc
Description: PGP signature
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] [PATCH] Automatically generate ChangeLog from git log for release tarball

2011-08-03 Thread Spencer Oliver
On 3 August 2011 11:28, Luca Bruno lu...@debian.org 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


Replaced the following line and working out of tree - not tested inline

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

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


Re: [Openocd-development] [PATCH] Automatically generate ChangeLog from git log for release tarball

2011-08-03 Thread Spencer Oliver
On 3 August 2011 11:46, Spencer Oliver s...@spen-soft.co.uk wrote:
 On 3 August 2011 11:28, Luca Bruno lu...@debian.org 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 lu...@debian.org
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 lu...@debian.org
Signed-off-by: Spencer Oliver ntfr...@users.sourceforge.net
---
 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
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] [PATCH] Automatically generate ChangeLog from git log for release tarball

2011-08-03 Thread Andreas Fritiofson
On Wed, Aug 3, 2011 at 12:28 PM, Luca Bruno lu...@debian.org 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).


If that's always the case it's not that tricky:
cd $(srcdir); tools/git2cl/git2cl  $(builddir)/$(distdir)/ChangeLog

If it's not necessarily relative, this should work better:
cd $(srcdir); tools/git2cl/git2cl  $(abspath $(distdir)/ChangeLog)
Although abspath requires GNU Make 3.81.

If the pipe method work, fine. However, looking through the git2cl code it
apparently assumes git log is run with LC_ALL=C and that wouldn't be the
case with the latest incarnation of the patch.

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


Re: [Openocd-development] [PATCH] Automatically generate ChangeLog from git log for release tarball

2011-08-03 Thread Spencer Oliver
On 3 August 2011 15:00, Andreas Fritiofson andreas.fritiof...@gmail.com wrote:


 On Wed, Aug 3, 2011 at 12:28 PM, Luca Bruno lu...@debian.org 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).

 If that's always the case it's not that tricky:
 cd $(srcdir); tools/git2cl/git2cl  $(builddir)/$(distdir)/ChangeLog
 If it's not necessarily relative, this should work better:
 cd $(srcdir); tools/git2cl/git2cl  $(abspath $(distdir)/ChangeLog)
 Although abspath requires GNU Make 3.81.
 If the pipe method work, fine. However, looking through the git2cl code it
 apparently assumes git log is run with LC_ALL=C and that wouldn't be the
 case with the latest incarnation of the patch.
 /Andreas


Have a look at the modified patch i posted, build ok in/out of tree.

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


Re: [Openocd-development] [PATCH] Automatically generate ChangeLog from git log for release tarball

2011-07-19 Thread Andreas Fritiofson
On Mon, Jul 18, 2011 at 3:46 PM, Spencer Oliver s...@spen-soft.co.ukwrote:

 On 17 July 2011 10:18, Luca Bruno lu...@debian.org wrote:
  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.

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


Re: [Openocd-development] [PATCH] Automatically generate ChangeLog from git log for release tarball

2011-07-18 Thread Spencer Oliver
On 17 July 2011 10:18, Luca Bruno lu...@debian.org wrote:
 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

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


Re: [Openocd-development] [PATCH] Automatically generate ChangeLog from git log for release tarball

2011-07-14 Thread Spencer Oliver
On 10 July 2011 15:17, Luca Bruno lu...@debian.org wrote:
 make dist should use git2cl to genereate ChangeLog from git history,
 populating the placeholder file in released tarball.

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

 diff --git a/Makefile.am b/Makefile.am
 index 1b19ba4..c4c7da7 100644
 --- a/Makefile.am
 +++ b/Makefile.am
 @@ -68,6 +68,7 @@ TCL_FILES = find $(srcdir)/$(TCL_PATH) -name '*.cfg' -o 
 -name '*.tcl' | \
                sed -e 's,^$(srcdir)/$(TCL_PATH),,'

  dist-hook:
 +       $(srcdir)/tools/git2cl/git2cl  $(distdir)/ChangeLog
        for i in $$($(TCL_FILES)); do \
                j=$(distdir)/$(TCL_PATH)/$$i  \
                mkdir -p $$(dirname $$j)  \
 --
 1.7.5.4


I like this, however it fails when building out of the src tree.

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


Re: [Openocd-development] [PATCH] Automatically generate ChangeLog from git log for release tarball

2011-07-14 Thread Luca Bruno
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Spencer Oliver scrisse:

 On 10 July 2011 15:17, Luca Bruno lu...@debian.org wrote:
  make dist should use git2cl to genereate ChangeLog from git history,
  populating the placeholder file in released tarball.
 
 I like this, however it fails when building out of the src tree.

Good catch, I only tried the basic in-tree case when packaging a tarball
on my own. I've now cooked a new patch which won't let make distcheck
fail.
Did you use other out-of-tree testing recipes other than make
distcheck that I should try before resending?

Cheers, Luca

- -- 
 .''`.  ** 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
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk4e7WMACgkQRqobajv7n7NZ9wCgjsOvEyikXSP4w2e+KcCYW5QA
GoUAnidc7xE+FmZNmBJnjBUwzpqVnSrR
=EZrM
-END PGP SIGNATURE-
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] [PATCH] Automatically generate ChangeLog from git log for release tarball

2011-07-14 Thread Spencer Oliver
On 14 July 2011 14:21, Luca Bruno lu...@debian.org wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Spencer Oliver scrisse:

 On 10 July 2011 15:17, Luca Bruno lu...@debian.org wrote:
  make dist should use git2cl to genereate ChangeLog from git history,
  populating the placeholder file in released tarball.

 I like this, however it fails when building out of the src tree.

 Good catch, I only tried the basic in-tree case when packaging a tarball
 on my own. I've now cooked a new patch which won't let make distcheck
 fail.
 Did you use other out-of-tree testing recipes other than make
 distcheck that I should try before resending?


no just distcheck

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