6 #include <msp/time/timestamp.h>
13 typedef std::list<Target *> TargetList;
16 Targets make up the build graph. This class is a base for all target types and
17 handles many common tasks. Most targets are associated with a file.
22 const std::string &get_name() const { return name; }
23 Target *get_buildable_target();
24 bool get_rebuild() const { return rebuild; }
25 const std::string &get_rebuild_reason() const { return rebuild_reason; }
26 const Msp::Time::TimeStamp &get_mtime() const { return mtime; }
27 virtual const char *get_type() const=0;
28 const TargetList &get_depends() const { return depends; }
29 const Package *get_package() const { return package; }
30 bool get_depends_ready() const { return deps_ready; }
31 void add_depend(Target *);
32 virtual void find_depends() { deps_ready=true; }
33 virtual void prepare();
36 Creates and returns an Action suitable for building this target.
38 virtual Action *build()=0;
40 void reset_count() { counted=false; }
41 virtual unsigned count_rebuild();
46 const Package *package;
48 Msp::Time::TimeStamp mtime;
53 std::string rebuild_reason;
62 Target(Builder &, const Package *, const std::string &);
63 void mark_rebuild(const std::string &);
64 virtual void check_rebuild();
65 Action *build(Action *);
66 virtual void build_done();