]> git.tdb.fi Git - builder.git/blobdiff - source/builder.h
Replace DependencyCache with a more generic cache
[builder.git] / source / builder.h
index 933fbb05599dd66a01de8d8a147411a9a3c94e0f..b6c9ebcfc3caee4d6bfe57c59d7b69ba8be895b8 100644 (file)
@@ -32,11 +32,8 @@ class Builder: public Msp::RegisteredApplication<Builder>
 private:
        class Loader: public Msp::DataFile::ObjectLoader<Builder>
        {
-       private:
-               Msp::FS::Path src;
-
        public:
-               Loader(Builder &, const Msp::FS::Path &);
+               Loader(Builder &);
        private:
                void architecture(const std::string &);
                void binpkg(const std::string &);
@@ -96,7 +93,6 @@ public:
        bool get_dry_run() const { return dry_run; }
 
        PackageManager &get_package_manager() { return package_manager; }
-       SourcePackage *get_main_package() const { return main_pkg; }
 
        /** Looks up a target by name.  Returns 0 if no such target exists. */
        Target *get_target(const std::string &) const;
@@ -117,6 +113,12 @@ public:
        from Target constructor. */
        void add_target(Target *);
 
+       /** Adds a target that is a primary build goal.  Such targets will be added
+       as dependencies of the "world" virtual target.  If the target belongs to a
+       default component of the main package, it's also added to the "default"
+       virtual target. */
+       void add_primary_target(Target &);
+
        void problem(const std::string &, const std::string &);
 
        static void usage(const char *, const char *, bool);