private:
class Loader: public Msp::DataFile::ObjectLoader<Builder>
{
+ private:
+ const Config::InputOptions *options;
+ bool conf_all;
+
public:
- Loader(Builder &);
+ Loader(Builder &, const Config::InputOptions * = 0, bool = false);
+ ~Loader();
+
private:
void architecture(const std::string &);
void binpkg(const std::string &);
Msp::FS::Path prefix;
Msp::FS::Path tempdir;
+ Loader *top_loader;
+
static std::string usagemsg;
static std::string helpmsg;
PackageManager &get_package_manager() { return package_manager; }
- const Msp::FS::Path &get_work_directory() const { return cwd; }
const Architecture &get_current_arch() const { return *current_arch; }
const Architecture &get_native_arch() const { return native_arch; }
BuildGraph &get_build_graph() { return build_graph; }
static void usage(const char *, const char *, bool);
- /** Loads a build file. Returns 0 on success or -1 if the file could not be
- opened. */
- void load_build_file(const Msp::FS::Path &);
+ /** Loads a build file. If opts is not null, it is used to configure any
+ packages loaded from this file. If all is true, external packages are also
+ configured. */
+ void load_build_file(const Msp::FS::Path &, const Config::InputOptions *opts = 0, bool all = false);
private:
/** Prepares packages and targets for building. Returns true if everything