]> git.tdb.fi Git - builder.git/blobdiff - source/analyzer.h
ComponentList typedef isn't needed outside of SourcePackage
[builder.git] / source / analyzer.h
index 7dd4c1345d8e3b5d09f25835da88ce996be48bb7..57d6c1ae0186b83085d7f79cf5396280eaca7280 100644 (file)
@@ -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 <list>
+#include <set>
 #include <string>
 #include <vector>
 
@@ -26,7 +20,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,12 +32,13 @@ private:
        Table table;
        unsigned max_depth;
        bool full_paths;
+       std::map<const Target *, std::set<Target *> > rdepends;
 
 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; }
+       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.
@@ -61,7 +56,8 @@ private:
        */
        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