I am trying to do a simple thing:
TMPDIR ?= /tmp
$ make test
$ make test -e TMPDIR=~/tmp
$ TMPDIR=~/tmp make test
To follow up on my comments above, here's an example:
T ?= foo all:;: '$(T)'
Now if I run the various options it behaves as expected (I get
foo only if I don't set
T either on the command line or environment):
$ make : 'foo' $ make T=bar : 'bar' $ T=bar make : 'bar'