summaryrefslogtreecommitdiff
path: root/make.texinfo
diff options
context:
space:
mode:
Diffstat (limited to 'make.texinfo')
-rw-r--r--make.texinfo67
1 files changed, 61 insertions, 6 deletions
diff --git a/make.texinfo b/make.texinfo
index 246707c..632ba48 100644
--- a/make.texinfo
+++ b/make.texinfo
@@ -8,10 +8,10 @@
@c FSF publishers: format makebook.texi instead of using this file directly.
@set RCSID $Id$
-@set EDITION 0.52
-@set VERSION 3.77
-@set UPDATED 20 May 1998
-@set UPDATE-MONTH May 1998
+@set EDITION 0.53
+@set VERSION 3.78
+@set UPDATED 22 March 1999
+@set UPDATE-MONTH March 1999
@comment The ISBN number might need to change on next publication.
@set ISBN 1-882114-80-9 @c CHANGE THIS BEFORE PRINTING AGAIN! --psmith 16jul98
@@ -37,7 +37,7 @@ and issues the commands to recompile them.
This is Edition @value{EDITION}, last updated @value{UPDATED},
of @cite{The GNU Make Manual}, for @code{make}, Version @value{VERSION}.
-Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95, '96, '97, '98
+Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95, '96, '97, '98, '99
Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
@@ -5166,6 +5166,7 @@ call, just as a variable might be substituted.
* Foreach Function:: Repeat some text with controlled variation.
* Origin Function:: Find where a variable got its value.
* Shell Function:: Substitute the output of a shell command.
+* Make Control Functions:: Functions that control how make runs.
@end menu
@node Syntax of Functions, Text Functions, , Functions
@@ -5907,7 +5908,7 @@ Here the redefinition takes place if @samp{$(origin bletch)} returns either
@samp{environment} or @samp{environment override}.
@xref{Text Functions, , Functions for String Substitution and Analysis}.
-@node Shell Function, , Origin Function, Functions
+@node Shell Function, Make Control Functions, Origin Function, Functions
@section The @code{shell} Function
@findex shell
@cindex commands, expansion
@@ -5953,6 +5954,60 @@ sets @code{files} to the expansion of @samp{*.c}. Unless @code{make} is
using a very strange shell, this has the same result as
@w{@samp{$(wildcard *.c)}}.@refill
+@node Make Control Functions, , Shell Function, Functions
+@section Functions That Control Make
+@cindex functions, for controlling make
+@cindex controlling 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.
+
+@table @code
+@item $(error @var{text}@dots{})
+@findex error
+@cindex error, stopping on
+@cindex stopping make
+Generates a fatal error where the message is @var{text}. Note that the
+error is generated whenever this function is evaluated. So, if you put
+it inside a command script or on the right side of a recursive variable
+assignment, it won't be evaluated until later. The @var{text} will be
+expanded before the error is generated.
+
+For example,
+
+@example
+ifdef ERROR1
+$(error error is $(ERROR1))
+endif
+@end example
+
+@noindent
+will generate a fatal error during the read of the makefile if the
+@code{make} variable @code{ERROR1} is defined. Or,
+
+@example
+ERR = $(error found an error!)
+
+.PHONY: err
+err: ; $(ERR)
+@end example
+
+@noindent
+will generate a fatal error while @code{make} is running, if the
+@code{err} target is invoked.
+
+@item $(warning @var{text}@dots{})
+@findex warning
+@cindex warnings, printing
+@cindex printing user warnings
+This function works similarly to the @code{error} function, above,
+except that @code{make} doesn't exit. Instead, @var{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.
+
@node Running, Implicit Rules, Functions, Top
@chapter How to Run @code{make}