From 109e2ea1836d171ff2e50df35380aa1926a99dee Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 10 Jan 2025 12:57:01 +0100 Subject: [PATCH] gitlog-to-changelog: Recommend more reliable Makefile rule idiom. Reported by Basil L. Contovounesios . * doc/gitlog-to-changelog.texi: Make the gen-ChangeLog rule fail if the ChangeLog file cannot be created or if the disk is full. Drop the use of an intermediate file, not needed under $(distdir). --- ChangeLog | 8 ++++++++ doc/gitlog-to-changelog.texi | 12 ++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index e08bd02293..f56e8d02ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2025-01-10 Bruno Haible + + gitlog-to-changelog: Recommend more reliable Makefile rule idiom. + Reported by Basil L. Contovounesios . + * doc/gitlog-to-changelog.texi: Make the gen-ChangeLog rule fail if the + ChangeLog file cannot be created or if the disk is full. Drop the use of + an intermediate file, not needed under $(distdir). + 2025-01-10 Bruno Haible doc: Fix syntax errors (regression yesterday). diff --git a/doc/gitlog-to-changelog.texi b/doc/gitlog-to-changelog.texi index c58d59d8d2..9b65da9b28 100644 --- a/doc/gitlog-to-changelog.texi +++ b/doc/gitlog-to-changelog.texi @@ -32,8 +32,8 @@ gen-ChangeLog: $(AM_V_GEN)if test -e $(srcdir)/.git; then \ LC_ALL=en_US.UTF-8 TZ=UTC0 \ $(top_srcdir)/build-aux/gitlog-to-changelog \ - --srcdir=$(srcdir) > $(distdir)/ChangeLog.tmp && \ - mv -f $(distdir)/ChangeLog.tmp $(distdir)/ChangeLog; \ + --srcdir=$(srcdir) > $(distdir)/ChangeLog \ + || exit 1; \ fi @end example @@ -55,8 +55,8 @@ gen-ChangeLog: $(AM_V_GEN)if test -e $(srcdir)/.git; then \ $(top_srcdir)/build-aux/gitlog-to-changelog \ --srcdir=$(srcdir) --commit-timezone \ - > $(distdir)/ChangeLog.tmp && \ - mv -f $(distdir)/ChangeLog.tmp $(distdir)/ChangeLog; \ + > $(distdir)/ChangeLog \ + || exit 1; \ fi @end example @@ -100,7 +100,7 @@ gen-ChangeLog: --srcdir=$(srcdir) \ "$$amend_git_log" -- 'v$(gen_start_ver)~..' && \ printf '\n\nSee the source repo for older entries.\n'; \ - @} > $(distdir)/ChangeLog.tmp && \ - mv -f $(distdir)/ChangeLog.tmp $(distdir)/ChangeLog; \ + @} > $(distdir)/ChangeLog \ + || exit 1; \ fi @end example -- 2.39.5