1 #include <msp/path/utils.h>
5 #include "objectfile.h"
7 #include "staticlibrary.h"
12 Archive::Archive(Builder &b, const StaticLibrary &lib):
15 const Component &comp=lib.get_component();
20 argv.push_back(lib.get_name());
21 const TargetList &deps=lib.get_depends();
22 for(TargetList::const_iterator i=deps.begin(); i!=deps.end(); ++i)
23 if(dynamic_cast<ObjectFile *>(*i))
24 argv.push_back((*i)->get_name());
26 Path::Path lpath=lib.get_name();
27 if(!builder.get_dry_run())
28 Path::mkpath(lpath.subpath(0, lpath.size()-1), 0755);
30 announce(comp.get_package().get_name(), "AR ", relative(lpath, comp.get_package().get_source()).str());