X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftarget.h;h=04a360dab57394ec23c305b69825a80135edcee9;hb=f5d3127099bc41f986094eb98732849ee9bfb748;hp=605b328badef68faaca64c0c6f2b84c61f9de98d;hpb=7aeaa4ba965f596edad438c02e345a8843f7469a;p=builder.git diff --git a/source/target.h b/source/target.h index 605b328..04a360d 100644 --- a/source/target.h +++ b/source/target.h @@ -9,6 +9,7 @@ Distributed under the LGPL #define TARGET_H_ #include +#include #include #include @@ -37,13 +38,18 @@ public: const Package *get_package() const { return package; } bool get_depends_ready() const { return deps_ready; } void add_depend(Target *); - virtual void find_depends() { deps_ready=true; } virtual void prepare(); + /** + 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; } + /** Creates and returns an Action suitable for building this target. */ - virtual Action *build()=0; + Action *build(); void reset_count() { counted=false; } virtual unsigned count_rebuild(); @@ -70,8 +76,10 @@ protected: Target(Builder &, const Package *, const std::string &); void mark_rebuild(const std::string &); virtual void check_rebuild(); - Action *build(Action *); + virtual Action *create_action() =0; virtual void build_done(); }; +typedef std::map TargetMap; + #endif