Values (GNU make) (original) (raw)
Next: Setting Variables, Previous: Advanced Features for Reference to Variables, Up: How to Use Variables [Contents][Index]
6.4 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 Multi-Line Variables).
- You can specify a short-lived value with the
letfunction (see The let Function) or with theforeachfunction (see The foreach Function). - Variables in the environment become
makevariables. 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.