+void Builder::usage(const char *argv0, bool brief)
+{
+ 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] [--full-paths] [--max-depth NUM] [<target> ...]";
+ else
+ {
+ cerr<<
+ "Usage: "<<argv0<<" [options] [<target> ...]\n"
+ "\n"
+ "Options:\n"
+ " -a, --analyze MODE Perform analysis. MODE can be deps, alldeps or rebuild.\n"
+ " -b, --build Perform build even if doing analysis.\n"
+ " -c, --clean Clean buildable targets.\n"
+ " -f, --file FILE Read info from FILE instead of Build.\n"
+ " -h, --help Print this message.\n"
+ " -j, --jobs NUM Run NUM commands at once, whenever possible.\n"
+ " -n, --dry-run Don't actually do anything, only show what would be done.\n"
+ " -v, --verbose Print more information about what's going on.\n"
+ " -A, --conf-all Apply configuration to all packages.\n"
+ " -B, --build-all Build all targets unconditionally.\n"
+ " -C, --chdir DIR Change to DIR before doing anything else.\n"
+ " -W, --what-if FILE Pretend that FILE has changed.\n"
+ " --chrome Use extra chrome to print status.\n"
+ " --conf-only Stop after configuring packages.\n"
+ " --full-paths Output full paths in analysis.\n"
+ " --max-depth NUM Maximum depth to show in analysis.\n";
+ }
+}
+
+/**
+Loads the given build file.
+
+@param fn Path to the file
+
+@return 0 on success, -1 if the file could not be opened
+*/