Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2007-05-01 11:12:04 -0700 (Tue, 01 May 2007)
Revision: 10579
Log message:
Add .STATIC rules. This is different from a "static. =" section.
- .STATIC rules are delayed; they are evaluated only if the value is needed.
- .STATIC rules allow dependencies, and explicit variables.
- The values are stored in .omakedb
* Basic usage:
.STATIC:
println(foo)
X = 1
Y = $X
The variable X is exported. The rule is evaluated if the value for $X is needed,
but it is lazy. The definition of Y does not force evaluation.
* With dependencies:
.STATIC: x.input
X = $(expensive-function x.input)
This is be evaluated if x.input changes and X is forced.
* Exporting variables
.STATIC: X: x.input
Y = 1
X = $Y
Y is not exported from the section.