f78
The origin Function
Specifically, it tells you its origin. Its syntax is:
The result of this function is a string telling you how the variable,
‘
‘
Note:
‘
‘
‘
‘
‘
‘
This information is primarily useful (other than for your curiosity) to
determine if you want to believe the value of a variable. For example, suppose you
have a makefile, ‘
You want a variable,
variable is the name of a variable to inquire about; it is not a reference to that variable. Therefore you would not normally use a ‘$’ or parentheses when writing it. (You can, however, use a variable reference
in the name if you want the name not to be a constant.)
Used if variable was never defined.
Used if variable has a default definition as is usual with CC and so on. See Variables Used by Implicit Rules.
If you have redefined a default variable, the
Used if variable was defined as an environment variable and the ‘-e’ option is not turned on (see Summary of Options).
Used if variable was defined as an environment variable and the ‘-e’ option is turned on (see Summary of Options).
Used if variable
ffb
was defined in a makefile.
Used if variable was defined on the command line.
Used if variable was defined with an override directive in a makefile (see The override Directive).
Used if variable is an automatic variable defined for the execution of the commands for each
rule (see Automatic Variables).
ifeq “$(origin bletch)” “environment”
bletch = barf, gag, etc.
endif
endif
bletch = barf, gag, etc.
endif