]> git.tdb.fi Git - builder.git/blob - source/install.h
6c81af9e416e8d18ce915f1228918a3e6c4e76ad
[builder.git] / source / install.h
1 /* $Id$
2
3 This file is part of builder
4 Copyright © 2006-2010  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef INSTALL_H_
9 #define INSTALL_H_
10
11 #include "sourcepackage.h"
12 #include "filetarget.h"
13
14 /**
15 Represents the installation of a file.
16 */
17 class Install: public FileTarget
18 {
19 private:
20         FileTarget &source;
21
22 public:
23         Install(Builder &, const SourcePackage &, FileTarget &, const std::string & =std::string());
24         virtual const char *get_type() const { return "Install"; }
25         FileTarget &get_source() const { return source; }
26         virtual Target *get_real_target();
27 private:
28         virtual void check_rebuild();
29         virtual Action *create_action();
30
31         static Msp::FS::Path generate_target_path(const FileTarget &i, const std::string &);
32 };
33
34 #endif