13 Performs various kinds of dependency analysis on the build tree.
20 DEPS, //< Skip over "trivial" targets such as InstalledFile
21 ALLDEPS, //< Print out absolutely every target
22 REBUILD, //< Print targets that are going to be rebuilt
23 RDEPS //< Print targets that depend on the given targets
27 using TableRow = std::vector<std::string>;
31 std::vector<TableRow> table;
32 unsigned max_depth = 0;
33 bool full_paths = false;
34 std::map<const Target *, std::set<Target *> > rdepends;
37 Analyzer(Builder &b): builder(b) { }
39 void set_mode(Mode m) { mode = m; }
40 void set_max_depth(unsigned m) { max_depth = m; }
41 void set_full_paths(bool f) { full_paths = f; }
43 /// Performs the analysis and prints out the resulting dependency tree.
47 /** Adds rows for a target, then recursively adds rows for dependencies as
49 void build_depend_table(Target &, unsigned);
51 /// Prints out the table that resulted from the analysis.
52 void print_table() const;
54 static bool target_order(const Target *, const Target *);
55 static bool target_order_full(const Target *, const Target *);