X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fpackagemanager.h;h=9b4f3476d7a2ae821650bdd5118434d1a0546d10;hb=07503a34b80778fe74977f0fb0c2094c92d64ce0;hp=9fb373ec48152b70a16a5e56b93604c08176b38c;hpb=7c61a1e64153bac91431e1a72d946208dd61eb30;p=builder.git diff --git a/source/packagemanager.h b/source/packagemanager.h index 9fb373e..9b4f347 100644 --- a/source/packagemanager.h +++ b/source/packagemanager.h @@ -28,6 +28,7 @@ private: SearchPath binpkg_files; bool no_externals; PackageMap packages; + Package *main_pkg; std::set not_found; bool env_set; @@ -48,7 +49,11 @@ public: void add_package(Package *); /** Returns a package from the cache. */ - Package *get_package(const std::string &); + Package *get_package(const std::string &) const; + + /** Returns the package that was added first. This should be considered + the primary build target. */ + Package &get_main_package() const; const PackageMap &get_packages() const { return packages; }