X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbuilder.cpp;h=c8091ffd822eb2de8bf28b3a70551641ecd280e1;hb=0458300fda4f345f865a7f3ee4fc0f2020a91983;hp=0b00fecf5c8dec0036c34a4ab69333394e2b7029;hpb=0e603ddd5885dc9e3c369827ea97f69a70f179c9;p=builder.git diff --git a/source/builder.cpp b/source/builder.cpp index 0b00fec..c8091ff 100644 --- a/source/builder.cpp +++ b/source/builder.cpp @@ -7,17 +7,15 @@ Distributed under the LGPL #include #include -#include #include #include #include #include #include #include -#include #include #include -#include +#include #include #include #include @@ -114,7 +112,7 @@ Builder::Builder(int argc, char **argv): else if(analyze_mode=="rdeps") analyzer->set_mode(Analyzer::RDEPS); else - throw UsageError("Invalid analyze mode"); + throw usage_error("Invalid analyze mode"); analyzer->set_max_depth(max_depth); analyzer->set_full_paths(full_paths); @@ -337,7 +335,7 @@ string Builder::run_pkgconfig(const string &pkg, const string &what) int status; string res = run_command(argv, &status); if(status) - throw Exception(format("pkg-config for package %s failed", pkg)); + throw runtime_error(format("pkg-config for package %s failed", pkg)); return res; } @@ -587,7 +585,7 @@ int Builder::load_build_file(const FS::Path &fn) Loader loader(*this, fn.subpath(0, fn.size()-1)); loader.load(parser); } - catch(const IO::FileNotFound &) + catch(const IO::file_not_found &) { return -1; } @@ -652,7 +650,6 @@ int Builder::create_targets() // Make the cmdline target depend on all targets mentioned on the command line Target *cmdline = new VirtualTarget(*this, "cmdline"); - bool build_world = false; for(list::iterator i=cmdline_targets.begin(); i!=cmdline_targets.end(); ++i) { Target *tgt = get_target(*i); @@ -663,8 +660,7 @@ int Builder::create_targets() IO::print("I don't know anything about %s\n", *i); return -1; } - if(tgt==world) - build_world = true; + cmdline->add_depend(tgt); } @@ -869,7 +865,6 @@ void Builder::package_help() } } -Application::RegApp Builder::reg; string Builder::usagemsg; string Builder::helpmsg;