⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gnu make 使用手册(中译版).htm

📁 GNU Make 使用手册(中译版) Make 可自动决定一个大程序中哪些文件需要重新编译
💻 HTM
📖 第 1 页 / 共 5 页
字号:
}
DIV.MsoBodyTextIndent {
	TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; FONT-FAMILY: 宋体; TEXT-ALIGN: justify; mso-pagination: none; mso-bidi-font-size: 10.0pt; mso-font-kerning: 1.0pt; mso-char-indent-count: 2.0; mso-char-indent-size: 10.5pt; mso-bidi-font-family: "Times New Roman"
}
A:link {
	COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlink {
	COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
A:visited {
	COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlinkFollowed {
	COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
P {
	FONT-SIZE: 12pt; MARGIN-LEFT: 0cm; MARGIN-RIGHT: 0cm; FONT-FAMILY: 宋体; mso-pagination: widow-orphan; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-bidi-font-family: "Times New Roman"
}
CODE {
	mso-fareast-font-family: 黑体; mso-bidi-font-family: Century; mso-ascii-font-family: 黑体; mso-hansi-font-family: "Courier New"
}
PRE {
	FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: 黑体; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt; mso-bidi-font-family: "Times New Roman"; mso-hansi-font-family: "Courier New"
}
SAMP {
	mso-fareast-font-family: 黑体; mso-bidi-font-family: 黑体; mso-ascii-font-family: 黑体; mso-hansi-font-family: "Courier New"
}
TT {
	mso-fareast-font-family: 黑体; mso-bidi-font-family: 黑体; mso-ascii-font-family: 黑体; mso-hansi-font-family: "Courier New"
}
SPAN.t41 {
	mso-bidi-font-size: 10.5pt; mso-style-name: t41; mso-ansi-font-size: 10.5pt
}
SPAN.msoIns {
	COLOR: teal; TEXT-DECORATION: underline; text-underline: single; mso-style-name: ""; mso-style-type: export-only
}
SPAN.msoDel {
	COLOR: red; TEXT-DECORATION: line-through; mso-style-name: ""; mso-style-type: export-only
}
SPAN.msoChangeProp {
	COLOR: black; mso-style-name: ""; mso-style-type: export-only
}
DIV.Section1 {
	page: Section1
}
OL {
	MARGIN-BOTTOM: 0cm
}
UL {
	MARGIN-BOTTOM: 0cm
}
</STYLE>
</HEAD>
<BODY lang=ZH-CN style="TEXT-JUSTIFY-TRIM: punctuation; tab-interval: 21.25pt" 
vLink=purple link=blue>
<DIV class=Section1 style="LAYOUT-GRID:  15.6pt none">
<H1 style="TEXT-ALIGN: center" align=center><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">GNU Make 使用手册(中译版)<o:p></o:p></SPAN></H1>
<P class=MsoNormal><SPAN style="FONT-FAMILY: 宋体">翻译:于凤昌<SPAN 
lang=EN-US><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-FAMILY: 宋体">译者注:本人在阅读<SPAN 
lang=EN-US>Linux源代码过程中发现如果要全面了解Linux的结构、理解Linux的编程总体设计及思想必须首先全部读通Linux源代码中各级的Makefile文件。目前,在网上虽然有一些著作,但都不能全面的解释Linux源代码中各级的Makefile文件,因此本人认真阅读了GNU 
Make 使用手册(3.79)版原文,在此基础上翻译了该手册,以满足对Linux源代码有兴趣或者希望采用GCC编写程序但对缺乏GNU 
Make全面了解之人士的需要。本人是业余爱好不是专业翻译人士,如果有问题请通过电子信箱与我联系共同商讨,本人的E-mail为:<A 
href="mailto:yfc70@public2.lyptt.ha.cn">yfc70@public2.lyptt.ha.cn</A> 
。</SPAN></SPAN><B><SPAN 
style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.0pt">注意在文章中出现的斜体加粗字表示章节。</SPAN></B><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"><o:p></o:p></SPAN></P>
<H1 style="TEXT-ALIGN: center" align=center><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">GNU </SPAN><CODE><SPAN lang=EN-US 
style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 'Times New Roman'">make</SPAN></CODE><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体"> Version 3.79<o:p></o:p></SPAN></H1>
<H2><SPAN lang=EN-US style="FONT-FAMILY: 宋体">April 2000<o:p></o:p></SPAN></H2>
<P class=MsoNormal style="TEXT-ALIGN: center" align=center><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">Richard M. Stallman and Roland 
McGrath<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 18pt"><B><SPAN lang=EN-US 
style="FONT-SIZE: 18pt; FONT-FAMILY: 宋体; mso-bidi-font-size: 10.0pt"><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></SPAN></B></P>
<H1><SPAN style="FONT-FAMILY: 宋体">目录<SPAN 
lang=EN-US><o:p></o:p></SPAN></SPAN></H1>
<P class=MsoNormal style="MARGIN-LEFT: 18pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">1 <A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_1_Make_概述"><CODE><SPAN 
style="mso-fareast-font-family: 宋体; mso-ascii-font-family: 宋体; mso-hansi-font-family: 宋体; mso-ansi-font-size: 10.5pt">make概述</SPAN></CODE></A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 54pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">1.1 <A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_1.1怎样阅读本手册">怎样阅读本手册</A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 54pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">1.2 <A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_1.2问题和BUG">问题和BUG</A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 18pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">2 <A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_2_Makefile文件介绍">Makefile文件介绍</A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 54pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">2.1 <A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_2.1_规则的样式">规则的格式</A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 54pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">2.2<A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_2.2一个简单的Makefile文件">一个简单的Makefile文件</A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 54pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">2.3<A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_2.3_make是处理makefile文件的过程">make处理Makefile文件的过程</A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 54pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">2.4<A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_2.4使用变量简化makefile文件">使用变量简化Makefile文件</A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 54pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">2.5<A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_2.5_让make推断命令">让make推断命令</A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 54pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">2.6<A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_2.6_另一种风格的makefile文件">另一种风格的Makefile文件</A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 54pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">2.7<A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_2.7_在目录中删除文件的规则">在目录中删除文件的规则</A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN-LEFT: 36pt; TEXT-INDENT: -18pt; tab-stops: list 36.0pt; mso-list: l24 level1 lfo28"><![if !supportLists]><SPAN 
lang=EN-US style="FONT-FAMILY: 宋体">3<SPAN 
style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN></SPAN><![endif]><SPAN lang=EN-US style="FONT-FAMILY: 宋体"><A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_3_编写makefile文件">编写Makefile文件</A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 54pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">3.1<A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_3.1_makefile文件的内容">Makefile文件的内容</A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 54pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">3.2<A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_3.2_makfile文件名字的规定">Makefile文件的命名</A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 54pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">3.3<A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_3.3_包含其它的makefile文件">包含其它的Makefile文件</A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 54pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">3.4<A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_3.4_环境变量makefiles"><CODE><SPAN 
style="mso-fareast-font-family: 宋体; mso-ascii-font-family: 宋体; mso-hansi-font-family: 宋体; mso-ansi-font-size: 10.5pt">变量MAKEFILES</SPAN></CODE></A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 54pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">3.5<A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_3.5_makefile文件重新生成的过程">Makefile文件重新生成的过程</A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 54pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">3.6<A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_3.6_解决其它makefile文件中的冲突">重载其它Makefile文件</A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 54pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">3.7<A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_3.7_make读取makefile文件的过程">make读取Makefile文件的过程</A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 18pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">4 <A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_4编写规则">编写规则</A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 54pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">4.1<A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_4.1规则的语法">规则的语法</A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 54pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">4.2<A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_4.2_在文件名中使用通配符">在文件名中使用通配符</A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 90pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">4.2.1<A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_4.2.1通配符的例子">通配符例子</A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 90pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">4.2.2<A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_4.2.2使用通配符的常见错误">使用通配符的常见错误</A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 90pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">4.2.3<A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_4.2.3通配符函数"><CODE><SPAN 
style="mso-fareast-font-family: 宋体; mso-ascii-font-family: 宋体; mso-hansi-font-family: 宋体; mso-ansi-font-size: 10.5pt">函数wildcard</SPAN></CODE></A> 
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 54pt"><SPAN lang=EN-US 
style="FONT-FAMILY: 宋体">4.3<A 
href="http://lsec.cc.ac.cn/~peace/articles/gnumaketranslated.html#_4.3在不同文件夹中搜寻依赖">在目录中搜寻依赖</A> 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -