Beware, this will probably not work as intended: as each Makefile command is executed in its own subshell, sourcing myscript will modify only the local environment, not the whole Makefile's one.
example:
debug: setup
@echo "*** debug"
export | grep ENVVAR || echo "ENVVAR not found" #(a)
setup:
@echo "*** setup"
export ENVVAR=OK; export | grep ENVVAR || echo "ENVVAR not found" #(b)
export | grep ENVVAR || echo "ENVVAR not found" #(c)
output:
$ make debug
*** setup
export ENVVAR=OK; export | grep ENVVAR || echo "ENVVAR not found" #(b)
export ENVVAR='OK'
export | grep ENVVAR || echo "ENVVAR not found" #(c)
ENVVAR not found
*** debug
export | grep ENVVAR || echo "ENVVAR not found" #(a)
ENVVAR not found
As you can see, ENVVAR is found only in command (b), but commands (a) and (b) are executed in a new, clean environment.