I want to do immediate expansion of a shell command within a Makefile, but I want the shell command to have access to the environment variables within the Makefile. If I us
Is this what you want?
VAR2 := $(shell VAR1="$(VAR1)" script_that_uses_var1)