linux - What's the meaning of ?= in a kernel makefile? -
this question has answer here:
i've started learning building external linux kernel modules, , in documentation examples of kbuild (here) i've come across line
kdir ?= /lib/modules/$(shell uname -r)/build which used in
make -c $(kdir) m=$(pwd) and sets directory kernel source. now, what's meaing of ?= operator? google gives me nothing! conditional assignment? sort of, "define variable follows unless exists in environment"?
thanks!
in makefile, sets value of kdir if doesn't yet have one.
from gnu make documentation on "how use variables":
this called conditional variable assignment operator
Comments
Post a Comment