X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fanalyzer.h;h=5464dacf989ac84ecea5be2a0c9353128924ec8f;hb=HEAD;hp=c5c6ba2891de6cf8ba144763b488d69f05e1d889;hpb=74266a6e650f019063cdcd1c9a7bd26d8f99041b;p=builder.git diff --git a/source/analyzer.h b/source/analyzer.h deleted file mode 100644 index c5c6ba2..0000000 --- a/source/analyzer.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef ANALYZER_H_ -#define ANALYZER_H_ - -#include -#include -#include - -class Builder; -class Target; - -/** -Performs various kinds of dependency analysis on the build tree. -*/ -class Analyzer -{ -public: - enum Mode - { - DEPS, /// Skip over "trivial" targets such as Install and Compile - ALLDEPS, /// Print out absolutely every target - REBUILD, /// Print targets that are going to be rebuilt - RDEPS /// Print targets that depend on the given targets (NYI) - }; - - 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; } - void analyze(); -private: - typedef std::vector TableRow; - typedef std::list Table; - - Builder &builder; - Mode mode; - Table table; - unsigned max_depth; - bool full_paths; - - void build_depend_table(Target &, unsigned); - void print_table() const; - - static bool target_order(Target *, Target *); -}; - -#endif