From: Paul Eggert <eggert@cs.ucla.edu>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 53358@debbugs.gnu.org
Subject: bug#53358: 29.0.50; Compilation output messed up again
Date: Thu, 20 Jan 2022 10:21:17 -0800 [thread overview]
Message-ID: <3c5c8f89-86ae-0fa9-9151-773cced53bd9@cs.ucla.edu> (raw)
In-Reply-To: <87k0eu7rov.fsf@gnus.org>
[-- Attachment #1: Type: text/plain, Size: 666 bytes --]
On 1/20/22 00:10, Lars Ingebrigtsen wrote:
> The problem is just in the ELC bit
Surely it's just an accident that you've seen it only for ELC, as the
problem can occur if 'make' executes any two $(info ...)s at about the
same time.
How badly does it occur for you? For me, it's only the first line (when
many 'makes' start in parallel, which is a glitch I can easily ignore.
If it's a real annoyance please try the attached patch, which should fix
the problem for the AM_V_ stuff at the cost of appending annoying empty
lines with current and older GNU make. (Which annoyance do you prefer?
:-) You'll need to run './config.status' after applying the patch.
[-- Attachment #2: 0001-Work-around-GNU-Make-info-bug.patch --]
[-- Type: text/x-patch, Size: 3118 bytes --]
From 153f3d9af2b3d021d9ba8eb17d979c772a7c09cd Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Thu, 20 Jan 2022 10:11:39 -0800
Subject: [PATCH] Work around GNU Make $(info) bug
Problem reported by Lars Ingebrigtsen (Bug#53358).
* src/verbose.mk.in (newline, info-trailing-newline): New macros.
(AM_V_AR, AM_V_CC, AM_V_CXX, AM_V_CCLD, AM_V_CXXLD, AM_V_ELC)
(AM_V_ELN, AM_V_GEN, AM_V_RC): Use them.
---
src/verbose.mk.in | 42 +++++++++++++++++++++++++++++++-----------
1 file changed, 31 insertions(+), 11 deletions(-)
diff --git a/src/verbose.mk.in b/src/verbose.mk.in
index e3f5678303..4a3bbcb9de 100644
--- a/src/verbose.mk.in
+++ b/src/verbose.mk.in
@@ -17,6 +17,26 @@
## You should have received a copy of the GNU General Public License
## along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+# Use two empty lines to define a macro containing a newline.
+define newline
+
+
+endef
+
+# Work around a bug in GNU Make 4.3 and earlier, which implements $(info MSG)
+# via two system calls { write (..., "MSG", 3); write (..., "\n", 1); }
+# which looks bad when make -j interleaves two of these at about the same time.
+# Later versions of GNU Make have the 'notintermediate' feature,
+# so assume that $(info ...) has the bug if this feature is absent.
+# The workaround arranges for 'MSG' itself to end in newline;
+# although this follows every message by an empty line,
+# that's better than the interleaved output.
+ifeq (,$(filter notintermediate,$(value .FEATURES)))
+info-trailing-newline = $(newline)
+else
+info-trailing-newline =
+endif
+
# 'make' verbosity.
V = @AM_DEFAULT_VERBOSITY@
ifeq (${V},1)
@@ -33,26 +53,26 @@ AM_V_GLOBALS =
AM_V_NO_PD =
AM_V_RC =
else
-AM_V_AR = @$(info $ AR $@)
+AM_V_AR = @$(info $ AR $@$(info-trailing-newline))
AM_V_at = @
-AM_V_CC = @$(info $ CC $@)
-AM_V_CXX = @$(info $ CXX $@)
-AM_V_CCLD = @$(info $ CCLD $@)
-AM_V_CXXLD = @$(info $ CXXLD $@)
+AM_V_CC = @$(info $ CC $@$(info-trailing-newline))
+AM_V_CXX = @$(info $ CXX $@$(info-trailing-newline))
+AM_V_CCLD = @$(info $ CCLD $@$(info-trailing-newline))
+AM_V_CXXLD = @$(info $ CXXLD $@$(info-trailing-newline))
ifeq ($(HAVE_NATIVE_COMP),yes)
ifeq ($(NATIVE_DISABLED),1)
-AM_V_ELC = @$(info $ ELC $@)
+AM_V_ELC = @$(info $ ELC $@$(info-trailing-newline))
AM_V_ELN =
else
-AM_V_ELC = @$(info $ ELC+ELN $@)
-AM_V_ELN = @$(info $ ELN $@)
+AM_V_ELC = @$(info $ ELC+ELN $@$(info-trailing-newline))
+AM_V_ELN = @$(info $ ELN $@$(info-trailing-newline))
endif
else
-AM_V_ELC = @$(info $ ELC $@)
+AM_V_ELC = @$(info $ ELC $@$(info-trailing-newline))
AM_V_ELN =
endif
-AM_V_GEN = @$(info $ GEN $@)
+AM_V_GEN = @$(info $ GEN $@$(info-trailing-newline))
AM_V_GLOBALS = @$(info $ GEN globals.h)
AM_V_NO_PD = --no-print-directory
-AM_V_RC = @$(info $ RC $@)
+AM_V_RC = @$(info $ RC $@$(info-trailing-newline))
endif
--
2.32.0
next prev parent reply other threads:[~2022-01-20 18:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-19 8:20 bug#53358: 29.0.50; Compilation output messed up again Lars Ingebrigtsen
2022-01-19 8:36 ` Lars Ingebrigtsen
2022-01-19 9:07 ` Eli Zaretskii
2022-01-19 9:16 ` Lars Ingebrigtsen
2022-01-19 23:32 ` Paul Eggert
2022-01-19 23:53 ` Paul Eggert
2022-01-20 8:10 ` Lars Ingebrigtsen
2022-01-20 18:21 ` Paul Eggert [this message]
2022-01-21 9:24 ` Lars Ingebrigtsen
2022-01-21 22:52 ` Paul Eggert
2022-01-22 10:16 ` Lars Ingebrigtsen
2022-01-24 7:25 ` Paul Eggert
2022-01-24 9:47 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3c5c8f89-86ae-0fa9-9151-773cced53bd9@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=53358@debbugs.gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).