X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finstall.h;h=6c81af9e416e8d18ce915f1228918a3e6c4e76ad;hb=05a2b9dabd01414e9e9a91f9d69babaca4ccb32d;hp=b81ac9ba4f482be92cca29c399d130476a5a1424;hpb=0d80cabf649b931b26e7055385156c75a7385d35;p=builder.git diff --git a/source/install.h b/source/install.h index b81ac9b..6c81af9 100644 --- a/source/install.h +++ b/source/install.h @@ -1,17 +1,34 @@ +/* $Id$ + +This file is part of builder +Copyright © 2006-2010 Mikko Rasa, Mikkosoft Productions +Distributed under the LGPL +*/ + #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 find_depends() { } - 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