public:
enum Mode
{
- DEPS, //< Skip over "trivial" targets such as Install and Compile
+ DEPS, //< Skip over "trivial" targets such as InstalledFile
ALLDEPS, //< Print out absolutely every target
REBUILD, //< Print targets that are going to be rebuilt
RDEPS //< Print targets that depend on the given targets
public:
Analyzer(Builder &);
+
void set_mode(Mode m) { mode = m; }
void set_max_depth(unsigned m) { max_depth = m; }
void set_full_paths(bool f) { full_paths = f; }
- /**
- Performs the analysis and prints out the resulting dependency tree.
- */
+ /// Performs the analysis and prints out the resulting dependency tree.
void analyze();
private:
- /**
- Adds rows to the table for the given target and its dependencies.
- */
+ /** Adds rows for a target, then recursively adds rows for dependencies as
+ needed. */
void build_depend_table(Target &, unsigned);
- /**
- Prints out the table that resulted from the analysis.
- */
+ /// Prints out the table that resulted from the analysis.
void print_table() const;
static bool target_order(const Target *, const Target *);
VirtualFileSystem &get_vfs() { return vfs; }
const Logger &get_logger() const { return logger; }
- /** Adds a target to both the target map and the new target queue. Called
- from Target constructor. */
+ /** 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
const SourcePackage &get_package() const { return package; }
Type get_type() const { return type; }
const std::string &get_name() const { return name; }
+
+ /** Returns a list of sources for the component. They may refer to
+ directories or individual files. */
const StringList &get_sources() const { return sources; }
- const BuildInfo &get_build_info() const { return build_info; }
+
+protected:
+ /** Returns a list of all source files for the component. */
+ PathList collect_source_files() const;
+
+public:
bool get_install() const { return install; }
+ const InstallMap &get_install_map() const { return install_map; }
const PackageList &get_required_packages() const { return requires; }
bool is_default() const { return deflt; }
- const InstallMap &get_install_map() const { return install_map; }
+ /** Prepares any required packages. */
void prepare();
/** Prepares the build information for building. Pulls build info from the
parent and dependency packages, and adds any component-specific flags. */
void create_build_info();
- void create_targets() const;
+ const BuildInfo &get_build_info() const { return build_info; }
-protected:
- /** Returns a list of all source files for the component. */
- PathList collect_source_files() const;
+ void create_targets() const;
};
#endif
class Tool;
+/**
+A container for tools. Performs lookup based on tag or filename extension.
+*/
class Toolchain
{
private: