?? ch20_03.htm
字號(hào):
<html><head><title>Description File Lines (UNIX in a Nutshell: System V Edition)</title><link rel="stylesheet" type="text/css" href="../style/style1.css" /><meta name="DC.Creator" content="Arnold Robbins" /><meta name="DC.Format" content="text/xml" scheme="MIME" /><meta name="DC.Language" content="en-US" /><meta name="DC.Publisher" content="O'Reilly & Associates, Inc." /><meta name="DC.Source" scheme="ISBN" content="1-56592-427-4" /><meta name="DC.Subject.Keyword" content="stuff" /><meta name="DC.Title" content="UNIX in a Nutshell: System V Edition" /><meta name="DC.Type" content="Text.Monograph" /></head><body bgcolor="#ffffff"><img src="gifs/smbanner.gif" usemap="#banner-map" border="0" alt="Book Home" /><map name="banner-map"><area shape="rect" coords="1,-2,616,66" href="index.htm" alt="Book Title" /><area shape="rect" coords="629,-11,726,25" href="jobjects/fsearch.htm" alt="Search this book" /></map><div class="navbar"><table width="684" border="0"><tr><td align="left" valign="top" width="228"><a href="ch20_02.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0" /></a></td><td align="center" valign="top" width="228" /><td align="right" valign="top" width="228"><a href="ch20_04.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr></table></div><h2 class="sect1">20.3. Description File Lines</h2><p><a name="IXT-20-123606" /><a name="IXT-20-123607" />Instructions in the description file are interpreted as single lines.If an instruction must span more than one input line, use a backslash(<tt class="literal">\</tt>) at the end ofthe line so that the next line is considered acontinuation.The description file may contain any of the following types of lines:</p><dl><dt><i><em class="emphasis">Blank lines</em></tt></i></dt><dd>Blank lines are ignored.</p></dd><dt><i><em class="emphasis">Comment lines</em></tt></i></dt><dd>A pound sign (<tt class="literal">#</tt>) can be used at the beginning of a line or anywherein the middle. <tt class="literal">make</tt> ignores everything after the <tt class="literal">#</tt>.</p></dd><dt><i><em class="emphasis">Dependency lines</em></tt></i></dt><dd>Depending on one or more targets, certain commands that follow are executed. Possible formats include:</p><blockquote><pre class="code"><tt><em class="replaceable"><tt>targets</tt></em></tt> : <tt><em class="replaceable">prerequisitestargets</em></tt> :: <tt><em class="replaceable"><tt>prerequisites</tt></em></tt></pre></blockquote><p>In the first form, subsequent commands are executed if the prerequisites are met.The second form is a variant that lets you specify the same targets on more than one dependency line. In both forms, if no prerequisites are supplied,subsequent commands are always executed (whenever any of the targets are specified). No tab should precede any <em class="emphasis">targets</em></tt>.(At the end of a dependency line, you can specify a command, preceded by a semicolon; however, commands are typically entered on their own lines, preceded by a tab.)</p><p>Targets of the form<em class="emphasis">library</em></tt><tt class="literal">(</tt><em class="emphasis">member</em></tt><tt class="literal">)</tt>represent members of archive libraries, e.g.,<tt class="literal">libguide.a(dontpanic.o)</tt>.</p></dd><dt><i><em class="emphasis">Suffix rules</em></tt></i></dt><dd>These specify that files ending with the first suffix can be prerequisites forfiles ending with the second suffix (assuming the root filenames are thesame). Either of these formats can be used:</p><blockquote><pre class="code">.<em class="replaceable"><tt>suffix</em>.<em class="replaceable">suffix</tt></em>:.<em class="replaceable"><tt>suffix</tt></em>:</pre></blockquote><p>The second form means that the root filename depends on the filename with thecorresponding suffix.</p></dd><dt><i><em class="emphasis">Macro definitions</em></tt></i></dt><dd>These have the following form:</p><blockquote><pre class="code"><tt><em class="replaceable"><tt>name</em></tt> = <tt><em class="replaceable">string</tt></em></tt></pre></blockquote><p>Blank space is optional around the <tt class="literal">=</tt>.</p></dd><dt><i><em class="emphasis">Include statements</em></tt></i></dt><dd>Similar to the C include directive, these have the form:</p><blockquote><pre class="code">include <em class="replaceable"><tt>file</tt></em></pre></blockquote><p><tt class="literal">make</tt> processes the value of <em class="emphasis">file</em>for macro expansions before attempting to open the file.</p></dd><dt><i><em class="emphasis">Command lines</em></tt></i></dt><dd>These lines are where you give the commands to actually rebuildthose files that are out of date.Commands are grouped below the dependency line andare typed on lines that begin with a tab.If a command is preceded by a hyphen (–), <tt class="literal">make</tt> ignoresany error returned. If a command is preceded by an at sign(<tt class="literal">@</tt>),the command line won't echo on the display (unless <tt class="literal">make</tt> is calledwith <tt class="literal">-n</tt>).Further advice on command lines is given below.</p></dd></dl><hr width="684" align="left" /><div class="navbar"><table width="684" border="0"><tr><td align="left" valign="top" width="228"><a href="ch20_02.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0" /></a></td><td align="center" valign="top" width="228"><a href="index.htm"><img src="../gifs/txthome.gif" alt="Home" border="0" /></a></td><td align="right" valign="top" width="228"><a href="ch20_04.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr><tr><td align="left" valign="top" width="228">20.2. Command-Line Syntax</td><td align="center" valign="top" width="228"><a href="index/index.htm"><img src="../gifs/index.gif" alt="Book Index" border="0" /></a></td><td align="right" valign="top" width="228">20.4. Macros</td></tr></table></div><hr width="684" align="left" /><img src="../gifs/navbar.gif" usemap="#library-map" border="0" alt="Library Navigation Links" /><p><p><font size="-1"><a href="copyrght.htm">Copyright © 2003</a> O'Reilly & Associates. All rights reserved.</font></p><map name="library-map"><area shape="rect" coords="1,0,88,96" href="../index.htm"><area shape="rect" coords="90,0,165,96" href="../upt/index.htm"><area shape="rect" coords="168,1,253,107" href="../mac/index.htm"><area shape="rect" coords="255,0,335,97" href="../korn/index.htm"><area shape="rect" coords="337,0,415,109" href="../unixnut/index.htm"><area shape="rect" coords="417,0,512,122" href="../sedawk/index.htm"><area shape="rect" coords="514,0,605,105" href="../lunix/index.htm"><area shape="rect" coords="611,2,694,121" href="../vi/index.htm"></map></body></html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -