X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbuilder.h;h=40df4ff3861d85693a669af7a95c4aab482dc280;hb=5ed38947b3fabd977a7f68b512115fe1456ea096;hp=2f70fbd32a14257583e40cd07437f3f22b1af254;hpb=f76c063eb9b792088e034ffb4c2f173b843e8c57;p=builder.git diff --git a/source/builder.h b/source/builder.h index 2f70fbd..40df4ff 100644 --- a/source/builder.h +++ b/source/builder.h @@ -8,6 +8,7 @@ #include #include #include "architecture.h" +#include "buildgraph.h" #include "buildtype.h" #include "config.h" #include "logger.h" @@ -41,9 +42,6 @@ private: void package(const std::string &); }; -public: - typedef std::map TargetMap; - private: typedef std::list NameList; typedef std::map BuildTypeMap; @@ -54,9 +52,6 @@ private: Msp::FS::Path cwd; PackageManager package_manager; - SourcePackage *main_pkg; - - TargetMap targets; Architecture native_arch; Architecture *current_arch; @@ -64,6 +59,7 @@ private: BuildType *build_type; Toolchain toolchain; VirtualFileSystem vfs; + BuildGraph build_graph; Logger logger; ProblemList problems; @@ -94,14 +90,10 @@ public: PackageManager &get_package_manager() { return package_manager; } - /** Looks up a target by name. Returns 0 if no such target exists. */ - Target *get_target(const std::string &) const; - - const TargetMap &get_targets() const { return targets; } - 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; } const Msp::FS::Path &get_prefix() const { return prefix; } const Msp::FS::Path &get_temp_directory() const { return tempdir; } @@ -109,16 +101,6 @@ public: VirtualFileSystem &get_vfs() { return vfs; } const Logger &get_logger() const { return logger; } - /** Adds a target. It can later be retrieved by name. Called 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);