In a Makefile, I\'m trying to assign the result of a shell command to a variable:
TMP=`mktemp -d /tmp/.XXXXX` all: echo $(TMP) echo $(TMP)
If you’re using GNU Make, instead of using backticks, use $(shell ...). For example,
$(shell ...)
TMP=$(shell mktemp -d /tmp/.XXXXX)