I'm trying to write a make task that will export all variables from my .env file, which should look like this:
A=1
B=2
If I type in terminal:
set -a
. ./.env
set +a
it works perfectly.
But same task in Makefile doesn't work:
export.env:
set -a
. ./.env
set +a
make export.env # done
printenv | grep A # nothing!
I need these vars to persist after make task finished.