string work_dir;
bool full_paths=false;
unsigned max_depth=5;
+ StringList cmdline_warn;
GetOpt getopt;
getopt.add_option('a', "analyze", analyze_mode, GetOpt::REQUIRED_ARG);
//getopt.add_option( "makefile", create_makefile, GetOpt::NO_ARG);
getopt.add_option( "max-depth", max_depth, GetOpt::REQUIRED_ARG);
getopt.add_option( "prefix", prefix, GetOpt::REQUIRED_ARG);
+ getopt.add_option( "warnings", cmdline_warn, GetOpt::REQUIRED_ARG);
getopt(argc, argv);
if(!analyze_mode.empty())
else
prefix=(get_home_dir()/"local"/current_arch).str();
}
+
+ warnings.push_back("all");
+ warnings.push_back("extra");
+ warnings.push_back("shadow");
+ warnings.push_back("pointer-arith");
+ warnings.push_back("error");
+ for(StringList::iterator i=cmdline_warn.begin(); i!=cmdline_warn.end(); ++i)
+ {
+ vector<string> warns=split(*i, ',');
+ warnings.insert(warnings.end(), warns.begin(), warns.end());
+ }
}
/**
cerr<<reason<<'\n';
if(brief)
- cerr<<"Usage: "<<argv0<<" [-a|--analyze MODE] [-b|--build] [-c|--clean] [-f|--file FILE] [-h|--help] [-j|--jobs NUM] [-n||--dry-run] [-v|--verbose] [-A|--conf-all] [-B|--build-all] [-C|--chdir DIRECTORY] [-W|--what-if FILE] [--chrome] [--conf-only] [--full-paths] [--max-depth NUM] [<target> ...]";
+ cerr<<"Usage: "<<argv0<<" [-a|--analyze MODE] [-b|--build] [-c|--clean] [-f|--file FILE] [-h|--help] [-j|--jobs NUM] [-n||--dry-run] [-v|--verbose] [-A|--conf-all] [-B|--build-all] [-C|--chdir DIRECTORY] [-W|--what-if FILE] [--chrome] [--conf-only] [--full-paths] [--max-depth NUM] [<target> ...]\n";
else
{
cerr<<
" -C, --chdir DIR Change to DIR before doing anything else.\n"
" -P, --progress Display progress while building.\n"
" -W, --what-if FILE Pretend that FILE has changed.\n"
+ " --arch ARCH Architecture to build for.\n"
" --conf-only Stop after configuring packages.\n"
" --full-paths Output full paths in analysis.\n"
//" --makefile Create a makefile for this package.\n"
- " --max-depth NUM Maximum depth to show in analysis.\n";
+ " --max-depth NUM Maximum depth to show in analysis.\n"
+ " --prefix DIR Directory to install things to.\n"
+ " --warnings LIST Compiler warnings to use.\n";
}
}