Contents|Index|Previous|Next

How Variables Get Their Values

Variables can get values in several different ways:

You can specify an overriding value when you run make. See Overriding Variables.

You can specify a value in the makefile, either with an assignment (see Setting Variables) or with a verbatim definition (see Defining Variables Verbatim).

Variables in the environment become make variables. See Variables from the Environment.

Several automatic variables are given new values for each rule. Each of these has a single conventional use. See Automatic Variables.

Several variables have constant initial values. See Variables Used by Implicit Rules.