Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-12-04 10:03:42 -0800 (Thu, 04 Dec 2003)
Revision: 300
Log message:
| Fixed bug #123.
|
| Each rule can specify "side-effects": files that may be created/modified
| by executing the rule, but are not to be considered as targets. Consider
| the following two rules:
|
| %.cmo: %.ml
| ocamlc -c $<
|
| %.cmi: %.ml :effects: %.cmo
| ocamlc -c $<
|
| The %.cmi rule states that the %.cmo file may be constructed as a side-effect
| of the rule. Every target includes itself as a side-effect.
|
| Side-effects are used for two purposes:
| 1. Dependency merging. The dependencies for a target are the union
| of the dependencies of all of the effects. So the %.cmi rule
| states that the dependencies of %.cmi include the dependencies
| of the %.cmo, and vice versa.
|
| 2. Limiting parallelization. Commands that have intersecting effects
| cannot be run in parallel.
|
| An invariant of effects is that they must be symmetric: if target1 includes
| target2 as a side-effect, target2 must also include target1.
|
| Before this fix, this invariant was enforced by taking the intersection of
| the effect sets for any target in the effects. That is, since the rule for
| %.cmo did not mention %.cmi, then %.cmi cannot mention %.cmo. This is clearly
| wrong. This update takes the union of the effects.
Changes | Path |
+40 -12 | omake/src/build/omake_build.ml |
+8 -3 | omake/src/eval/omake_rule.ml |
+1 -1 | omake/src/exec/omake_exec_print.ml |