X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fanalyzer.cpp;h=3481ec823309523fce9f78e171c3ff9df7374382;hb=242c55b17e6608b29a77ca17a5b677e202a3ca90;hp=e2b25bd6260bfdce4ede32c615dad72a6079b10b;hpb=74266a6e650f019063cdcd1c9a7bd26d8f99041b;p=builder.git diff --git a/source/analyzer.cpp b/source/analyzer.cpp index e2b25bd..3481ec8 100644 --- a/source/analyzer.cpp +++ b/source/analyzer.cpp @@ -1,7 +1,14 @@ +/* $Id$ + +This file is part of builder +Copyright © 2006-2009 Mikko Rasa, Mikkosoft Productions +Distributed under the LGPL +*/ + #include #include #include -#include +#include #include "analyzer.h" #include "builder.h" #include "install.h" @@ -19,9 +26,6 @@ Analyzer::Analyzer(Builder &b): full_paths(false) { } -/** -Performs the analysis and prints out the resulting dependency tree. -*/ void Analyzer::analyze() { TableRow row; @@ -36,12 +40,6 @@ void Analyzer::analyze() print_table(); } -/** -Adds rows to the table for the given target and it' dependencies. - -@param tgt Target to be processed -@param depth Recursion level of the target (top level is 0) -*/ void Analyzer::build_depend_table(Target &tgt, unsigned depth) { if(mode!=REBUILD && mode!=ALLDEPS) @@ -54,7 +52,7 @@ void Analyzer::build_depend_table(Target &tgt, unsigned depth) } else if(mode==REBUILD && !tgt.get_rebuild()) /* All targets that depend on to-be-built targets will be rebuilt - themselves, so we cn stop here. */ + themselves, so we cn stop here. */ return; TableRow row; @@ -63,7 +61,7 @@ void Analyzer::build_depend_table(Target &tgt, unsigned depth) if(full_paths) fn=tgt.get_name(); else - fn=Path::Path(tgt.get_name())[-1]; + fn=FS::basename(tgt.get_name()); row.push_back(string(depth*2, ' ')+fn); const Package *pkg=tgt.get_package(); @@ -94,9 +92,6 @@ void Analyzer::build_depend_table(Target &tgt, unsigned depth) } } -/** -Prints out the table that resulted from the analysis. -*/ void Analyzer::print_table() const { vector col_width;