]> git.tdb.fi Git - builder.git/blobdiff - source/gnuarchiver.cpp
Separate the command-line interface into its own class
[builder.git] / source / gnuarchiver.cpp
index 71edc42d57d26d09560c9ddc1b389e0febcedae9..3499204954593db5587280e5d1679b514f2e2215 100644 (file)
@@ -54,21 +54,14 @@ Task *GnuArchiver::run(const Target &target) const
        argv.push_back(executable->get_path().str());
        argv.push_back("rc");
 
-       FS::Path work_dir = comp.get_package().get_source();
+       FS::Path work_dir = comp.get_package().get_source_directory();
 
        argv.push_back(relative(lib.get_path(), work_dir).str());
 
-       const Target::Dependencies &deps = lib.get_depends();
+       const Target::Dependencies &deps = lib.get_dependencies();
        for(Target::Dependencies::const_iterator i=deps.begin(); i!=deps.end(); ++i)
                if(ObjectFile *obj = dynamic_cast<ObjectFile *>(*i))
                        argv.push_back(relative(obj->get_path(), work_dir).str());
 
-       if(!builder.get_dry_run())
-       {
-               FS::mkpath(FS::dirname(lib.get_path()), 0755);
-               if(FS::exists(lib.get_path()))
-                       FS::unlink(lib.get_path());
-       }
-
        return new ExternalTask(argv, work_dir);
 }