+/* $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 <msp/core/thread.h>
-#include <msp/path/path.h>
-#include "action.h"
+#include "sourcepackage.h"
+#include "target.h"
-class Install: public Action
+/**
+Represents the installation of a file.
+*/
+class Install: public Target
{
public:
- Install(const Msp::Path::Path &, const Msp::Path::Path &);
+ Install(Builder &, const SourcePackage &, Target &);
+ const char *get_type() const { return "Install"; }
+ void check_rebuild();
+ Action *build();
private:
- class Worker: public Msp::Thread
- {
- public:
- Worker(Install &i): install(i), done(false) { launch(); }
- private:
- Install &install;
- bool done;
-
- void main();
- };
-
- Msp::Path::Path src;
- Msp::Path::Path dest;
- Worker worker;
+ std::string generate_target_name(const Target &);
};
#endif