diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/gnu_make/implicit-rules.html | |
new repository
Diffstat (limited to 'devdocs/gnu_make/implicit-rules.html')
| -rw-r--r-- | devdocs/gnu_make/implicit-rules.html | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/devdocs/gnu_make/implicit-rules.html b/devdocs/gnu_make/implicit-rules.html new file mode 100644 index 00000000..a48b14dc --- /dev/null +++ b/devdocs/gnu_make/implicit-rules.html @@ -0,0 +1,46 @@ + <h1 class="chapter">Using Implicit Rules</h1> <p>Certain standard ways of remaking target files are used very often. For example, one customary way to make an object file is from a C source file using the C compiler, <code>cc</code>. </p> <p><em>Implicit rules</em> tell <code>make</code> how to use customary techniques so that you do not have to specify them in detail when you want to use them. For example, there is an implicit rule for C compilation. File names determine which implicit rules are run. For example, C compilation typically takes a <samp>.c</samp> file and makes a <samp>.o</samp> file. So <code>make</code> applies the implicit rule for C compilation when it sees this combination of file name endings. </p> <p>A chain of implicit rules can apply in sequence; for example, <code>make</code> will remake a <samp>.o</samp> file from a <samp>.y</samp> file by way of a <samp>.c</samp> file. </p> <p>The built-in implicit rules use several variables in their recipes so that, by changing the values of the variables, you can change the way the implicit rule works. For example, the variable <code>CFLAGS</code> controls the flags given to the C compiler by the implicit rule for C compilation. </p> <p>You can define your own implicit rules by writing <em>pattern rules</em>. </p> <p><em>Suffix rules</em> are a more limited way to define implicit rules. Pattern rules are more general and clearer, but suffix rules are retained for compatibility. </p> <table class="menu" border="0" cellspacing="0"> <tr> +<td align="left" valign="top">• <a href="using-implicit" accesskey="1">Using Implicit</a> +</td> +<td> </td> +<td align="left" valign="top">How to use an existing implicit rule to get the recipes for updating a file. </td> +</tr> <tr> +<td align="left" valign="top">• <a href="catalogue-of-rules" accesskey="2">Catalogue of Rules</a> +</td> +<td> </td> +<td align="left" valign="top">A list of built-in rules. </td> +</tr> <tr> +<td align="left" valign="top">• <a href="implicit-variables" accesskey="3">Implicit Variables</a> +</td> +<td> </td> +<td align="left" valign="top">How to change what predefined rules do. </td> +</tr> <tr> +<td align="left" valign="top">• <a href="chained-rules" accesskey="4">Chained Rules</a> +</td> +<td> </td> +<td align="left" valign="top">How to use a chain of implicit rules. </td> +</tr> <tr> +<td align="left" valign="top">• <a href="pattern-rules" accesskey="5">Pattern Rules</a> +</td> +<td> </td> +<td align="left" valign="top">How to define new implicit rules. </td> +</tr> <tr> +<td align="left" valign="top">• <a href="last-resort" accesskey="6">Last Resort</a> +</td> +<td> </td> +<td align="left" valign="top">How to define a recipe for rules which cannot find any. </td> +</tr> <tr> +<td align="left" valign="top">• <a href="suffix-rules" accesskey="7">Suffix Rules</a> +</td> +<td> </td> +<td align="left" valign="top">The old-fashioned style of implicit rule. </td> +</tr> <tr> +<td align="left" valign="top">• <a href="implicit-rule-search" accesskey="8">Implicit Rule Search</a> +</td> +<td> </td> +<td align="left" valign="top">The precise algorithm for applying implicit rules. </td> +</tr> </table><div class="_attribution"> + <p class="_attribution-p"> + Copyright © 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Free Software Foundation, Inc. <br>Licensed under the GNU Free Documentation License.<br> + <a href="https://www.gnu.org/software/make/manual/html_node/Implicit-Rules.html" class="_attribution-link">https://www.gnu.org/software/make/manual/html_node/Implicit-Rules.html</a> + </p> +</div> |
