Skip to content

Instantly share code, notes, and snippets.

@doctorlove
Created January 11, 2012 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doctorlove/1595646 to your computer and use it in GitHub Desktop.
Save doctorlove/1595646 to your computer and use it in GitHub Desktop.
diff -u -r -P ./mainline/src/build.cc ./patched/src/build.cc
--- ./mainline/src/build.cc 2011-11-14 09:34:51.415514600 +0000
+++ ./patched/src/build.cc 2011-11-14 09:33:40.936364600 +0000
@@ -620,7 +620,7 @@
for (vector<Node*>::iterator i = edge->outputs_.begin();
i != edge->outputs_.end(); ++i) {
TimeStamp new_mtime = disk_interface_->Stat((*i)->path());
- if ((*i)->mtime() == new_mtime) {
+ if ((*i)->mtime() == new_mtime && !config_.dry_run) {
// The rule command did not change the output. Propagate the clean
// state through the build graph.
// Note that this also applies to nonexistent outputs (mtime == 0).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment