Chinaunix首页 | 论坛 | 博客
  • 博客访问: 187020
  • 博文数量: 45
  • 博客积分: 1456
  • 博客等级: 上尉
  • 技术积分: 535
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-21 17:47
文章分类
文章存档

2012年(1)

2009年(43)

2008年(1)

我的朋友

分类: LINUX

2009-11-11 13:22:27

Makefile 的組成 (compoments)
1. explicit rules
2. implicit rules
3. variable definitions
4. directives
5. comments


1. 利用 origin function 可以知道某一個變數是從何處來的

Example:
ifdef V
ifeq ("$(origin V)", "command line")



The result of this function is a string telling you how the variable variable was defined:

`undefined'
if variable was never defined.
`default'
if variable has a default definition, as is usual with CC and so on. See Variables Used by Implicit Rules. Note that if you have redefined a default variable, the origin function will return the origin of the later definition.
`environment'
if variable was defined as an environment variable and the `-e' option is not turned on (see Summary of Options).
`environment override'
if variable was defined as an environment variable and the `-e' option is turned on (see Summary of Options).
`file'
if variable was defined in a makefile.
`command line'
if variable was defined on the command line.
`override'
if variable was defined with an override directive in a makefile (see The override Directive).
`automatic'
if variable is an automatic variable defined for the execution of the commands for each rule (see Automatic Variables).
阅读(1500) | 评论(0) | 转发(0) |
0

上一篇:kernel timer_list usage

下一篇:windbg step by step

给主人留下些什么吧!~~