diff options
| author | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
| commit | 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 (patch) | |
| tree | 158cfc17b2f644a10f063cb546752cfaae12c97f /devdocs/gnu_make/archive-suffix-rules.html | |
| parent | 9278ddd4ea1a8b1a4c1edaa8894516e3f48d245b (diff) | |
| download | dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.tar.gz dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.zip | |
removing all downloaded devdocs files
Diffstat (limited to 'devdocs/gnu_make/archive-suffix-rules.html')
| -rw-r--r-- | devdocs/gnu_make/archive-suffix-rules.html | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/devdocs/gnu_make/archive-suffix-rules.html b/devdocs/gnu_make/archive-suffix-rules.html deleted file mode 100644 index e0c75430..00000000 --- a/devdocs/gnu_make/archive-suffix-rules.html +++ /dev/null @@ -1,16 +0,0 @@ - <h1 class="section">Suffix Rules for Archive Files</h1> <p>You can write a special kind of suffix rule for dealing with archive files. See <a href="suffix-rules">Suffix Rules</a>, for a full explanation of suffix rules. Archive suffix rules are obsolete in GNU <code>make</code>, because pattern rules for archives are a more general mechanism (see <a href="archive-update">Archive Update</a>). But they are retained for compatibility with other <code>make</code>s. </p> <p>To write a suffix rule for archives, you simply write a suffix rule using the target suffix ‘<samp>.a</samp>’ (the usual suffix for archive files). For example, here is the old-fashioned suffix rule to update a library archive from C source files: </p> <div class="example"> <pre class="example">.c.a: - $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $*.o - $(AR) r $@ $*.o - $(RM) $*.o -</pre> -</div> <p>This works just as if you had written the pattern rule: </p> <div class="example"> <pre class="example">(%.o): %.c - $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $*.o - $(AR) r $@ $*.o - $(RM) $*.o -</pre> -</div> <p>In fact, this is just what <code>make</code> does when it sees a suffix rule with ‘<samp>.a</samp>’ as the target suffix. Any double-suffix rule ‘<samp>.<var>x</var>.a</samp>’ is converted to a pattern rule with the target pattern ‘<samp>(%.o)</samp>’ and a prerequisite pattern of ‘<samp>%.<var>x</var></samp>’. </p> <p>Since you might want to use ‘<samp>.a</samp>’ as the suffix for some other kind of file, <code>make</code> also converts archive suffix rules to pattern rules in the normal way (see <a href="suffix-rules">Suffix Rules</a>). Thus a double-suffix rule ‘<samp>.<var>x</var>.a</samp>’ produces two pattern rules: ‘<samp>(%.o): %.<var>x</var></samp>’ and ‘<samp>%.a: %.<var>x</var></samp>’. </p><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/Archive-Suffix-Rules.html" class="_attribution-link">https://www.gnu.org/software/make/manual/html_node/Archive-Suffix-Rules.html</a> - </p> -</div> |
