bool silent = false;
vector<string> log_channels;
string build_type;
+ vector<string> package_path;
GetOpt getopt;
getopt.add_option('a', "analyze", analyze_mode, GetOpt::REQUIRED_ARG).set_help("Perform dependency analysis.", "MODE");
getopt.add_option('A', "conf-all", conf_all, GetOpt::NO_ARG).set_help("Apply configuration to all packages.");
getopt.add_option('B', "build-all", build_all, GetOpt::NO_ARG).set_help("Build all targets unconditionally.");
getopt.add_option('C', "chdir", work_dir, GetOpt::REQUIRED_ARG).set_help("Change to DIR before doing anything else.", "DIR");
+ getopt.add_option('I', "package-dir",package_path, GetOpt::REQUIRED_ARG).set_help("Additional directory containing packages.", "DIR");
getopt.add_option('P', "progress", show_progress, GetOpt::NO_ARG).set_help("Display progress while building.");
getopt.add_option('W', "what-if", what_if, GetOpt::REQUIRED_ARG).set_help("Pretend that FILE has changed.", "FILE");
getopt.add_option( "arch", arch, GetOpt::REQUIRED_ARG).set_help("Build for architecture ARCH.", "ARCH");
package_manager.append_package_path(cwd);
package_manager.append_package_path(cwd/"..");
+ for(const string &p: package_path)
+ package_manager.append_package_path(cwd/p);
package_manager.append_binary_package_path(FS::get_sys_data_dir()/"packages");
package_manager.set_no_externals(no_externals);