X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fbuilder.cpp;h=df6eda42fcfe535f2074b1939b5a0c6afe677782;hb=88a344b29ab173cd6ecacd0b038ea96dcb7484fc;hp=94bbce04d3a552480994b2d4597fdeb5e154f3b1;hpb=0368a9c1972ff5fd6cd8984901ff0bdbd86afc9f;p=builder.git diff --git a/source/builder.cpp b/source/builder.cpp index 94bbce0..df6eda4 100644 --- a/source/builder.cpp +++ b/source/builder.cpp @@ -165,23 +165,13 @@ Builder::Builder(int argc, char **argv): 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()) { @@ -609,21 +599,22 @@ Builder::Loader::Loader(Builder &b, const FS::Path &s): DataFile::ObjectLoader(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)