3 ms·
If turns CFLAGS from a recursive variable to a simple one. Hence it will not be re-expanded every time it is used. This is a speed optimization. $ cat Make
by jgrahamc 8y ago
If turns CFLAGS from a recursive variable to a simple one. Hence it will not be re-expanded every time it is used. This is a speed optimization.
$ cat Makefile
CFLAGS = -Wall
$(info $(flavor CFLAGS))
CFLAGS := $(CFLAGS)
$(info $(flavor CFLAGS))
$ make
recursive
simple
But TFA says that the author is using := to prevent a recursive definition. It's unclear why the author doesn't just += without doing = or := (unless they want the recursive to simple conversion I talk about above). My guess is the author sligthly misunderstood the handling of the environment inside a Makefile.