void Analyzer::analyze()
{
+ table.clear();
+
TableRow row;
row.push_back("Name");
row.push_back("Package");
use_pkgconfig=false;
}
-void BinaryPackage::set_path(const Msp::FS::Path &p)
+void BinaryPackage::set_path(const FS::Path &p)
{
path=builder.get_cwd()/p;
}
return 0;
}
-Target *Builder::get_header(const Msp::FS::Path &fn)
+Target *Builder::get_header(const FS::Path &fn)
{
Target *tgt=get_target(fn.str());
if(tgt) return tgt;
Target *tgt=queue.front();
queue.erase(queue.begin());
- if(tgt->get_buildable() && (tgt->get_package()==main_pkg || clean>=2))
+ if(tgt->is_buildable() && (tgt->get_package()==main_pkg || clean>=2))
clean_tgts.insert(tgt);
const TargetList &deps=tgt->get_depends();
{
const TargetMap &targets=builder.get_targets();
for(TargetMap::const_iterator i=targets.begin(); i!=targets.end(); ++i)
- if(i->second->get_package()==&pkg && !i->second->get_buildable())
+ if(i->second->get_package()==&pkg && !i->second->is_buildable())
result->add_depend(i->second);
files.push_back(pkg.get_source()/"Build");
}
void Component::Loader::modular()
{
if(comp.type!=PROGRAM)
- throw Msp::Exception("Only programs can be modular");
+ throw Exception("Only programs can be modular");
comp.modular=true;
}
for(ComponentList::const_iterator i=comps.begin(); i!=comps.end(); ++i)
if(i->get_name()==n)
{
- if(i->get_type()!=PROGRAM || !i->get_modular())
- throw Msp::Exception("Module host must be a modular program");
+ if(i->get_type()!=PROGRAM || !i->is_modular())
+ throw Exception("Module host must be a modular program");
comp.module_host=&*i;
return;
}
- throw Msp::Exception("Unknown component");
+ throw KeyError("Unknown component", n);
}
void Component::Loader::install_headers(const string &p)
const PathList &get_sources() const { return sources; }
const BuildInfo &get_build_info() const { return build_info; }
bool get_install() const { return install; }
- bool get_modular() const { return modular; }
+ bool is_modular() const { return modular; }
const PackageList &get_requires() const { return requires; }
- bool get_default() const { return deflt; }
+ bool is_default() const { return deflt; }
/** Prepares the build information for building. Pulls build info from the
parent and dependency packages, and adds any component-specific flags. */
{
OptionMap::const_iterator i=options.find(name);
if(i==options.end())
- throw Exception("Tried to access nonexistent option "+name);
+ throw KeyError("Unknown option", name);
return i->second;
}
components.push_back(Component(*this, Component::TARBALL, "@src"));
}
-Msp::FS::Path SourcePackage::get_temp_dir() const
+FS::Path SourcePackage::get_temp_dir() const
{
return source/config.get_option("tempdir").value/builder.get_current_arch().get_name()/config.get_option("profile").value;
}
-Msp::FS::Path SourcePackage::get_out_dir() const
+FS::Path SourcePackage::get_out_dir() const
{
const Architecture &arch=builder.get_current_arch();
if(arch.is_native())
using namespace std;
using namespace Msp;
-SystemLibrary::SystemLibrary(Builder &b, const Msp::FS::Path &p):
+SystemLibrary::SystemLibrary(Builder &b, const FS::Path &p):
FileTarget(b, 0, p),
Library(b, 0, p, extract_libname(p))
{ }
-string SystemLibrary::extract_libname(const Msp::FS::Path &p)
+string SystemLibrary::extract_libname(const FS::Path &p)
{
string result=FS::basepart(FS::basename(p));
if(!result.compare(0, 3, "lib"))
*/
Target *get_buildable_target();
- bool get_buildable() const { return buildable; }
+ bool is_buildable() const { return buildable; }
bool get_rebuild() const { return rebuild; }
const std::string &get_rebuild_reason() const { return rebuild_reason; }
void add_depend(Target *);