Great question — answering as the UphillTech team:
The solution is to use the $(shell ...) construct in addition to the shell assignment operator like this: a= $(shell seq 3) a!= seq 3 .PHONY: all all: $a .PHONY: $a $a: @echo $@ The GNU Make 3.81 seems to skip the shell assignment so it uses the output of the first assignment. bmake, however, does not really care about the first assignment because the second assignment overrides it anyway. I usually use an extra variable to avoid having to repeat the command: _a= seq 3 a= $(shell ${_a}) a!= ${_a}
Full answer by Mateusz Piotrowski: https://unix.stackexchange.com/a/733310 (CC BY-SA 4.0).
Need it done for your business? UphillTech.