diff options
| author | Shinichiro Hamaji <shinichiro.hamaji@gmail.com> | 2016-09-20 12:49:16 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-09-20 12:49:15 +0900 |
| commit | fa58b6f65e84fea9a67a8c251f59435e242b1379 (patch) | |
| tree | 1b492b856aceb95330b50497d0ad8c57580ad449 | |
| parent | 6d3dd63e986e9b72cfc6b0184109fee0ecdcd583 (diff) | |
| parent | f6486ce40716ecb5ef30886b156d9f9bf0876a18 (diff) | |
Merge pull request #91 from danw/regen_debug
Add --regen_debug
| -rw-r--r-- | flags.cc | 3 | ||||
| -rw-r--r-- | flags.h | 1 | ||||
| -rw-r--r-- | regen.cc | 10 |
3 files changed, 9 insertions, 5 deletions
@@ -86,10 +86,13 @@ void Flags::Parse(int argc, char** argv) { } else if (!strcmp(arg, "--regen")) { // TODO: Make this default. regen = true; + } else if (!strcmp(arg, "--regen_debug")) { + regen_debug = true; } else if (!strcmp(arg, "--regen_ignoring_kati_binary")) { regen_ignoring_kati_binary = true; } else if (!strcmp(arg, "--dump_kati_stamp")) { dump_kati_stamp = true; + regen_debug = true; } else if (!strcmp(arg, "--detect_android_echo")) { detect_android_echo = true; } else if (!strcmp(arg, "--detect_depfiles")) { @@ -36,6 +36,7 @@ struct Flags { bool is_silent_mode; bool is_syntax_check_only; bool regen; + bool regen_debug; bool regen_ignoring_kati_binary; bool use_find_emulator; const char* goma_dir; @@ -132,7 +132,7 @@ class StampChecker { const string& stamp_filename = GetNinjaStampFilename(); FILE* fp = fopen(stamp_filename.c_str(), "rb"); if (!fp) { - if (g_flags.dump_kati_stamp) + if (g_flags.regen_debug) printf("%s: %s\n", stamp_filename.c_str(), strerror(errno)); return true; } @@ -145,7 +145,7 @@ class StampChecker { fprintf(stderr, "incomplete kati_stamp, regenerating...\n"); RETURN_TRUE; } - if (g_flags.dump_kati_stamp) + if (g_flags.regen_debug) printf("Generated time: %f\n", gen_time); string s, s2; @@ -163,7 +163,7 @@ class StampChecker { } } if (ShouldIgnoreDirty(s)) { - if (g_flags.dump_kati_stamp) + if (g_flags.regen_debug) printf("file %s: ignored (%f)\n", s.c_str(), ts); continue; } @@ -325,7 +325,7 @@ class StampChecker { bool CheckShellResult(const ShellResult* sr, string* err) { if (!ShouldRunCommand(sr)) { - if (g_flags.dump_kati_stamp) + if (g_flags.regen_debug) printf("shell %s: clean (no rerun)\n", sr->cmd.c_str()); return false; } @@ -351,7 +351,7 @@ class StampChecker { //*err += StringPrintf("%s => %s\n", expected.c_str(), result.c_str()); } return true; - } else if (g_flags.dump_kati_stamp) { + } else if (g_flags.regen_debug) { printf("shell %s: clean (rerun)\n", sr->cmd.c_str()); } return false; |
