projects
/
platform
/
upstream
/
ninja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2eb1cc9
)
Do not attempt to rebuild infinitely in dry-run mode.
author
Nicolas Despres
<nicolas.despres@gmail.com>
Wed, 9 Dec 2015 22:18:18 +0000
(23:18 +0100)
committer
Nicolas Despres
<nicolas.despres@gmail.com>
Wed, 9 Dec 2015 22:18:18 +0000
(23:18 +0100)
src/ninja.cc
patch
|
blob
|
history
diff --git
a/src/ninja.cc
b/src/ninja.cc
index
21dede6
..
a73f83c
100644
(file)
--- a/
src/ninja.cc
+++ b/
src/ninja.cc
@@
-1135,6
+1135,10
@@
int real_main(int argc, char** argv) {
// Attempt to rebuild the manifest before building anything else
if (ninja.RebuildManifest(options.input_file, &err)) {
+ // In dry_run mode the regeneration will succeed without changing the
+ // manifest forever. Better to return immediately.
+ if (config.dry_run)
+ return 0;
// Start the build over with the new manifest.
continue;
} else if (!err.empty()) {