X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fanalyzer.h;h=5464dacf989ac84ecea5be2a0c9353128924ec8f;hb=bc85cc286c8a3f1055f1979a7ff8697cf1b61912;hp=cca259052d8c075a5b5970e7bf4401212e8f96df;hpb=87ea54db19306434bac3e765c9bd3464fd53f390;p=builder.git diff --git a/source/analyzer.h b/source/analyzer.h index cca2590..5464dac 100644 --- a/source/analyzer.h +++ b/source/analyzer.h @@ -1,14 +1,8 @@ -/* $Id$ - -This file is part of builder -Copyright © 2006-2007, 2009 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifndef ANALYZER_H_ #define ANALYZER_H_ #include +#include #include #include #include @@ -24,7 +18,7 @@ class Analyzer 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 @@ -43,24 +37,20 @@ private: 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 *);