package_manager.set_no_externals(no_externals);
- load_build_file((FS::get_sys_data_dir(argv[0], "builder")/"builderrc").str());
- load_build_file((FS::get_user_data_dir("builder")/"rc").str());
-
if(arch.empty())
current_arch = &native_arch;
else
current_arch = new Architecture(*this, arch);
- if(!current_arch->is_native())
- {
- for(StringMap::const_iterator i=cross_prefixes.begin(); i!=cross_prefixes.end(); ++i)
- if(current_arch->match_name(i->first))
- {
- current_arch->set_cross_prefix(i->second);
- break;
- }
- }
+ load_build_file((FS::get_sys_data_dir(argv[0], "builder")/"builderrc").str());
+ load_build_file((FS::get_user_data_dir("builder")/"rc").str());
if(prfx.empty())
{
DataFile::ObjectLoader<Builder>(b),
src(s)
{
+ add("architecture", &Loader::architecture);
add("binary_package", &Loader::binpkg);
- add("cross_prefix", &Loader::cross_prefix);
add("profile", &Loader::profile);
add("package", &Loader::package);
}
-void Builder::Loader::binpkg(const string &n)
+void Builder::Loader::architecture(const string &n)
{
- BinaryPackage *pkg = new BinaryPackage(obj, n);
- load_sub(*pkg);
+ if(obj.current_arch->match_name(n))
+ load_sub(*obj.current_arch);
}
-void Builder::Loader::cross_prefix(const string &a, const string &p)
+void Builder::Loader::binpkg(const string &n)
{
- obj.cross_prefixes[a] = p;
+ BinaryPackage *pkg = new BinaryPackage(obj, n);
+ load_sub(*pkg);
}
void Builder::Loader::profile(const string &n)
public:
Loader(Builder &, const Msp::FS::Path &);
private:
+ void architecture(const std::string &);
void binpkg(const std::string &);
- void cross_prefix(const std::string &, const std::string &);
void profile(const std::string &);
void package(const std::string &);
};
Architecture native_arch;
Architecture *current_arch;
- StringMap cross_prefixes;
ProfileTemplateMap profile_tmpl;
Toolchain toolchain;
VirtualFileSystem vfs;