|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
目 录Table of Contents
GNU make中文手册.....................................................................................................................1
ver - 3.8......................................................................................................................................1
第一章:概述...............................................................................................................................7
1.1 概述................................................................................................................................7
1.2 准备知识..........................................................................................................................8
第二章 GNU make 介绍.............................................................................................................9
2 GNU make 介绍....................................................................................................................9
2.1 Makefile简介..................................................................................................................10
2.2 Makefile规则介绍...........................................................................................................11
2.3 简单的示例.....................................................................................................................12
2.4 make如何工作...............................................................................................................13
2.5 指定变量........................................................................................................................15
2.6 自动推导规则.................................................................................................................16
2.7 另类风格的makefile.......................................................................................................17
2.8 清除工作目录过程文件...................................................................................................18
第三章:Makefile 总述..............................................................................................................20
3 Makefile总述........................................................................................................................20
3.1 Makefile的内容...............................................................................................................20
3.2 makefile文件的命名.......................................................................................................21
3.3 包含其它makefile文件....................................................................................................22
3.4 变量 MAKEFILES..........................................................................................................24
3.5 变量 MAKEFILE_LIST..................................................................................................26
3.6 其他特殊变量.................................................................................................................26
3.7 makefile文件的重建.......................................................................................................27
3.8 重载另外一个makefile....................................................................................................28
3.9 make如何解析makefile文件...........................................................................................30
3.9.1 变量取值..................................................................................................................30
3.9.2 条件语句..................................................................................................................31
3.9.3 规则的定义...............................................................................................................31
3.10 总结...............................................................................................................................31
第四章:Makefile的规则............................................................................................................33
4 Makefile规则........................................................................................................................33
4.1 一个例子........................................................................................................................33
4.2 规则语法........................................................................................................................34
4.3 依赖的类型.....................................................................................................................35
4.4 文件名使用通配符..........................................................................................................36
4.4.1 统配符使用举例........................................................................................................37
4.4.2 通配符存在的缺陷....................................................................................................38
4.4.3 函数wildcard............................................................................................................38
4.5 目录搜寻........................................................................................................................39
4.5.1 一般搜索(变量VPATH)........................................................................................39
4.5.2 选择性搜索(关键字vpath)....................................................................................40
4.5.3 目录搜索的机制........................................................................................................41
4.5.4 命令行和搜索目录....................................................................................................44
4.5.5 隐含规则和搜索目录.................................................................................................44
4.5.6 库文件和搜索目录....................................................................................................45
2004年9月11日 2
GNU make中文手册
4.6 Makefile伪目标...............................................................................................................46
4.7 强制目标(没有命令或依赖的规则).............................................................................50
4.8 空目标文件.....................................................................................................................50
4.9 Makefile的特殊目标.......................................................................................................51
4.10 多目标............................................................................................................................54
4.11 多规则目标.....................................................................................................................55
4.12 静态模式........................................................................................................................56
4.12.1 静态模式规则的语法.......................................................................................56
4.12.2 静态模式和隐含规则.......................................................................................58
4.13 双冒号规则.....................................................................................................................59
4.14 自动产生依赖.................................................................................................................60
第五章:规则的命令..................................................................................................................63
5 为规则书写命令...................................................................................................................63
5.1 命令回显........................................................................................................................63
5.2 命令的执行.....................................................................................................................64
5.3 并发执行命令.................................................................................................................65
5.4 命令执行的错误..............................................................................................................67
5.5 中断make的执行............................................................................................................68
5.6 make的递归执行............................................................................................................69
5.6.1 变量MAKE...............................................................................................................70
5.6.2 变量和递归...............................................................................................................71
5.6.3 命令行选项和递归....................................................................................................75
5.6.4 -w选项......................................................................................................................77
5.7 定义命令包.....................................................................................................................78
5.8 空命令............................................................................................................................80
第六章:Makefile中的变量.........................................................................................................81 |
|