X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finstall.h;h=d20a32273ee49b37e311c764364a8936069fcbd2;hb=43bd25ffcb0b4f7882773f4676b209a99cb73c04;hp=503205a021f0a4223e9bb537078193d130d05444;hpb=1a46151c99a406123c4ddfc797a7841baf3e4cc2;p=builder.git diff --git a/source/install.h b/source/install.h index 503205a..d20a322 100644 --- a/source/install.h +++ b/source/install.h @@ -1,16 +1,27 @@ #ifndef INSTALL_H_ #define INSTALL_H_ -#include "target.h" +#include "sourcepackage.h" +#include "filetarget.h" -class Install: public Target +/** +Represents the installation of a file. +*/ +class Install: public FileTarget { +private: + FileTarget &source; + public: - Install(Builder &, const Package &, Target &, const std::string &); - const char *get_type() const { return "Install"; } - void check_rebuild(); - Action *build(); + Install(Builder &, const SourcePackage &, FileTarget &, const std::string & =std::string()); + virtual const char *get_type() const { return "Install"; } + FileTarget &get_source() const { return source; } + virtual Target *get_real_target(); private: + virtual void check_rebuild(); + virtual Action *create_action(); + + static Msp::FS::Path generate_target_path(const FileTarget &i, const std::string &); }; #endif