Skip to content

Commit 3ef8cb7

Browse files
authored
Merge pull request #3852 from Pinata-Consulting/make-print-parallel-gaffe
make: print-FOO temp file gaffe for parallel processes
2 parents 06d11b0 + be0dbf3 commit 3ef8cb7

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)