From 564b24e7f899f401ec6e5adda7906244f60c0135 Mon Sep 17 00:00:00 2001 From: "R. Diez" Date: Fri, 1 Nov 2024 20:21:56 +0100 Subject: [PATCH] Makefile.am: generate ChangeLog with git log instead of git2cl git log is faster than git2cl and the result has a better format. Change-Id: I465ca62e3e30fed230fe9661e82a987980c05459 Signed-off-by: R. Diez Reviewed-on: https://review.openocd.org/c/openocd/+/8531 Tested-by: jenkins Reviewed-by: R. Diez Reviewed-by: Antonio Borneo --- .gitmodules | 3 --- Makefile.am | 11 +++++------ tools/git2cl | 1 - 3 files changed, 5 insertions(+), 10 deletions(-) delete mode 160000 tools/git2cl diff --git a/.gitmodules b/.gitmodules index f2da17ed7..abb773538 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "tools/git2cl"] - path = tools/git2cl - url = https://git.savannah.nongnu.org/git/git2cl.git [submodule "jimtcl"] path = jimtcl url = https://github.com/msteveb/jimtcl.git diff --git a/Makefile.am b/Makefile.am index ab0a2373d..155a2b3bb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -123,14 +123,13 @@ TCL_PATH = tcl TCL_FILES = find $(srcdir)/$(TCL_PATH) -name '*.cfg' -o -name '*.tcl' -o -name '*.txt' | \ sed -e 's,^$(srcdir)/$(TCL_PATH),,' -# Without the PERL_UNICODE="IO" workaround below when running git2cl, you get several -# "Wide character" warnings and you also risk an invalid character encoding in -# the generated ChangeLog file. For more information, see this bug report: -# Warning "Wide character in print" -# https://savannah.nongnu.org/bugs/?65689 +# The git log command below generates many empty text lines with only some space characters +# for indentation purposes, so use sed to trim all trailing whitespace. dist-hook: if test -d $(srcdir)/.git -a \( ! -e $(distdir)/ChangeLog -o -w $(distdir)/ChangeLog \) ; then \ - git --git-dir $(srcdir)/.git log | PERL_UNICODE="IO" $(srcdir)/tools/git2cl/git2cl > $(distdir)/ChangeLog ; \ + git --git-dir $(srcdir)/.git log --date=short --pretty="format:%ad %aN <%aE>%n%n%w(0,4,6)* %B" \ + | sed 's/[[:space:]]*$$//' > $(distdir)/ChangeLog.tmp && \ + mv $(distdir)/ChangeLog.tmp $(distdir)/ChangeLog; \ fi for i in $$($(TCL_FILES)); do \ j="$(distdir)/$(TCL_PATH)/$$i" && \ diff --git a/tools/git2cl b/tools/git2cl deleted file mode 160000 index 8373c9f74..000000000 --- a/tools/git2cl +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8373c9f74993e218a08819cbcdbab3f3564bbeba