X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ffiletarget.h;h=6c12a5df22e38fb54e7ff7433f6f26c6c4cc668c;hb=1dbeace0c44127bee08a3a8b231f4c8dcf707b2c;hp=4363d5a8672f5e8dfbad647570acbe1f22212db5;hpb=c52efe77690dcf620d3b19f750a91422f771942d;p=builder.git diff --git a/source/filetarget.h b/source/filetarget.h index 4363d5a..6c12a5d 100644 --- a/source/filetarget.h +++ b/source/filetarget.h @@ -14,13 +14,23 @@ protected: Msp::FS::Path path; Msp::Time::TimeStamp mtime; unsigned size; + Msp::FS::Path install_location; + + FileTarget(Builder &, const Msp::FS::Path &); + FileTarget(Builder &, const SourcePackage &, const Msp::FS::Path &); +private: + void init(const SourcePackage *); + void stat(); + static std::string generate_name(Builder &, const SourcePackage *, const Msp::FS::Path &); - FileTarget(Builder &, const Package *, const Msp::FS::Path &); public: const Msp::FS::Path &get_path() const { return path; } const Msp::Time::TimeStamp &get_mtime() const { return mtime; } unsigned get_size() const { return size; } + bool is_installable() const { return !install_location.empty(); } + const Msp::FS::Path &get_install_location() const { return install_location; } + /** Changes the mtime of the target to the current time. */ @@ -28,8 +38,14 @@ public: protected: virtual void check_rebuild(); -private: - std::string make_name(const Package *, const Msp::FS::Path &); + + virtual std::string create_build_signature() const; + +public: + virtual Task *build(); + +protected: + virtual void build_finished(bool); }; #endif