X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Ftarget.h;h=04c3c09a3648876578e8b7e7794e64bb3e9b6bd5;hb=be6c1ae1dcc97cb3e3019c0384f1bc933fcd321c;hp=2c14ea1ae3064ef394e0bcff951dafddf8360b61;hpb=4f5571c3098953378253234b476a5a2b07974065;p=builder.git diff --git a/source/target.h b/source/target.h index 2c14ea1..04c3c09 100644 --- a/source/target.h +++ b/source/target.h @@ -24,22 +24,27 @@ public: typedef std::list Dependencies; protected: + enum State + { + INIT, + PREPARING, + REBUILD, + BUILDING, + UPTODATE + }; + Builder &builder; const Package *package; std::string name; const Tool *tool; - bool building; - bool rebuild; + State state; std::string rebuild_reason; std::string install_location; Dependencies depends; bool deps_ready; - bool preparing; - bool prepared; - Target(Builder &, const Package *, const std::string &); public: virtual ~Target() { } @@ -67,7 +72,7 @@ public: const Tool *get_tool() const { return tool; } bool is_buildable() const { return tool!=0; } - bool needs_rebuild() const { return rebuild; } + bool needs_rebuild() const { return state>PREPARING && state