linux - What's the meaning of ?= in a kernel makefile? -


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

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -