CFLAGS := ${CFLAGS}
CFLAGS += -ansi -std=99
What's the point of the first line? Why not just: CFLAGS += -ansi -std=99 CFLAGS := ${CFLAGS}
CFLAGS += -ansi -std=99
What's the point of the first line? Why not just: CFLAGS += -ansi -std=99 $ 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.[1] should be -std=c99
$ cat Makefile
FOO += foo
all: ; @echo $(FOO)
$ make
foo