Skip to content

Commit 5e7ae11

Browse files
committed
make: print-FOO temp file gaffe for parallel processes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent 52671e6 commit 5e7ae11

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎flow/scripts/variables.mk‎

Lines changed: 5 additions & 4 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$$,$($*))
226-
@echo -n "$*: "
227-
@cat /tmp/print_tmp$$
228-
@rm /tmp/print_tmp$$
225+
@tmpfile=$(shell mktemp /tmp/print_tmp.XXXXXX) && \
226+
$(file >$${tmpfile},$($*)) && \
227+
echo -n "$*: " && \
228+
cat $${tmpfile} && \
229+
rm -f $${tmpfile}

0 commit comments

Comments
 (0)