From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/gnu_make/make-control-functions.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 devdocs/gnu_make/make-control-functions.html (limited to 'devdocs/gnu_make/make-control-functions.html') diff --git a/devdocs/gnu_make/make-control-functions.html b/devdocs/gnu_make/make-control-functions.html new file mode 100644 index 00000000..b45d21ea --- /dev/null +++ b/devdocs/gnu_make/make-control-functions.html @@ -0,0 +1,19 @@ +

Functions That Control Make

These functions control the way make runs. Generally, they are used to provide information to the user of the makefile or to cause make to stop if some sort of environmental error is detected.

$(error text…)
+

Generates a fatal error where the message is text. Note that the error is generated whenever this function is evaluated. So, if you put it inside a recipe or on the right side of a recursive variable assignment, it won’t be evaluated until later. The text will be expanded before the error is generated.

For example,

ifdef ERROR1
+$(error error is $(ERROR1))
+endif
+
+

will generate a fatal error during the read of the makefile if the make variable ERROR1 is defined. Or,

ERR = $(error found an error!)
+
+.PHONY: err
+err: ; $(ERR)
+
+

will generate a fatal error while make is running, if the err target is invoked.

$(warning text…)
+

This function works similarly to the error function, above, except that make doesn’t exit. Instead, text is expanded and the resulting message is displayed, but processing of the makefile continues.

The result of the expansion of this function is the empty string.

$(info text…)
+

This function does nothing more than print its (expanded) argument(s) to standard output. No makefile name or line number is added. The result of the expansion of this function is the empty string.

+
+

+ 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.
Licensed under the GNU Free Documentation License.
+ https://www.gnu.org/software/make/manual/html_node/Make-Control-Functions.html +

+
-- cgit v1.2.3