上一页 1 ··· 75 76 77 78 79 80 81 82 83 ··· 104 下一页
摘要: 为了学习 .EXPORT_ALL_VARIABLES ,查阅了如下的文章:http://blog.csdn.net/zplove003/article/details/7066595这个文章写得很棒,演示了makefile 的嵌套调用。这里我把其中的 顶层 Makefile改一下,用 .EXPORT_ALL_VARIABLES 来代替。//顶层目录下的Makeflie文件cc=gcc SUBD... 阅读全文
posted @ 2012-09-25 12:51 健哥的数据花园 阅读(3410) 评论(0) 推荐(0) 编辑
摘要: 继续翻译`.EXPORT_ALL_VARIABLES' Simply by being mentioned as a target, this tells `make' to export all variables to child processes by default. *Note Communicating Variables to a Sub-`make': Variables/Recursion.通过简单地声明 .EXPORT_ALL_VARIABLES ,可以告诉 make 来到出所有的变量给 子进程。*Note Communicating Varia. 阅读全文
posted @ 2012-09-25 10:10 健哥的数据花园 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 继续翻译`.SILENT' If you specify prerequisites for `.SILENT', then `make' will not print the recipe used to remake those particular files before executing them. The recipe for `.SILENT' is ignored. If mentioned as a target with no prerequisites, `.SILENT' says not to print any recipe 阅读全文
posted @ 2012-09-25 09:50 健哥的数据花园 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 继续翻译`.LOW_RESOLUTION_TIME' If you specify prerequisites for `.LOW_RESOLUTION_TIME', `make' assumes that these files are created by commands that generate low resolution time stamps. The recipe for the `.LOW_RESOLUTION_TIME' target are ignored. The high resolution file time stamps of 阅读全文
posted @ 2012-09-25 09:42 健哥的数据花园 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 上例子:.IGNORE: gao.3LIBS =gao.1 gao.2 gao.3all:$(LIBS) @echo finalgao.1: gao.2 @echo gao.1gao.2: gao.3 ./me.o @echo gao.2gao.3: @echo gao.3运行结果:gao.3./me.ohellomake:***[gao.2] Error 2此时由于仅忽略 gao.3 中的错误,所以在 gao.2 中失败退出了。结束 阅读全文
posted @ 2012-09-25 09:07 健哥的数据花园 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 上例子:.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 忽略所有错误的情况。 结束 阅读全文
posted @ 2012-09-24 15:24 健哥的数据花园 阅读(450) 评论(0) 推荐(0) 编辑
摘要: 继续翻译`.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., ... 阅读全文
posted @ 2012-09-24 15:08 健哥的数据花园 阅读(414) 评论(0) 推荐(0) 编辑
摘要: 上例子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,结果则是这样... 阅读全文
posted @ 2012-09-24 14:56 健哥的数据花园 阅读(422) 评论(0) 推荐(0) 编辑
摘要: 上例子LIBS=foo.gao bar.gao.INTERMEDIATE:$(LIBS).SECONDARY:bar.gaoall: $(LIBS) #passfoo.gao: @echo $@ touch $@bar.gao: @echo $@ touch $@ make --dry-run 的结果:foo.gaotouch foo.gaobar.gaotouch bar.gao#passrm foo.gao可见,SECONDARY 确实起到了保护 中间文件的作用结束 阅读全文
posted @ 2012-09-21 16:51 健哥的数据花园 阅读(1282) 评论(0) 推荐(0) 编辑
摘要: 先看例子一.INTERMEDIATE: foo.gaoall: foo.gao #passfoo.gao: @echo "test" touch foo.gao$make --dry-runtesttouch foo.gao#passrm foo.gao再看例子二all: foo.gao #passfoo.gao: @echo "test" touch foo.gao$make --dry-runtesttouch foo.gao#pass结束 阅读全文
posted @ 2012-09-21 16:16 健哥的数据花园 阅读(842) 评论(0) 推荐(0) 编辑
上一页 1 ··· 75 76 77 78 79 80 81 82 83 ··· 104 下一页