]> git.tdb.fi Git - builder.git/blobdiff - source/builder.h
Pass the option map through load_build_file and to Loader
[builder.git] / source / builder.h
index 66194a27c3e4cf3dccf81a6aacc2dee2b31fd9b0..3d70968b61525a9cde19e1757838a0375142eca3 100644 (file)
@@ -32,8 +32,14 @@ class Builder: public Msp::RegisteredApplication<Builder>
 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 &);
@@ -79,6 +85,8 @@ private:
        Msp::FS::Path prefix;
        Msp::FS::Path tempdir;
 
+       Loader *top_loader;
+
        static std::string usagemsg;
        static std::string helpmsg;
 
@@ -104,9 +112,10 @@ public:
 
        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