GetOpt getopt;
getopt.add_option('a', "analyze", analyze_mode, GetOpt::REQUIRED_ARG).set_help("Perform analysis. MODE can be deps, alldeps or rebuild.", "MODE");
GetOpt getopt;
getopt.add_option('a', "analyze", analyze_mode, GetOpt::REQUIRED_ARG).set_help("Perform analysis. MODE can be deps, alldeps or rebuild.", "MODE");
getopt.add_option('l', "log", log_channels, GetOpt::REQUIRED_ARG).set_help("Set log channels to be displayed.", "LIST");
getopt.add_option('n', "dry-run", dry_run, GetOpt::NO_ARG).set_help("Don't actually do anything, only show what would be done.");
getopt.add_option('s', "silent", silent, GetOpt::NO_ARG).set_help("Don't print any messages other than errors.");
getopt.add_option('l', "log", log_channels, GetOpt::REQUIRED_ARG).set_help("Set log channels to be displayed.", "LIST");
getopt.add_option('n', "dry-run", dry_run, GetOpt::NO_ARG).set_help("Don't actually do anything, only show what would be done.");
getopt.add_option('s', "silent", silent, GetOpt::NO_ARG).set_help("Don't print any messages other than errors.");
getopt.add_option('v', "verbose", verbose, GetOpt::NO_ARG).set_help("Print more information about what's going on.");
getopt.add_option('x', "no-externals", no_externals, GetOpt::NO_ARG).set_help("Do not load external source packages.");
getopt.add_option('A', "conf-all", conf_all, GetOpt::NO_ARG).set_help("Apply configuration to all packages.");
getopt.add_option('v', "verbose", verbose, GetOpt::NO_ARG).set_help("Print more information about what's going on.");
getopt.add_option('x', "no-externals", no_externals, GetOpt::NO_ARG).set_help("Do not load external source packages.");
getopt.add_option('A', "conf-all", conf_all, GetOpt::NO_ARG).set_help("Apply configuration to all packages.");
+ if(!build_type_name.empty())
+ {
+ BuildTypeMap::iterator i = build_types.find(build_type_name);
+ if(i==build_types.end())
+ throw usage_error("Unknown build type");
+ build_type = &i->second;
+ }
+
warnings.push_back("all");
warnings.push_back("extra");
warnings.push_back("shadow");
warnings.push_back("all");
warnings.push_back("extra");
warnings.push_back("shadow");
logger.log("environment", format("Building on %s, for %s%s", native_arch.get_name(),
current_arch->get_name(), (current_arch->is_native() ? " (native)" : "")));
logger.log("environment", format("Prefix is %s", prefix));
logger.log("environment", format("Building on %s, for %s%s", native_arch.get_name(),
current_arch->get_name(), (current_arch->is_native() ? " (native)" : "")));
logger.log("environment", format("Prefix is %s", prefix));
const PackageManager::PackageMap &packages = package_manager.get_packages();
list<string> package_details;
const PackageManager::PackageMap &packages = package_manager.get_packages();
list<string> package_details;
-void Builder::apply_profile_template(Config &config, const string &pt) const
-{
- vector<string> parts = split(pt, '-');
-
- for(vector<string>::iterator i=parts.begin(); i!=parts.end(); ++i)
- {
- ProfileTemplateMap::const_iterator j = profile_tmpl.find(*i);
- if(j==profile_tmpl.end())
- continue;
-
- config.update(j->second);
- }
-}
-
void Builder::problem(const string &p, const string &d)
{
problems.push_back(Problem(p, d));
void Builder::problem(const string &p, const string &d)
{
problems.push_back(Problem(p, d));
{
add("architecture", &Loader::architecture);
add("binary_package", &Loader::binpkg);
{
add("architecture", &Loader::architecture);
add("binary_package", &Loader::binpkg);
add("profile", &Loader::profile);
add("package", &Loader::package);
}
add("profile", &Loader::profile);
add("package", &Loader::package);
}
- StringMap prf;
- ProfileLoader ldr(prf);
- load_sub_with(ldr);
- obj.profile_tmpl.insert(ProfileTemplateMap::value_type(n, prf));
+ BuildType btype(n);
+ load_sub(btype);
+ BuildTypeMap::iterator i = obj.build_types.insert(BuildTypeMap::value_type(n, btype)).first;
+ if(!obj.build_type)
+ obj.build_type = &i->second;
+}
+
+void Builder::Loader::profile(const string &)
+{
+ IO::print("Profiles are deprecated\n");
-}
-
-
-Builder::ProfileLoader::ProfileLoader(StringMap &p):
- profile(p)
-{
- add("option", &ProfileLoader::option);
-}
-
-void Builder::ProfileLoader::option(const string &o, const string &v)
-{
- profile.insert(StringMap::value_type(o, v));
+ if(obj.build_type)
+ pkg->set_build_type(*obj.build_type);