From 978819e1d6e9354b5b20d15c875bef98579873ae Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sat, 25 Jun 2005 18:57:28 +0000 Subject: Add a new variable: MAKE_RESTARTS, to count how many times make has re-exec'd. When rebuilding makefiles, unset -B if MAKE_RESTARTS is >0. --- doc/make.texi | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/make.texi b/doc/make.texi index f17a5d4..f51fe32 100644 --- a/doc/make.texi +++ b/doc/make.texi @@ -1330,6 +1330,14 @@ foo Note that assigning more than one target name to @code{.DEFAULT_GOAL} is illegal and will result in an error. +@vindex MAKE_RESTARTS @r{(number of times @code{make} has restarted)} +@item MAKE_RESTARTS +This variable is set only if this instance of @code{make} has +restarted (@pxref{Remaking Makefiles, , How Makefiles Are Remade}): it +will contain the number of times this instance has restarted. Note +this is not the same as recursion (counted by the @code{MAKELEVEL} +variable). You should not set, modify, or export this variable. + @vindex .VARIABLES @r{(list of variables)} @item .VARIABLES Expands to a list of the @emph{names} of all global variables defined @@ -7549,8 +7557,12 @@ These options are ignored for compatibility with other versions of @code{make}. @cindex @code{--always-make} Consider all targets out-of-date. GNU @code{make} proceeds to consider targets and their prerequisites using the normal algorithms; -however, all these targets are remade, regardless of the status of -their prerequisites. +however, all targets so considered are always remade regardless of the +status of their prerequisites. To avoid infinite recursion, if +@code{MAKE_RESTARTS} (@pxref{Special Variables, , Other Special +Variables}) is set to a number greater than 0 this option is disabled +when considering whether to remake makefiles (@pxref{Remaking +Makefiles, , How Makefiles Are Remade}). @item -C @var{dir} @cindex @code{-C} -- cgit v1.2.3