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/testing.html | |
new repository
Diffstat (limited to 'devdocs/gnu_make/testing.html')
| -rw-r--r-- | devdocs/gnu_make/testing.html | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/devdocs/gnu_make/testing.html b/devdocs/gnu_make/testing.html new file mode 100644 index 00000000..a52a8ee0 --- /dev/null +++ b/devdocs/gnu_make/testing.html @@ -0,0 +1,6 @@ + <h1 class="section">Testing the Compilation of a Program</h1> <p>Normally, when an error happens in executing a shell command, <code>make</code> gives up immediately, returning a nonzero status. No further recipes are executed for any target. The error implies that the goal cannot be correctly remade, and <code>make</code> reports this as soon as it knows. </p> <p>When you are compiling a program that you have just changed, this is not what you want. Instead, you would rather that <code>make</code> try compiling every file that can be tried, to show you as many compilation errors as possible. </p> <p>On these occasions, you should use the ‘<samp>-k</samp>’ or ‘<samp>--keep-going</samp>’ flag. This tells <code>make</code> to continue to consider the other prerequisites of the pending targets, remaking them if necessary, before it gives up and returns nonzero status. For example, after an error in compiling one object file, ‘<samp>make -k</samp>’ will continue compiling other object files even though it already knows that linking them will be impossible. In addition to continuing after failed shell commands, ‘<samp>make -k</samp>’ will continue as much as possible after discovering that it does not know how to make a target or prerequisite file. This will always cause an error message, but without ‘<samp>-k</samp>’, it is a fatal error (see <a href="options-summary">Summary of Options</a>). </p> <p>The usual behavior of <code>make</code> assumes that your purpose is to get the goals up to date; once <code>make</code> learns that this is impossible, it might as well report the failure immediately. The ‘<samp>-k</samp>’ flag says that the real purpose is to test as much as possible of the changes made in the program, perhaps to find several independent problems so that you can correct them all before the next attempt to compile. This is why Emacs’ <kbd>M-x compile</kbd> command passes the ‘<samp>-k</samp>’ flag by default. </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/Testing.html" class="_attribution-link">https://www.gnu.org/software/make/manual/html_node/Testing.html</a> + </p> +</div> |
