- void add_depend(Target *);
- const TargetList &get_depends() const { return depends; }
- bool get_depends_ready() const { return deps_ready; }
-
- /**
- Finds dependencies for the target. When all dependencies have been found,
- the function should set deps_ready to true.
- */
- virtual void find_depends() { deps_ready = true; }
-
- /**
- Prepares the target by recursively preparing dependencies, then checking
- whether rebuilding is needed. A flag is used to prevent unnecessary
- executions.
- */
+
+ /** Forces rebuild of the target. */
+ void force_rebuild();
+
+ /** Adds a dependency for the target. Order is preseved and is important
+ for some target types. It is an error to create dependency cycles, although
+ this won't be detected until the targets are prepared. */
+ void add_depend(Target &);
+
+ /// Returns the dependencies of the target, in the order they were added.
+ const Dependencies &get_depends() const { return depends; }
+
+ /** Finds dependencies for the target. Called during preparation. If the
+ target needs to recursively inspect its dependencies, it should prepare its
+ direct dependencies first. */
+ virtual void find_depends() { }
+
+ /** Prepares the target by finding dependencies, recursively preparing them
+ and then checking whether rebuilding is needed. */