]> git.tdb.fi Git - builder.git/blobdiff - source/copy.cpp
Use Path objects to store include and library paths
[builder.git] / source / copy.cpp
index b5ac403c4d4eb72e42567122bb656d576287bb5a..5b524a40cd367d5e1973c6d2edfacc7d17ef33d5 100644 (file)
@@ -1,4 +1,4 @@
-#include <errno.h>
+#include <unistd.h>
 #include <sys/stat.h>
 #include <msp/fs/dir.h>
 #include <msp/fs/stat.h>
@@ -7,7 +7,7 @@
 #include <msp/io/print.h>
 #include "builder.h"
 #include "copy.h"
-#include "install.h"
+#include "installedfile.h"
 
 using namespace std;
 using namespace Msp;
@@ -20,24 +20,22 @@ Target *Copy::create_target(const list<Target *> &sources, const string &arg) co
 {
        FileTarget &file_tgt = dynamic_cast<FileTarget &>(*sources.front());
        const SourcePackage &pkg = dynamic_cast<const SourcePackage &>(*file_tgt.get_package());
-       Install *inst = new Install(builder, pkg, file_tgt, arg);
+       InstalledFile *inst = new InstalledFile(builder, pkg, file_tgt, arg);
        inst->set_tool(*this);
        return inst;
 }
 
 Task *Copy::run(const Target &target) const
 {
-       const Install &install = dynamic_cast<const Install &>(target);
+       const InstalledFile &install = dynamic_cast<const InstalledFile &>(target);
        Worker *worker = new Worker(install);
        return new InternalTask(worker);
 }
 
 
-Copy::Worker::Worker(const Install &t):
+Copy::Worker::Worker(const InstalledFile &t):
        target(t)
-{
-       launch();
-}
+{ }
 
 void Copy::Worker::main()
 {