]> git.tdb.fi Git - builder.git/blob - source/install.h
Make symlink a feature of the Install target rather than a target on its own
[builder.git] / source / install.h
1 #ifndef INSTALL_H_
2 #define INSTALL_H_
3
4 #include "sourcepackage.h"
5 #include "filetarget.h"
6
7 /**
8 Represents the installation of a file.
9 */
10 class Install: public FileTarget
11 {
12 private:
13         FileTarget &source;
14         Msp::FS::Path link;
15
16 public:
17         Install(Builder &, const SourcePackage &, FileTarget &, const std::string & =std::string());
18         virtual const char *get_type() const { return "Install"; }
19         FileTarget &get_source() const { return source; }
20         virtual Target *get_real_target();
21 private:
22         virtual void check_rebuild();
23         virtual Action *create_action();
24
25         static Msp::FS::Path generate_target_path(const FileTarget &i, const std::string &);
26 };
27
28 #endif