Skip to content

Commit 8bb1fd1

Browse files
committed
make: print-FOO temp file gaffe for parallel builds within the same process
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent 52671e6 commit 8bb1fd1

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎flow/scripts/variables.mk‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ print-%:
222222
#
223223
# We have to use $(file ...) because we want to be able
224224
# to print variables that contain newlines.
225-
$(file >/tmp/print_tmp$$,$($*))
225+
$(eval TEMP_FILE := $(shell mktemp /tmp/print_tmp.XXXXXX))
226+
@$(file >$(TEMP_FILE),$($*))
226227
@echo -n "$*: "
227-
@cat /tmp/print_tmp$$
228-
@rm /tmp/print_tmp$$
228+
@cat $(TEMP_FILE)
229+
@rm -f $(TEMP_FILE)

0 commit comments

Comments
 (0)