clearmake和gnu make都可以检测出来target之间的循环依赖

前端之家收集整理的这篇文章主要介绍了clearmake和gnu make都可以检测出来target之间的循环依赖前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

[jialiang@ht191w tmp]$ make -f mk clean # gnu make
make: Circular target <- clean dependency dropped.
echo "clean is called"
clean is called
echo "clean running"
clean running
echo "current dir is: "
current dir is:
pwd
/home/jialiang/tmp
[jialiang@ht191w tmp]$ cmake -f mk clean # clearmake
clearmake: Warning: Cycle in dependency graph?
clearmake: Warning: "clean" was already seen. echo "clean is called" clean is called echo "clean running" clean running echo "current dir is: " current dir is: pwd /home/jialiang/tmp [jialiang@ht191w tmp]$ cat mk # Marco/Variable define a = "great" # Target/Dependency define all: echo "great" .PHONY: clean clean: target echo "clean running" ifeq ($(a),great) echo "equals" endif ifneq ($(a),dd) echo "current dir is: " pwd endif target: clean echo "clean is called" # this line is useless,unless you put it the first line when you start define target default: clean

猜你在找的设计模式相关文章