1,FORCE
原理:一个没有prerequistes和recipe的target总是会被更新,导致每个以该target为prerequistes的rule总是会被执行。
示例:
T1:P1
CMDXX
P1:FORCE
CMDYY
FORCE:
上例中,每次运行此makefile时,即使P1文件已存在,都会保证运行第二条rule更新P1。
2, 头文件更新自动检测
#Makefile
all:
echo ${ABC}
dependency:
echo ABC=abc > dependency
include dependency
运行结果:
Makefile:8: dependency: No such file or directory
Creating dependency
abc