]> git.tdb.fi Git - builder.git/blobdiff - source/analyzer.cpp
Redesign how tools are run
[builder.git] / source / analyzer.cpp
index 4cebafad175ae6d7cc3a1a2459ffbba4c4d1709e..f91c298825cc8a8039a0c1d1bc63a7036ec75120 100644 (file)
@@ -1,3 +1,4 @@
+#include <msp/core/algorithm.h>
 #include <msp/fs/utils.h>
 #include <msp/io/print.h>
 #include "analyzer.h"
 using namespace std;
 using namespace Msp;
 
-Analyzer::Analyzer(Builder &b):
-       builder(b),
-       mode(DEPS),
-       max_depth(0),
-       full_paths(false)
-{ }
-
 void Analyzer::analyze()
 {
        if(mode==RDEPS)
@@ -114,7 +108,7 @@ void Analyzer::build_depend_table(Target &tgt, unsigned depth)
                        depends.insert(depends.end(), tdeps.begin(), tdeps.end());
                }
 
-               depends.sort(full_paths ? target_order_full : target_order);
+               sort(depends, (full_paths ? target_order_full : target_order));
 
                for(Target *d: depends)
                        build_depend_table(*d, depth+1);