GNU make manual 翻译(三十八)

本文介绍了当make工具未能找到默认makefile时的操作流程,包括如何指定非标准makefile名称及使用内置隐式规则来构建目标文件的方法。

继续翻译

   If `make' finds none of these names, it does not use any makefile.
Then you must specify a goal with a command argument, and `make' will
attempt to figure out how to remake it using only its built-in implicit
rules.  *Note Using Implicit Rules: Implicit Rules.                

   If you want to use a nonstandard name for your makefile, you can
specify the makefile name with the `-f' or `--file' option.  The
arguments `-f NAME' or `--file=NAME' tell `make' to read the file NAME
as the makefile.  If you use more than one `-f' or `--file' option, you    
can specify several makefiles.  All the makefiles are effectively
concatenated in the order specified.  The default makefile names
`GNUmakefile', `makefile' and `Makefile' are not checked automatically
if you specify `-f' or `--file'.                          
                        

如果make 没有找到这些名字,它将不使用任何makefile。这样你就必须通过命令行参数来指定一个终点,这样make 将尝试去理解如何去利用隐式规则来重新建立一个makefile。

*Note Using Implicit Rules: Implicit Rules.

如果你想要为你的 makefile 使用一个非标准的名称,你可以通过 -f 或者 --file 选项来指定 makefile的名字。 -f NAME 或者  --file=NAME 告诉 make 去读取此 NAME 文件来作为 makefile。如果你使用了多于一个的 -f 或 --file 选项,你可以指定多个 makefile。所有的 makefile将被按照指定的顺序串连起来。

当你指定了 -f 或者 --file选项的时候,GNUmakefile , makefile , Makefile将不会被自动检查。

后文待续

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值