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

📄 make-03.html

📁 unix make 文档
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; text-indent: -21.0pt; line-height: 150%; text-autospace: ideograph-numeric ideograph-other; margin-left: 72.0pt">
<span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Wingdings">
&sup2;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>
<span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">
读取一个文件,读取给定文件名的文件,将其内容作为</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">文件的一部分。</span></p>
<p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; text-indent: -21.0pt; line-height: 150%; text-autospace: ideograph-numeric ideograph-other; margin-left: 72.0pt">
<span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Wingdings">
&sup2;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>
<span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">
决定(通常是根据一个变量的得值)处理或者忽略</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">Makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">中的某一特定部分。</span></p>
<p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; text-indent: -21.0pt; line-height: 150%; text-autospace: ideograph-numeric ideograph-other; margin-left: 72.0pt">
<span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Wingdings">
&sup2;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>
<span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">
定义一个多行变量。</span></p>
<p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; text-indent: -21.0pt; line-height: 150%; text-autospace: ideograph-numeric ideograph-other; margin-left: 51.0pt">
<span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Wingdings">
&sup2;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>
<span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">注释:</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">Makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">中“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">#</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”字符后的内容被作为是注释内容(和</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">shell</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">脚本一样)处理。如果此行的第一个非空字符为“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">#</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”,那么此行为注释行。注释行的结尾如果存在反斜线(</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">\</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">),那么下一行也被作为注释行。一般在书写</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">Makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">时推荐将注释作为一个独立的行,而不要和</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">Makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">的有效行放在一行中书写。当在</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">Makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">中需要使用字符“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">#</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”时,可以使用反斜线加“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">#</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”(</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">\#</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">)来实现(对特殊字符“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">#</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”的转义),其表示将“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">#</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”作为一字符而不是注释的开始标志。</span></p>
<p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; text-indent: 24.1pt; line-height: 150%; text-autospace: ideograph-numeric ideograph-other">
<b><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">
需要注意的地方:</span></b></p>
<p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; text-indent: 24.0pt; line-height: 150%; text-autospace: ideograph-numeric ideograph-other">
<span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">
Makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">中第一个规则之后的所有以</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">[Tab]</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">字符开始的的行,</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">程序都会将其交给系统</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">shell</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">程序去解释执行。因此,以</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">[Tab]</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">字符开始的注释行也会被交给</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">shell</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">来处理,此命令行是否需要被执行(</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">shell</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">执行或者忽略)是由系统</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">shell</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">程序来判决的。</span></p>
<p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; text-indent: 24.0pt; line-height: 150%; text-autospace: ideograph-numeric ideograph-other">
<span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">
另外,在使用指示符“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">define</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”定义一个多行的变量或者命令包时,其定义体(“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">define</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”和“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">endef</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”之间的内容)会被完整的展开到</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">Makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">中引用此变量的地方(包含定义体中的注释行);</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">在引用此变量的地方对所有的定义体进行处理,决定是注释还是有效内容。</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">Makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">中变量的引用和</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">C</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">语言中的宏类似(但是其实质并不相同,后续将会详细讨论)。对一个变量引用的地方</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">所做的就是将这个变量根据定义进行基于文本的展开,展开变量的过程不涉及到任何变量的具体含义和功能分析。</span></p>
<h2><a name="_gnu_make_3.2"><span lang="EN-US" style="font-size: 14.0pt"><b>3.2 </b>makefile</span><span style="font-size: 14.0pt; font-family: 楷体_GB2312">文件的命名</span></a></h2>
<p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; text-indent: 24.0pt; line-height: 150%; text-autospace: ideograph-numeric ideograph-other">
<span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">
默认的情况下,</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">会在工作目录(执行</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">的目录)下按照文件名顺序寻找</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">文件读取并执行,查找的文件名顺序为:“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">GNUmakefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”、“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”、“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">Makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”。</span></p>
<p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; text-indent: 24.0pt; line-height: 150%; text-autospace: ideograph-numeric ideograph-other">
<span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">
通常应该使用“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”或者“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">Makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”作为一个</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">的文件名(我们推荐使用“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">Makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”,首字母大写而比较显著,一般在一个目录中和当前目录的一些重要文件(</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">README,Chagelist</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">等)靠近,在寻找时会比较容易的发现它)。而“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">GNUmakefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”是我们不推荐使用的文件名,因为以此命名的文件只有“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">GNU 
make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”才可以识别,而其他版本的</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">程序只会在工作目录下“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”和“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">Makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”这两个文件。</span></p>
<p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; text-indent: 24.0pt; line-height: 150%; text-autospace: ideograph-numeric ideograph-other">
<span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">如果</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">程序在工作目录下无法找到以上三个文件中的任何一个,它将不读取任何其他文件作为解析对象。但是根据</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">隐含规则的特性,我们可以通过命令行指定一个目标,如果当前目录下存在符合此目标的依赖文件,那么这个命令行所指定的目标将会被创建或者更新,参见注释。</span></p>
<p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; text-indent: 24.0pt; line-height: 150%; text-autospace: ideograph-numeric ideograph-other">
<span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">当</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">文件的命名不是这三个任何一个时,需要通过</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">的“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">-f</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”或者“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">--file</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”选项来指定</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">读取的</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">文件。给</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">指定</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">文件的格式为:“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">-f 
NAME</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”或者“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">—file=NAME</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”,它指定文件“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">NAME</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”作为执行</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">时读取的</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">文件。也可以通过多个“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">-f</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”或者“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">--file</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”选项来指定多个需要读取的</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">文件,多个</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">文件将会被按照指定的顺序进行链接并被</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">解析执行。当通过“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">-f</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”或者“</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">--file</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">”指定</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">读取</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">的文件时,</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">make</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">就不再自动查找这三个标准命名的</span><span lang="EN-US" style="font-size: 12.0pt; line-height: 150%; font-family: Arial">makefile</span><span style="font-size: 12.0pt; line-height: 150%; font-family: 楷体_GB2312">文件。</span></p>
<div style="mso-element:para-border-div;border:none;border-top:solid black 1.0pt;
mso-border-top-alt:solid black .5pt;padding:1.0pt 0cm 0cm 0cm">
	<p class="a"><b>
	<span style="font-size: 10.5pt; line-height: 150%; font-family: 楷体_GB2312">
	注释:通过命令指定目标使用</span><span lang="EN-US" style="font-size: 10.5pt; line-height: 150%">make</span><span style="font-size: 10.5pt; line-height: 150%; font-family: 楷体_GB2312">的隐含规则:</span></b></div>
<p class="MsoBodyTextFirstIndent" style="text-indent:21.1pt"><b>
<span style="font-family: 楷体_GB2312">当前目录下不存在以</span></b><span style="font-family: 楷体_GB2312">“</span><b><span lang="EN-US">GNUmakefile</span><span style="font-family: 楷体_GB2312">”、“</span><span lang="EN-US">makefile</span><span style="font-family: 楷体_GB2312">”、“</span><span lang="EN-US">Makefile</span><span style="font-family: 楷体_GB2312">”命名的任何文件,</span></b></p>
<p class="MsoBodyTextFirstIndent" style="text-indent: -21.0pt; margin-left: 39.0pt">
<b><span lang="EN-US">1.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style="font-family: 楷体_GB2312">当前目录下存在一个源文件</span><span lang="EN-US">foo.c</span><span style="font-family: 楷体_GB2312">的,我们可以使用“</span><span lang="EN-US">make 
foo.o</span><span style="font-family: 楷体_GB2312">”来使用</span><span lang="EN-US">make</span><span style="font-family: 楷体_GB2312">的隐含规则自动生成</span><span lang="EN-US">foo.o</span><span style="font-family: 楷体_GB2312">。当执行“</span><span lang="EN-US">make 
foo.o</span><span style="font-family: 楷体_GB2312">”时。我们可以看到其执行的命令为:</span></b></p>
<p class="MsoBodyTextFirstIndent" style="text-indent: 84.35pt"><b>
<span lang="EN-US">cc –c –o foo.o foo.c</span></b></p>
<p class="MsoBodyTextFirstIndent" style="text-indent: 42.15pt"><b>
<span style="font-family: 楷体_GB2312">之后,</span><span lang="EN-US">foo.o</span><span style="font-family: 楷体_GB2312">将会被创建或者更新。</span></b></p>
<p class="MsoBodyTextFirstIndent" style="text-indent: -21.0pt; margin-left: 39.0pt">
<b><span lang="EN-US">2.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style="font-family: 楷体_GB2312">如果当前目录下没有</span><span lang="EN-US">foo.c</span><span style="font-family: 楷体_GB2312">文件时,就是</span><span lang="EN-US">make</span><span style="font-family: 楷体_GB2312">对</span><span lang="EN-US">.o</span><span style="font-family: 楷体_GB2312">文件目标的隐含规则中依赖文件不存在。如果使用命令“</span><span lang="EN-US">make 
foo.o</span><span style="font-family: 楷体_GB2312">”时,将回到到如下提示:</span></b></p>
<p class="MsoBodyTextFirstIndent" style="text-indent: 84.35pt"><b>
<span lang="EN-US">make: *** No rule to make target ‘foo.o’. Stop.</span></b></p>

⌨️ 快捷键说明

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