gnu make

  http://stackoverflow.com/questions/448910/makefile-variable-assignment

 更加全面的介绍 http://blog.csdn.net/ruglcc/article/details/7814546/

这个是原作者http://blog.csdn.net/haoel/article/details/2896

 

Lazy Set

VARIABLE = value

Normal setting of a variable - values within it are recursively expanded when the variable is used, not when it's declared

Immediate Set

VARIABLE := value

Setting of a variable with simple expansion of the values inside - values within it are expanded at declaration time.

Set If Absent

VARIABLE ?= value

Setting of a variable only if it doesn't have a value

Append

VARIABLE += value

Appending the supplied value to the existing value (or setting to that value if the variable didn't exist)

 

 

还有一个在“嵌套执行”中比较有用的参数,“-w”或是“--print-directory”会在make的过程中输出一些信息,让你看到目前的工作目录。比如,如果我们的下级make目录是“/home/hchen/gnu/make”,如果我们使用“make -w”来执行,那么当进入该目录时,我们会看到:

      make: Entering directory `/home/hchen/gnu/make'.

而在完成下层make后离开目录时,我们会看到:   

   make: Leaving directory `/home/hchen/gnu/make'

当你使用“-C”参数来指定make下层Makefile时,“-w”会被自动打开的。如果参数中有“-s”(“--slient”)或是“--no-print-directory”,那么,“-w”总是失效的。

 

转载于:https://www.cnblogs.com/luolizhi/p/5405720.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值