+ /** If this target is a proxy for another (such as Install), return that
+ target. Otherwise, return the target itself.
+
+ Implementors should call the function recursively to find the final target. */
+ virtual Target *get_real_target() { return this; }
+
+ void set_tool(const Tool &);
+ const Tool *get_tool() const { return tool; }
+
+ /** Indicates if it's possible to build this target. */
+ bool is_buildable() const { return tool!=0; }
+
+ /** Indicates if this target needs rebuilding. Only makes sense after the
+ target has been prepared. */
+ bool needs_rebuild() const { return state>PREPARING && state<UPTODATE; }
+
+ /** Returns the reason for rebuilding this target. Only makes sense after
+ the target has been prepared. */