define&endef 1. 命令包(canned recipes)&多行变量(muti-line variables) The define directive is followed on the same line by the name of the variable being defined and an (optional) assignment operator, and nothing more. The value to give the variable appea
在makefile中赋值方式有:'='.':='.'?='和'+='. A = a $(B) B = b all: echo $(A) #运行结果:echo a b a b 这种赋值方式是没有先后顺序的,但是这种赋值方式可能会出现问题,例如递归定义时:A = $(A) A := a $(B) B = b all: echo $(A) # 运行结果:echo a a 这种赋值方式有先后顺序,只能使用已经定义的变量. A = a A ?= b B ?= c all: echo $(A) $(B) #