X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finstall.h;h=0cc0fb8a178bdcc874389ecbb74f072fa7565902;hb=f56fa0c68e0eddf1f01c9584b8761431d29e8fa1;hp=bdabc6e7c3853afd87d5425ba42f10bf14db25a4;hpb=7aeaa4ba965f596edad438c02e345a8843f7469a;p=builder.git diff --git a/source/install.h b/source/install.h index bdabc6e..0cc0fb8 100644 --- a/source/install.h +++ b/source/install.h @@ -1,27 +1,28 @@ -/* $Id$ - -This file is part of builder -Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifndef INSTALL_H_ #define INSTALL_H_ -#include "target.h" +#include "sourcepackage.h" +#include "filetarget.h" /** Represents the installation of a file. */ -class Install: public Target +class Install: public FileTarget { +private: + FileTarget &source; + Msp::FS::Path link; + public: - Install(Builder &, const Package &, Target &); - 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: - std::string generate_target_name(const Target &); + virtual void check_rebuild(); + virtual Action *create_action(); + + static Msp::FS::Path generate_target_path(const FileTarget &i, const std::string &); }; #endif