Makefile set if variable is empty

前端 未结 6 478
暖寄归人
暖寄归人 2021-01-31 01:37

I want to set a variable if it is empty. I tried in this way:

....
TEST := $(something)
...
TEST ?= $(something else)

The first $(somethi

6条回答
  •  感情败类
    2021-01-31 01:43

    Folks, I think there's a simpler solution

    KDIR ?= "foo"
    

    From: What is ?= in Makefile

提交回复
热议问题