I am trying to set an Environment variable in a Makefile, so it can be used in another program running in the sam shell as make, but after make has run.
Update: This is not possible according to accepted answer with comments.
Steps:
- run
make testsetting env:export TEST_ENV_ONE=OneString - run another program, that can read
TEST_ENV_ONE
Tried this:
Not working:
test:
export TEST_ENV_ONE=OneString
$(shell export TEST_ENV_TWO=TwoString)
Afterwards this is empty:
echo $TEST_ENV_ONE
echo $TEST_ENV_TWO