]> git.tdb.fi Git - builder.git/blobdiff - source/task.cpp
Refactor transitive dependencies to work on all targets
[builder.git] / source / task.cpp
diff --git a/source/task.cpp b/source/task.cpp
deleted file mode 100644 (file)
index d969a7a..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <msp/fs/dir.h>
-#include <msp/fs/stat.h>
-#include <msp/fs/utils.h>
-#include "task.h"
-
-using namespace std;
-using namespace Msp;
-
-Task::Task():
-       unlink(false)
-{ }
-
-void Task::add_file(const FS::Path &f)
-{
-       files.push_back(f);
-}
-
-void Task::set_unlink(bool u)
-{
-       unlink = u;
-}
-
-void Task::prepare()
-{
-       for(const FS::Path &f: files)
-       {
-               if(FS::exists(f))
-               {
-                       // If the file exists, the directory it's in must exist too
-                       FS::unlink(f);
-               }
-               else
-               {
-                       FS::Path dir = FS::dirname(f);
-                       if(!FS::exists(dir))
-                               FS::mkpath(dir, 0755);
-               }
-       }
-}