]> git.tdb.fi Git - builder.git/blobdiff - source/archive.cpp
Change arch and prefix to global options
[builder.git] / source / archive.cpp
index b6c9582b5e62502b0e735c24b058c9a474528953..a018dc9235c4421351003565cb4e6a2c1c438af9 100644 (file)
@@ -10,7 +10,7 @@ Distributed under the LGPL
 #include "builder.h"
 #include "component.h"
 #include "objectfile.h"
-#include "package.h"
+#include "sourcepackage.h"
 #include "staticlibrary.h"
 
 using namespace std;
@@ -21,7 +21,8 @@ Archive::Archive(Builder &b, const StaticLibrary &lib):
 {
        const Component &comp=lib.get_component();
 
-       argv.push_back(builder.get_tool("AR", lib.get_package()->get_arch()));
+       std::string tool="AR";
+       argv.push_back(builder.get_current_arch().get_tool(tool));
        argv.push_back("rc");
 
        argv.push_back(lib.get_name());
@@ -30,11 +31,11 @@ Archive::Archive(Builder &b, const StaticLibrary &lib):
                if(dynamic_cast<ObjectFile *>(*i))
                        argv.push_back((*i)->get_name());
 
-       Path::Path lpath=lib.get_name();
+       Path lpath=lib.get_name();
        if(!builder.get_dry_run())
-               Path::mkpath(lpath.subpath(0, lpath.size()-1), 0755);
+               mkpath(lpath.subpath(0, lpath.size()-1), 0755);
 
-       announce(comp.get_package().get_name(), "AR  ", relative(lpath, comp.get_package().get_source()).str());
+       announce(comp.get_package().get_name(), tool, relative(lpath, comp.get_package().get_source()).str());
 
        launch();
 }