Define a Makefile variable using a ENV variable or a default value

To follow up on my comments above, here’s an example:

T ?= foo
all:
        : '$(T)'

Now if I run the Makefile in various ways, it behaves as we expect (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'

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)