diff options
Diffstat (limited to 'src/ninja.cc')
-rw-r--r-- | src/ninja.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ninja.cc b/src/ninja.cc index 7d020db..c2426c4 100644 --- a/src/ninja.cc +++ b/src/ninja.cc @@ -39,6 +39,7 @@ #include "build_log.h" #include "clean.h" #include "edit_distance.h" +#include "explain.h" #include "graph.h" #include "graphviz.h" #include "metrics.h" @@ -567,12 +568,16 @@ int RunTool(const string& tool, Globals* globals, int argc, char** argv) { bool DebugEnable(const string& name, Globals* globals) { if (name == "list") { printf("debugging modes:\n" -" stats print operation counts/timing info\n"); -//"multiple modes can be enabled via -d FOO -d BAR\n"); +" stats print operation counts/timing info\n" +" explain explain what caused a command to execute\n" +"multiple modes can be enabled via -d FOO -d BAR\n"); return false; } else if (name == "stats") { g_metrics = new Metrics; return true; + } else if (name == "explain") { + g_explaining = true; + return true; } else { printf("ninja: unknown debug setting '%s'\n", name.c_str()); return false; |