/**
Targets make up the build graph. This class is a base for all target types and
-handles many common tasks. Most targets are associated with a file.
+handles many common tasks. See also FileTarget and VirtualTarget.
*/
class Target
{
Builder &builder;
const Package *package;
std::string name;
- Msp::Time::TimeStamp mtime;
bool buildable;
bool building;
virtual const char *get_type() const = 0;
const std::string &get_name() const { return name; }
const Package *get_package() const { return package; }
- const Msp::Time::TimeStamp &get_mtime() const { return mtime; }
/**
Tries to locate a target that will help getting this target built. If all
Starts building the target. Returns the Action used for building.
*/
Action *build();
-
- /**
- Changes the mtime of the target to the current time.
- */
- void touch();
protected:
void mark_rebuild(const std::string &);
/**
Checks if the target needs to be rebuilt and why.
*/
- virtual void check_rebuild();
+ virtual void check_rebuild() = 0;
/**
Creates and returns an Action suitable for building this target.