]> git.tdb.fi Git - builder.git/blobdiff - source/install.h
Rework the Target class hierarchy
[builder.git] / source / install.h
index 672161580c8ee3b2bc67b5ac5d7d8396c3d62f2b..764d9a19bc20f8547ed484e281974eb840c32931 100644 (file)
@@ -1,7 +1,7 @@
 /* $Id$
 
 This file is part of builder
-Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
+Copyright © 2006-200 Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
@@ -9,20 +9,25 @@ Distributed under the LGPL
 #define INSTALL_H_
 
 #include "sourcepackage.h"
-#include "target.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 SourcePackage &, Target &);
-       const char *get_type() const { return "Install"; }
-       void       check_rebuild();
-       Action     *build();
+       Install(Builder &, const SourcePackage &, FileTarget &);
+       virtual const char *get_type() const { return "Install"; }
+       FileTarget &get_source() const { return source; }
 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 &);
 };
 
 #endif