]> git.tdb.fi Git - builder.git/blobdiff - source/analyzer.h
Implement rdeps mode and sorting in Analyzer
[builder.git] / source / analyzer.h
index b9afffa9e7e8896a58a10a53535f43fd4d823f85..6d6af9b5ab5706a076617bd6e9a500cf84052ee3 100644 (file)
@@ -9,6 +9,7 @@ Distributed under the LGPL
 #define ANALYZER_H_
 
 #include <list>
+#include <set>
 #include <string>
 #include <vector>
 
@@ -26,7 +27,7 @@ public:
                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)
+               RDEPS     //< Print targets that depend on the given targets
        };
 
 private:
@@ -38,6 +39,7 @@ private:
        Table table;
        unsigned max_depth;
        bool full_paths;
+       std::map<const Target *, std::set<Target *> > rdepends;
 
 public:
        Analyzer(Builder &);
@@ -54,14 +56,15 @@ private:
        /**
        Adds rows to the table for the given target and its dependencies.
        */
-       void build_depend_table(Target &, unsigned);
+       void build_depend_table(const Target &, unsigned);
 
        /**
        Prints out the table that resulted from the analysis.
        */
        void print_table() const;
 
-       static bool target_order(Target *, Target *);
+       static bool target_order(const Target *, const Target *);
+       static bool target_order_full(const Target *, const Target *);
 };
 
 #endif