-[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
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" && \