From 8bb1fd1741c2ba570a122e1e444b5ef2b3796acd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Harboe?= Date: Sat, 31 Jan 2026 10:35:49 +0100 Subject: [PATCH] make: print-FOO temp file gaffe for parallel builds within the same process MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Øyvind Harboe --- flow/scripts/variables.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/flow/scripts/variables.mk b/flow/scripts/variables.mk index ad7f867fb4..ea0cbd1b7c 100644 --- a/flow/scripts/variables.mk +++ b/flow/scripts/variables.mk @@ -222,7 +222,8 @@ print-%: # # We have to use $(file ...) because we want to be able # to print variables that contain newlines. - $(file >/tmp/print_tmp$$,$($*)) + $(eval TEMP_FILE := $(shell mktemp /tmp/print_tmp.XXXXXX)) + @$(file >$(TEMP_FILE),$($*)) @echo -n "$*: " - @cat /tmp/print_tmp$$ - @rm /tmp/print_tmp$$ + @cat $(TEMP_FILE) + @rm -f $(TEMP_FILE)