const Component *c = queue.front();
queue.erase(queue.begin());
- const StringList &libpath = c->get_build_info().libpath;
+ const BuildInfo::PathList &libpath = c->get_build_info().libpath;
- const list<string> &libs = c->get_build_info().libs;
+ const BuildInfo::WordList &libs = c->get_build_info().libs;
for(StringList::const_iterator i=libs.begin(); i!=libs.end(); ++i)
{
Target *lib = builder.get_vfs().find_library(*i, libpath, libmode);
void BinaryPackage::create_build_info()
{
- for(StringList::iterator i=export_binfo.incpath.begin(); i!=export_binfo.incpath.end(); ++i)
- if((*i)[0]=='@')
- *i = (path/i->substr(1)).str();
+ for(BuildInfo::PathList::iterator i=export_binfo.incpath.begin(); i!=export_binfo.incpath.end(); ++i)
+ if((*i)[0]=="@")
+ *i = path/i->subpath(1);
- for(StringList::iterator i=export_binfo.libpath.begin(); i!=export_binfo.libpath.end(); ++i)
- if((*i)[0]=='@')
- *i = (path/i->substr(1)).str();
+ for(BuildInfo::PathList::iterator i=export_binfo.libpath.begin(); i!=export_binfo.libpath.end(); ++i)
+ if((*i)[0]=="@")
+ *i = path/i->subpath(1);
}
BinaryPackage *BinaryPackage::from_flags(Builder &builder, const std::string &name, const vector<string> &flags)
};
typedef std::map<std::string, std::string> DefineMap;
+ typedef std::list<Msp::FS::Path> PathList;
+ typedef std::list<std::string> WordList;
DefineMap defines;
- StringList incpath;
- StringList libpath;
- StringList libs;
- StringList warnings;
+ PathList incpath;
+ PathList libpath;
+ WordList libs;
+ WordList warnings;
bool threads;
bool debug;
int optimize;
build_info.update_from(pkg.get_build_info());
- for(StringList::iterator i=build_info.incpath.begin(); i!=build_info.incpath.end(); ++i)
+ for(BuildInfo::PathList::iterator i=build_info.incpath.begin(); i!=build_info.incpath.end(); ++i)
*i = (pkg.get_source() / *i).str();
- for(StringList::iterator i=build_info.libpath.begin(); i!=build_info.libpath.end(); ++i)
+ for(BuildInfo::PathList::iterator i=build_info.libpath.begin(); i!=build_info.libpath.end(); ++i)
*i = (pkg.get_source() / *i).str();
if(pkg.get_library_mode()!=DYNAMIC)
deps_cache.set_deps(relname, includes);
}
- const StringList &incpath = comp->get_build_info().incpath;
- StringList local_incpath = incpath;
+ const BuildInfo::PathList &incpath = comp->get_build_info().incpath;
+ BuildInfo::PathList local_incpath = incpath;
local_incpath.push_front(FS::dirname(path).str());
for(list<string>::iterator i=includes.begin(); i!=includes.end(); ++i)
argv.push_back("-c");
const BuildInfo &binfo = comp.get_build_info();
- for(list<string>::const_iterator i=binfo.warnings.begin(); i!=binfo.warnings.end(); ++i)
+ for(BuildInfo::WordList::const_iterator i=binfo.warnings.begin(); i!=binfo.warnings.end(); ++i)
argv.push_back("-W"+*i);
- for(list<string>::const_iterator i=binfo.incpath.begin(); i!=binfo.incpath.end(); ++i)
- argv.push_back("-I"+*i);
+ for(BuildInfo::PathList::const_iterator i=binfo.incpath.begin(); i!=binfo.incpath.end(); ++i)
+ argv.push_back("-I"+i->str());
for(BuildInfo::DefineMap::const_iterator i=binfo.defines.begin(); i!=binfo.defines.end(); ++i)
{
if(i->second.empty())
argv.push_back("-static");
const BuildInfo &binfo = comp.get_build_info();
- for(list<string>::const_iterator i=binfo.libpath.begin(); i!=binfo.libpath.end(); ++i)
- argv.push_back("-L"+*i);
+ for(BuildInfo::PathList::const_iterator i=binfo.libpath.begin(); i!=binfo.libpath.end(); ++i)
+ argv.push_back("-L"+i->str());
if(binfo.strip)
argv.push_back("-s");
if(binfo.threads)
const BuildInfo &binfo = spkg.get_exported_binfo();
IO::print(out, "Libs:");
- for(StringList::const_iterator i=binfo.libpath.begin(); i!=binfo.libpath.end(); ++i)
+ for(BuildInfo::PathList::const_iterator i=binfo.libpath.begin(); i!=binfo.libpath.end(); ++i)
IO::print(out, " -L%s", FS::relative(*i, builder.get_prefix()).str());
- for(StringList::const_iterator i=binfo.libs.begin(); i!=binfo.libs.end(); ++i)
+ for(BuildInfo::WordList::const_iterator i=binfo.libs.begin(); i!=binfo.libs.end(); ++i)
IO::print(out, " -l%s", *i);
if(binfo.threads)
out.write("-pthread");
out.put('\n');
IO::print(out, "Cflags:");
- for(StringList::const_iterator i=binfo.incpath.begin(); i!=binfo.incpath.end(); ++i)
+ for(BuildInfo::PathList::const_iterator i=binfo.incpath.begin(); i!=binfo.incpath.end(); ++i)
IO::print(out, " -I%s", FS::relative(*i, builder.get_prefix()).str());
for(BuildInfo::DefineMap::const_iterator i=binfo.defines.begin(); i!=binfo.defines.end(); ++i)
if(i->second.empty())
class VirtualFileSystem
{
public:
- typedef std::list<std::string> SearchPath;
+ typedef std::list<Msp::FS::Path> SearchPath;
private:
- typedef std::map<std::string, FileTarget *> TargetMap;
+ typedef std::map<Msp::FS::Path, FileTarget *> TargetMap;
Builder &builder;
TargetMap targets;