5 #include <msp/datafile/loader.h>
6 #include <msp/fs/path.h>
14 Components specify things to be built. Each component may build one binary (it
15 may also build none), as well as install a bunch of headers. Components inherit
16 dependencies and build info from the package they belong to, and may also add
22 class Loader: public Msp::DataFile::Loader
30 Component &get_object() { return comp; }
32 virtual void finish();
33 void source(const std::string &);
34 void require(const std::string &);
36 void host(const std::string &);
37 void install_headers(const std::string &);
63 Component(SourcePackage &, Type, const std::string &);
64 const SourcePackage &get_package() const { return pkg; }
65 Type get_type() const { return type; }
66 const std::string &get_name() const { return name; }
67 const StringList &get_sources() const { return sources; }
68 const BuildInfo &get_build_info() const { return build_info; }
69 bool get_install() const { return install; }
70 const PackageList &get_requires() const { return requires; }
71 bool is_default() const { return deflt; }
73 void configure(const StringMap &, unsigned);
75 /** Prepares the build information for building. Pulls build info from the
76 parent and dependency packages, and adds any component-specific flags. */
77 void create_build_info();
79 void create_targets() const;
82 /** Returns a list of all source files for the component. */
83 PathList collect_source_files() const;
86 typedef std::list<Component> ComponentList;