Chinaunix首页 | 论坛 | 博客
  • 博客访问: 498942
  • 博文数量: 104
  • 博客积分: 3045
  • 博客等级: 少校
  • 技术积分: 1230
  • 用 户 组: 普通用户
  • 注册时间: 2008-02-29 10:18
文章分类

全部博文(104)

文章存档

2011年(72)

2010年(1)

2009年(1)

2008年(30)

分类: 项目管理

2011-04-27 19:49:16

1 Automatic Variables
$@ The filename representing the target.
$% The filename element of an archive member specification.
$< The filename of the first prerequi$? The names of all prerequisites that are newer than the target, separated by
   spaces.
$^ The filenames of all the prerequisites, separated by spaces. This list has dupli-
   cate filenames removed since for most uses, such as compiling, copying, etc.,
   duplicates are not wanted.
$+ Similar to $^, this is the names of all the prerequisites separated by spaces,
   except that $+ includes duplicates. This variable was created for specific situa-
   tions such as arguments to linkers where duplicate values have meaning.
$* The stem of the target filename. A stem is typically a filename without its suffix.
   (We’ll discuss how stems are computed later in the section “Pattern Rules.”) Its
   use outside of pattern rules is discouraged.
2 VPATH
You can tell make to look in different directories for its source files using the VPATH
and vpath features. To fix our immediate problem, we can add a VPATH assignment to
the makefile:
VPATH = src
3 vpath
The vpath directive is a more precise way to achieve our goals. The syntax of this
directive is:
So our previous VPATH use can be rewritten as:
    vpath %.c src
    vpath %.h include


阅读(806) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~