摘要:
上例子:.IGNORE:LIBS =gao.1 gao.2 gao.3all:$(LIBS) @echo finalgao.1: gao.2 @echo gao.1gao.2: gao.3 @echo gao.2gao.3: ./me.o @echo gao.3其中,./me.o 是C语言写的程序,会显示 hello, 然后 return 2 退出。执行状况如下:./me.o hellomake: [gao.3] Error 2 (ignored)gao.3gao.2gao.1这是 .IGNORE 忽略所有错误的情况。 结束 阅读全文
摘要:
继续翻译`.SECONDARY' The targets which `.SECONDARY' depends on are treated as intermediate files, except that they are never automatically deleted. *Note Chains of Implicit Rules: Chained Rules. `.SECONDARY' with no prerequisites causes all targets to be treated as secondary (i.e., ... 阅读全文
摘要:
上例子SHELL=bash.DELETE_ON_ERRORS: LIBS=foo.gaoall: $(LIBS) @echo finalfoo.gao: @echo $@ touch $@ ./me.o其中,me.o 程序是由C语言编译而成。其内容是显示 helloworld ,然后 return 2(即非正常退出)。运行结果要看如何来运行:make --dry-run的运行结果:echo foo.gaotouch foo.gao./me.oecho final此时 ls 命令可以发现,在当前目录下,并没有 foo.gao 文件。而如果是仅仅运行 make,结果则是这样... 阅读全文