自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(0)
  • 资源 (20)
  • 收藏
  • 关注

空空如也

GNU make manual

GNU make manual(English editon) Table of Contents 1 Overview of make. . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1 How to Read This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Problems and Bugs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 An Introduction to Makefiles . . . . . . . . . . . . . . . 3 2.1 What a Rule Looks Like . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.2 A Simple Makefile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.3 How make Processes a Makefile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.4 Variables Make Makefiles Simpler. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.5 Letting make Deduce the Commands . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.6 Another Style of Makefile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.7 Rules for Cleaning the Directory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3 Writing Makefiles . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.1 What Makefiles Contain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.2 What Name to Give Your Makefile . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.3 Including Other Makefiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.4 The Variable MAKEFILES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.5 The Variable MAKEFILE_LIST. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.6 Other Special Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.7 How Makefiles Are Remade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.8 Overriding Part of Another Makefile . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.9 How make Reads a Makefile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.10 Secondary Expansion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4 Writing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 4.1 Rule Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 4.2 Types of Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 4.3 Using Wildcard Characters in File Names . . . . . . . . . . . . . . . . . . . . 24 4.3.1 Wildcard Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.3.2 Pitfalls of Using Wildcards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.3.3 The Function wildcard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 4.4 Searching Directories for Prerequisites . . . . . . . . . . . . . . . . . . . . . . . 26 4.4.1 VPATH: Search Path for All Prerequisites. . . . . . . . . . . . . . . . . 27 4.4.2 The vpath Directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 4.4.3 How Directory Searches are Performed . . . . . . . . . . . . . . . . . . 28 4.4.4 Writing Shell Commands with Directory Search . . . . . . . . . . 29 4.4.5 Directory Search and Implicit Rules . . . . . . . . . . . . . . . . . . . . . 29 4.4.6 Directory Search for Link Libraries . . . . . . . . . . . . . . . . . . . . . . 30 4.5 Phony Targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 4.6 Rules without Commands or Prerequisites. . . . . . . . . . . . . . . . . . . . 33 4.7 Empty Target Files to Record Events . . . . . . . . . . . . . . . . . . . . . . . . 33iv GNU make 4.8 Special Built-in Target Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.9 Multiple Targets in a Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 4.10 Multiple Rules for One Target. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 4.11 Static Pattern Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 4.11.1 Syntax of Static Pattern Rules . . . . . . . . . . . . . . . . . . . . . . . . . 37 4.11.2 Static Pattern Rules versus Implicit Rules . . . . . . . . . . . . . . 39 4.12 Double-Colon Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 4.13 Generating Prerequisites Automatically . . . . . . . . . . . . . . . . . . . . . 40 5 Writing the Commands in Rules . . . . . . . . . . . 43 5.1 Command Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 5.1.1 Splitting Command Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 5.1.2 Using Variables in Commands . . . . . . . . . . . . . . . . . . . . . . . . . . 45 5.2 Command Echoing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 5.3 Command Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 5.3.1 Choosing the Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 5.4 Parallel Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 5.5 Errors in Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 5.6 Interrupting or Killing make . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 5.7 Recursive Use of make . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 5.7.1 How the MAKE Variable Works . . . . . . . . . . . . . . . . . . . . . . . . . . 50 5.7.2 Communicating Variables to a Sub-make. . . . . . . . . . . . . . . . . 51 5.7.3 Communicating Options to a Sub-make . . . . . . . . . . . . . . . . . . 53 5.7.4 The ‘--print-directory’ Option. . . . . . . . . . . . . . . . . . . . . . . 54 5.8 Defining Canned Command Sequences . . . . . . . . . . . . . . . . . . . . . . . 55 5.9 Using Empty Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 6 How to Use Variables . . . . . . . . . . . . . . . . . . . . . 57 6.1 Basics of Variable References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 6.2 The Two Flavors of Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 6.3 Advanced Features for Reference to Variables. . . . . . . . . . . . . . . . . 60 6.3.1 Substitution References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 6.3.2 Computed Variable Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 6.4 How Variables Get Their Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 6.5 Setting Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 6.6 Appending More Text to Variables . . . . . . . . . . . . . . . . . . . . . . . . . . 64 6.7 The override Directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 6.8 Defining Variables Verbatim. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 6.9 Variables from the Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 6.10 Target-specific Variable Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 6.11 Pattern-specific Variable Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 7 Conditional Parts of Makefiles . . . . . . . . . . . . . 71 7.1 Example of a Conditional . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 7.2 Syntax of Conditionals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 7.3 Conditionals that Test Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 v 8 Functions for Transforming Text . . . . . . . . . . . 77 8.1 Function Call Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 8.2 Functions for String Substitution and Analysis . . . . . . . . . . . . . . . 78 8.3 Functions for File Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 8.4 Functions for Conditionals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 8.5 The foreach Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 8.6 The call Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 8.7 The value Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 8.8 The eval Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 8.9 The origin Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 8.10 The flavor Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 8.11 The shell Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 8.12 Functions That Control Make . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 9 How to Run make . . . . . . . . . . . . . . . . . . . . . . . . . 91 9.1 Arguments to Specify the Makefile. . . . . . . . . . . . . . . . . . . . . . . . . . . 91 9.2 Arguments to Specify the Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 9.3 Instead of Executing the Commands . . . . . . . . . . . . . . . . . . . . . . . . . 93 9.4 Avoiding Recompilation of Some Files . . . . . . . . . . . . . . . . . . . . . . . 94 9.5 Overriding Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 9.6 Testing the Compilation of a Program . . . . . . . . . . . . . . . . . . . . . . . 95 9.7 Summary of Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 10 Using Implicit Rules . . . . . . . . . . . . . . . . . . . . 101 10.1 Using Implicit Rules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 10.2 Catalogue of Implicit Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 10.3 Variables Used by Implicit Rules . . . . . . . . . . . . . . . . . . . . . . . . . . 105 10.4 Chains of Implicit Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 10.5 Defining and Redefining Pattern Rules . . . . . . . . . . . . . . . . . . . . . 108 10.5.1 Introduction to Pattern Rules . . . . . . . . . . . . . . . . . . . . . . . . 109 10.5.2 Pattern Rule Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 10.5.3 Automatic Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 10.5.4 How Patterns Match . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 10.5.5 Match-Anything Pattern Rules . . . . . . . . . . . . . . . . . . . . . . . 113 10.5.6 Canceling Implicit Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 10.6 Defining Last-Resort Default Rules . . . . . . . . . . . . . . . . . . . . . . . . 114 10.7 Old-Fashioned Suffix Rules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 10.8 Implicit Rule Search Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 11 Using make to Update Archive Files . . . . . . 119 11.1 Archive Members as Targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 11.2 Implicit Rule for Archive Member Targets. . . . . . . . . . . . . . . . . . 119 11.2.1 Updating Archive Symbol Directories . . . . . . . . . . . . . . . . . 120 11.3 Dangers When Using Archives . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 11.4 Suffix Rules for Archive Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 12 Features of GNU make . . . . . . . . . . . . . . . . . . 123 vi GNU make 13 Incompatibilities and Missing Features . . . 127 14 Makefile Conventions . . . . . . . . . . . . . . . . . . . 129 14.1 General Conventions for Makefiles . . . . . . . . . . . . . . . . . . . . . . . . . 129 14.2 Utilities in Makefiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 14.3 Variables for Specifying Commands . . . . . . . . . . . . . . . . . . . . . . . . 131 14.4 Variables for Installation Directories . . . . . . . . . . . . . . . . . . . . . . . 132 14.5 Standard Targets for Users. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 14.6 Install Command Categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

2010-07-25

面试算法题目大收集 题很多

面试 算法题目 大收集 题很多,来自各大公司

2010-06-06

百度面试题大收集算法

百度面试题大收集百度面试题大收集百度面试题大收集

2010-06-06

C/C++笔试题目大全收藏

C/C++笔试题目大全收藏C/C++笔试题目大全收藏

2010-06-06

程序员面试题精选 题很多

程序员面试题精选程序员面试题精选程序员面试题精选

2010-06-06

linux面试题参考答案

linux面试题参考答案linux面试题参考答案

2010-06-06

微软经典101道面试题

微软经典101道面试题,大部分英文,有难度

2010-06-06

程序员面试精选 主要是数据结构和算法

程序员面试精选 主要是数据结构和算法,题很多,60多页 其中有很多是微软面试题

2010-06-06

我们学校的算法导论实验要求

我们学校的算法导论实验要求,谁写了代码共享一下

2009-12-11

算法导论老师手册和答案配套使用

麻省算法导论 老师手册 (和答案配套使用效果更好)

2009-12-11

算法导论习题答案 英文

算法 导论习题 答案 英文 清晰 algorithm

2009-12-11

游戏开发Learning XNA 3.0

Learning XNA 3.0 c#游戏开发 英文

2009-12-11

苏大人工智能课件(搜索推理技术之消解原理)

苏大人工智能课件(搜索推理技术之消解原理)

2009-12-11

苏大人工智能课件(搜索推理技术)

苏大人工智能课件(搜索推理技术之搜索推理)

2009-12-11

苏大人工智能课件(绪论)

人工智能的定义与发展 人类智能与人工智能 人工智能各学派的认知观 人工智能的研究目标 人工智能的研究与应用领域

2009-12-11

中科大.NET(ADO.NET)

中科大.NET(ADO.NET)数据库开发相关

2009-12-11

中科大.net课件(ASP.NET)

中科大.net课件(ASP.NET)开发WEB应用

2009-12-11

中科大.NET课件(讲解CLR)

中科大.NET课件(讲解CLR)通用语言运行时

2009-12-11

Understanding .NET A Tutorial And Analysis

Microsoft's .NET is revolutionizing Windows-based software development. Since its initial release in 2002, .NET has changed significantly, becoming the foundation for a new generation of Windows applications.

2009-09-14

C++笔试面试宝典2009版

C++笔试面试宝典2009版,1.new、delete、malloc、free关系2.delete与 delete []区别……

2009-09-13

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除