]> git.tdb.fi Git - builder.git/blob - source/binarypackage.h
Refactor transitive dependencies to work on all targets
[builder.git] / source / binarypackage.h
1 #ifndef BINARYPACKAGE_H_
2 #define BINARYPACKAGE_H_
3
4 #include "package.h"
5
6 /**
7 Represents a package that is installed on the system, but can't be built by
8 Builder.
9 */
10 class BinaryPackage: public Package
11 {
12 public:
13         class Loader: public Msp::DataFile::DerivedObjectLoader<BinaryPackage, Package::Loader>
14         {
15         public:
16                 Loader(BinaryPackage &);
17         private:
18                 void build_info();
19                 void header(const std::string &);
20         };
21
22         typedef std::vector<std::string> Flags;
23
24 private:
25         typedef std::list<std::string> HeaderList;
26
27         Msp::FS::Path base_path;
28         HeaderList headers;
29         BuildInfo static_binfo;
30
31 public:
32         BinaryPackage(Builder &, const std::string &);
33
34         const BuildInfo &get_static_build_info() const { return static_binfo; }
35
36         static BinaryPackage *from_flags(Builder &, const std::string &, const Flags &, const Flags & = Flags());
37 private:
38         static void process_flags(const Flags &, BuildInfo &);
39         virtual void do_prepare();
40 };
41
42 #endif