X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Finstall.h;h=7cf56bb80fec36b7841f339d5909558df484bf05;hb=75bdcf13fbd285e2006337ec606ca28fa4ddae9e;hp=fd6472fea6fc40d7e4c40d35c09117ffba67002c;hpb=74266a6e650f019063cdcd1c9a7bd26d8f99041b;p=builder.git diff --git a/source/install.h b/source/install.h index fd6472f..7cf56bb 100644 --- a/source/install.h +++ b/source/install.h @@ -1,19 +1,33 @@ +/* $Id$ + +This file is part of builder +Copyright © 2006-2009 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; + 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; } private: + virtual void check_rebuild(); + virtual Action *create_action(); + + static Msp::FS::Path generate_target_path(const FileTarget &i, const std::string &); }; #endif