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/recipes_002fsearch.html | |
| parent | 9278ddd4ea1a8b1a4c1edaa8894516e3f48d245b (diff) | |
| download | dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.tar.gz dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.zip | |
removing all downloaded devdocs files
Diffstat (limited to 'devdocs/gnu_make/recipes_002fsearch.html')
| -rw-r--r-- | devdocs/gnu_make/recipes_002fsearch.html | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/devdocs/gnu_make/recipes_002fsearch.html b/devdocs/gnu_make/recipes_002fsearch.html deleted file mode 100644 index 49bbd507..00000000 --- a/devdocs/gnu_make/recipes_002fsearch.html +++ /dev/null @@ -1,13 +0,0 @@ - <h1 class="subsection">Writing Recipes with Directory Search</h1> <p>When a prerequisite is found in another directory through directory search, this cannot change the recipe of the rule; they will execute as written. Therefore, you must write the recipe with care so that it will look for the prerequisite in the directory where <code>make</code> finds it. </p> <p>This is done with the <em>automatic variables</em> such as ‘<samp>$^</samp>’ (see <a href="automatic-variables">Automatic Variables</a>). For instance, the value of ‘<samp>$^</samp>’ is a list of all the prerequisites of the rule, including the names of the directories in which they were found, and the value of ‘<samp>$@</samp>’ is the target. Thus: </p> <div class="example"> <pre class="example">foo.o : foo.c - cc -c $(CFLAGS) $^ -o $@ -</pre> -</div> <p>(The variable <code>CFLAGS</code> exists so you can specify flags for C compilation by implicit rules; we use it here for consistency so it will affect all C compilations uniformly; see <a href="implicit-variables">Variables Used by Implicit Rules</a>.) </p> <p>Often the prerequisites include header files as well, which you do not want to mention in the recipe. The automatic variable ‘<samp>$<</samp>’ is just the first prerequisite: </p> <div class="example"> <pre class="example">VPATH = src:../headers -foo.o : foo.c defs.h hack.h - cc -c $(CFLAGS) $< -o $@ -</pre> -</div><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/Recipes_002fSearch.html" class="_attribution-link">https://www.gnu.org/software/make/manual/html_node/Recipes_002fSearch.html</a> - </p> -</div> |
