--- make-3.80.orig/doc/make.texi Wed Sep 18 22:51:58 2002 +++ make-3.80/doc/make.texi Wed Oct 30 21:54:06 2002 @@ -156,7 +156,6 @@ * Include:: How one makefile can use another makefile. * MAKEFILES Variable:: The environment can specify extra makefiles. * MAKEFILE_LIST Variable:: Discover which makefiles have been read. -* Special Variables:: Other special variables. * Remaking Makefiles:: How makefiles get remade. * Overriding Makefiles:: How to override part of one makefile with another makefile. @@ -247,6 +246,7 @@ basis. * Pattern-specific:: Target-specific variable values can be applied to a group of targets that match a pattern. +* Specials:: Miscellaneous variables with special values. Advanced Features for Reference to Variables @@ -949,7 +949,6 @@ * Include:: How one makefile can use another makefile. * MAKEFILES Variable:: The environment can specify extra makefiles. * MAKEFILE_LIST Variable:: Discover which makefiles have been read. -* Special Variables:: Other special variables. * Remaking Makefiles:: How makefiles get remade. * Overriding Makefiles:: How to override part of one makefile with another makefile. @@ -1217,7 +1216,7 @@ anyone else. It is much better to write explicit @code{include} directives in the makefiles. @xref{Include, , Including Other Makefiles}. address@hidden MAKEFILE_LIST Variable, Special Variables, MAKEFILES Variable, Makefiles address@hidden MAKEFILE_LIST Variable, Remaking Makefiles, MAKEFILES Variable, Makefiles @comment node-name, next, previous, up @section The Variable @code{MAKEFILE_LIST} @cindex makefiles, and @code{MAKEFILE_LIST} variable @@ -1265,37 +1264,7 @@ Variables}, for more information on simply-expanded (@code{:=}) variable definitions. address@hidden Special Variables, Remaking Makefiles, MAKEFILE_LIST Variable, Makefiles address@hidden node-name, next, previous, up address@hidden Other Special Variables address@hidden makefiles, and special variables address@hidden special variables - -GNU @code{make} also supports a special variable. Note that any value -you assign to this variable will be ignored; it will always return its -special value. - address@hidden $(.VARIABLES) address@hidden .VARIABLES @r{(list of variables)} -The first special variable is @code{.VARIABLES}. When expanded, the -value consists of a list of the @emph{names} of all global variables -defined in all makefiles read up until that point. This includes -variables which have empty values, as well as built-in variables -(@pxref{Implicit Variables, , Variables Used by Implicit Rules}), but -does not include any variables which are only defined in a -target-specific context. - address@hidden @vindex $(.TARGETS) address@hidden @vindex .TARGETS @r{(list of targets)} address@hidden The second special variable is @code{.TARGETS}. When expanded, the address@hidden value consists of a list of all targets defined in all makefiles read address@hidden up until that point. Note it's not enough for a file to be simply address@hidden mentioned in the makefile to be listed in this variable, even if it address@hidden would match an implicit rule and become an ``implicit target''. The address@hidden file must appear as a target, on the left-hand side of a ``:'', to be address@hidden considered a target for the purposes of this variable. - address@hidden Remaking Makefiles, Overriding Makefiles, Special Variables, Makefiles address@hidden Remaking Makefiles, Overriding Makefiles, MAKEFILE_LIST Variable, Makefiles @section How Makefiles Are Remade @cindex updating makefiles @@ -3356,6 +3325,7 @@ directory along your @code{PATH}. @cindex environment, @code{SHELL} in address@hidden MAKESHELL @r{(MS-DOS alternative to @code{SHELL})} Unlike most variables, the variable @code{SHELL} is never set from the environment. This is because the @code{SHELL} environment variable is used to specify your personal choice of shell program for interactive @@ -3627,6 +3597,8 @@ @code{make} commands as @samp{.PHONY} (for more discussion on when this is useful, see @ref{Phony Targets}). address@hidden CURDIR address@hidden $(CURDIR) For your convenience, GNU @code{make} sets the variable @code{CURDIR} to the pathname of the current working directory for you. If @code{-C} is in effect, it will contain the path of the new directory, not the @@ -4253,6 +4225,7 @@ basis. * Pattern-specific:: Target-specific variable values can be applied to a group of targets that match a pattern. +* Specials:: Miscellaneous variables with special values. @end menu @node Reference, Flavors, Using Variables, Using Variables @@ -4792,6 +4765,11 @@ @item Several variables have constant initial values. @xref{Implicit Variables, ,Variables Used by Implicit Rules}. + address@hidden +Several variables have their values set in special ways that defy +classification. address@hidden, ,Special Variables}. @end itemize @node Setting, Appending, Values, Using Variables @@ -5229,7 +5207,7 @@ command scripts that create @file{prog.o}, @file{foo.o}, and @file{bar.o}, and any command scripts which create their prerequisites. address@hidden Pattern-specific, , Target-specific, Using Variables address@hidden Pattern-specific, Specials, Target-specific, Using Variables @section Pattern-specific Variable Values @cindex pattern-specific variables @cindex variables, pattern-specific @@ -5272,6 +5250,102 @@ will assign @code{CFLAGS} the value of @samp{-O} for all targets matching the pattern @code{%.o}. address@hidden Specials, , Pattern-specific, Using Variables address@hidden Special Variables + +There are several variables that get their values in special ways. +They are collected here for easy reference: + address@hidden @code address@hidden CURDIR +The pathname of the current working directory. address@hidden, ,Recursive Use of @code{make}}. + address@hidden .LIBPATTERNS +Defines the naming of the libraries @code{make} searches for, and their +order. The default value depends on the operating address@hidden address@hidden/Search, ,Directory Search for Link Libraries}. + address@hidden MAKE +The command to use for recursive @code{make} commands. This variable +also has some magic properties when it is @emph{used}; address@hidden Variable, ,How the @code{MAKE} Variable Works} + address@hidden MAKECMDGOALS +The list of goals specified on the command line address@hidden, ,Arguments to Specify the Goals}. + address@hidden MAKE_COMMAND address@hidden MAKE_COMMAND address@hidden $(MAKE_COMMAND) +Equivalent to @code{MAKE}. In fact, @code{$(MAKE)} unfolds to address@hidden(MAKE_COMMAND)} which is what is actually has a special +value. This is for historical compatibility; you should not depend on +this set-up. + address@hidden MAKEOVERRIDES address@hidden MFLAGS address@hidden MAKEFLAGS +Used for passing options to recursive invocations of @code{make}. address@hidden/Recursion, ,Communicating Options to a address@hidden + address@hidden MAKEFILE_LIST +The names of makefiles that @code{make} has begun reading yet. address@hidden Variable, ,The Variable @code{MAKEFILE_LIST}}. + address@hidden @item MAKEFILES address@hidden (This is set automatically, but to the empty string, so it might address@hidden as well not be set. Certainly we need not mention it here.) + address@hidden MAKELEVEL +The number of levels of recursion (address@hidden). address@hidden/Recursion, ,Communicating Variables to a address@hidden + address@hidden MAKE_VERSION address@hidden $(MAKE_VERSION) address@hidden MAKE_VERSION +Set to the version number of @code{make}. + address@hidden SHELL +Used for executing commands. Defaults to @file{/bin/sh} on Unix, but +with variations on other operating systems. address@hidden, ,Command Execution}. + address@hidden SUFFIXES address@hidden $(SUFFIXES) address@hidden SUFFIXES @r{(default list of suffixes)} +The default list of suffixes recognised for suffix rules. address@hidden Rules, ,Old-Fashioned Suffix Rules}. + address@hidden @item .TARGETS address@hidden @vindex $(.TARGETS) address@hidden @vindex .TARGETS @r{(list of targets)} address@hidden The second special variable is @code{.TARGETS}. When expanded, the address@hidden value consists of a list of all targets defined in all makefiles read address@hidden up until that point. Note it's not enough for a file to be simply address@hidden mentioned in the makefile to be listed in this variable, even if it address@hidden would match an implicit rule and become an ``implicit target''. The address@hidden file must appear as a target, on the left-hand side of a ``:'', to be address@hidden considered a target for the purposes of this variable. address@hidden address@hidden @code{.TARGETS} is so special that any value you assign to it will be address@hidden ignored; it will always return its special value. + address@hidden .VARIABLES address@hidden $(.VARIABLES) address@hidden .VARIABLES @r{(list of variables)} +When expanded, the value of @code{VARIABLES} consists of a list of the address@hidden of all global variables +defined in all makefiles read up until that point. This includes +variables which have empty values, as well as built-in variables +(@pxref{Implicit Variables, , Variables Used by Implicit Rules}), but +does not include any variables which are only defined in a +target-specific context. + address@hidden is so special that any value you assign to it will be +ignored; it will always return its special value. address@hidden table + @node Conditionals, Functions, Using Variables, Top @chapter Conditional Parts of Makefiles @@ -9770,7 +9844,7 @@ The directory part and the file-within-directory part of @code{$?}. @end table -These variables are used specially by GNU @code{make}: +These variables are used or set specially by GNU @code{make}: @table @code @item MAKEFILES @@ -9778,6 +9852,11 @@ Makefiles to be read on every invocation of @address@hidden @xref{MAKEFILES Variable, ,The Variable @code{MAKEFILES}}. address@hidden MAKEFILE_LIST + +Makefiles that @code{make} has actually started parsing yet. address@hidden Variable, ,The Variable @code{MAKEFILE_LIST}}. + @item VPATH Directory search path for files not found in the current address@hidden @@ -9823,6 +9902,10 @@ variable has no effect on the operation of @address@hidden @xref{Goals, ,Arguments to Specify the Goals}. address@hidden MAKE_VERSION + +The version number of @code{make}. + @item CURDIR Set to the pathname of the current working directory (after all @@ -9838,6 +9921,11 @@ Defines the naming of the libraries @code{make} searches for, and their address@hidden @xref{Libraries/Search, ,Directory Search for Link Libraries}. + address@hidden .VARIABLES + +A list of all currently defined variables. address@hidden, ,Special Variables}. @end table @node Error Messages, Complex Makefile, Quick Reference, Top