X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbuilder.cpp;h=274b153e70c566a2fa2dff2147918cc2d2474a37;hb=b98c297b0826c78521e54a0120cf20737a9e2727;hp=1917cd42288223796c123ae23797a04734b5e6e4;hpb=f1c967215e6b08095bdf07518472beca3067ec37;p=builder.git diff --git a/source/builder.cpp b/source/builder.cpp index 1917cd4..274b153 100644 --- a/source/builder.cpp +++ b/source/builder.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -47,6 +48,7 @@ Builder::Builder(int argc, char **argv): getopt.add_option(GetOpt::Option('f', "file", GetOpt::REQUIRED, "Build")); getopt.add_option(GetOpt::Option("chrome", GetOpt::NONE)); getopt.add_option(GetOpt::Option("full-paths", GetOpt::NONE)); + getopt.add_option(GetOpt::Option('A', "conf-all", GetOpt::NONE)); int index=getopt(argc, argv); verbose+=getopt['v'].count(); @@ -76,16 +78,15 @@ Builder::Builder(int argc, char **argv): } dry_run=getopt['n']; - jobs=max(strtol(getopt['j'].arg()), 1L); - chrome=getopt["chrome"]; + conf_all=getopt['A']; + build_file=getopt['f'].arg(); + build_all=getopt['B']; if(getopt['C']) chdir(getopt['C'].arg().c_str()); - build_file=getopt['f'].arg(); - for(int i=index; i::const_iterator j=path.begin(); j!=path.end(); ++j) - if((tgt=check_header(Path::Path(*j)/fn))) + if((tgt=check_header(Path::getcwd()/ *j/fn))) return tgt; return 0; @@ -210,7 +211,7 @@ Target *Builder::get_library(const string &lib, const list &path) string basename="lib"+lib+".so"; for(list::const_iterator j=path.begin(); j!=path.end(); ++j) { - string full=(Path::Path(*j)/basename).str(); + string full=(Path::getcwd()/ *j/basename).str(); Target *tgt=get_target(full); if(tgt) return tgt; @@ -234,7 +235,6 @@ int Builder::main() default_pkg=packages.begin()->second; - bool conf_all=cmdline_options.count("conf_all"); while(!new_pkgs.empty()) { Package *pkg=new_pkgs.front(); @@ -273,10 +273,21 @@ int Builder::main() if(i->second->get_buildable()) cout<<'*'; unsigned count=0; + unsigned ood_count=0; for(TargetMap::iterator j=targets.begin(); j!=targets.end(); ++j) if(j->second->get_package()==i->second) + { ++count; - cout<<" ("<second->get_rebuild()) + ++ood_count; + } + if(count) + { + cout<<" ("<