summaryrefslogtreecommitdiff
path: root/devdocs/gnu_make/wildcard-examples.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-08-14 22:58:58 -0500
committerCraig Jennings <c@cjennings.net>2025-08-14 22:58:58 -0500
commit82ba818ff456bcd6d56a06226e3f27e98fbb55c3 (patch)
tree158cfc17b2f644a10f063cb546752cfaae12c97f /devdocs/gnu_make/wildcard-examples.html
parent9278ddd4ea1a8b1a4c1edaa8894516e3f48d245b (diff)
downloaddotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.tar.gz
dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.zip
removing all downloaded devdocs files
Diffstat (limited to 'devdocs/gnu_make/wildcard-examples.html')
-rw-r--r--devdocs/gnu_make/wildcard-examples.html17
1 files changed, 0 insertions, 17 deletions
diff --git a/devdocs/gnu_make/wildcard-examples.html b/devdocs/gnu_make/wildcard-examples.html
deleted file mode 100644
index e0ca0c3b..00000000
--- a/devdocs/gnu_make/wildcard-examples.html
+++ /dev/null
@@ -1,17 +0,0 @@
- <h1 class="subsection">Wildcard Examples</h1> <p>Wildcards can be used in the recipe of a rule, where they are expanded by the shell. For example, here is a rule to delete all the object files: </p> <div class="example"> <pre class="example">clean:
- rm -f *.o
-</pre>
-</div> <p>Wildcards are also useful in the prerequisites of a rule. With the following rule in the makefile, ‘<samp>make print</samp>’ will print all the ‘<samp>.c</samp>’ files that have changed since the last time you printed them: </p> <div class="example"> <pre class="example">print: *.c
- lpr -p $?
- touch print
-</pre>
-</div> <p>This rule uses <samp>print</samp> as an empty target file; see <a href="empty-targets">Empty Target Files to Record Events</a>. (The automatic variable ‘<samp>$?</samp>’ is used to print only those files that have changed; see <a href="automatic-variables">Automatic Variables</a>.) </p> <p>Wildcard expansion does not happen when you define a variable. Thus, if you write this: </p> <div class="example"> <pre class="example">objects = *.o
-</pre>
-</div> <p>then the value of the variable <code>objects</code> is the actual string ‘<samp>*.o</samp>’. However, if you use the value of <code>objects</code> in a target or prerequisite, wildcard expansion will take place there. If you use the value of <code>objects</code> in a recipe, the shell may perform wildcard expansion when the recipe runs. To set <code>objects</code> to the expansion, instead use: </p> <div class="example"> <pre class="example">objects := $(wildcard *.o)
-</pre>
-</div> <p>See <a href="wildcard-function">Wildcard Function</a>. </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/Wildcard-Examples.html" class="_attribution-link">https://www.gnu.org/software/make/manual/html_node/Wildcard-Examples.html</a>
- </p>
-</div>