]> git.tdb.fi Git - builder.git/blobdiff - source/copy.cpp
Variables in Build files weren't such a hot idea. KISS.
[builder.git] / source / copy.cpp
index b756e0c037412012a828075735a7b6fb8eb3b679..0073320504b0daff45e2c9577a93e9ab4c095dff 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>
@@ -19,8 +19,7 @@ Copy::Copy(Builder &b):
 Target *Copy::create_target(const list<Target *> &sources, const string &arg) const
 {
        FileTarget &file_tgt = dynamic_cast<FileTarget &>(*sources.front());
-       const SourcePackage &pkg = dynamic_cast<const SourcePackage &>(*file_tgt.get_package());
-       InstalledFile *inst = new InstalledFile(builder, pkg, file_tgt, arg);
+       InstalledFile *inst = new InstalledFile(builder, *file_tgt.get_package(), file_tgt, arg);
        inst->set_tool(*this);
        return inst;
 }
@@ -35,9 +34,7 @@ Task *Copy::run(const Target &target) const
 
 Copy::Worker::Worker(const InstalledFile &t):
        target(t)
-{
-       launch();
-}
+{ }
 
 void Copy::Worker::main()
 {