Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 17th, 2012  |  syntax: None  |  size: 1.41 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. diff -u -r -P ./patched/src/build.cc ./patched/src/build.cc
  2. --- ./mainline/src/build.cc     2011-12-01 11:25:25.000000000 +0000
  3. +++ ./patched/src/build.cc      2011-12-01 11:24:17.000000000 +0000
  4. @@ -32,6 +32,7 @@
  5.  #include "state.h"
  6.  #include "subprocess.h"
  7.  #include "util.h"
  8. +#include <time.h>
  9.  
  10.  /// Tracks the status of a build: completion fraction, printing updates.
  11.  struct BuildStatus {
  12. @@ -614,26 +615,7 @@
  13.        }
  14.  
  15.        if (node_cleaned) {
  16. -        // If any output was cleaned, find the most recent mtime of any
  17. -        // (existing) non-order-only input or the depfile.
  18. -        for (vector<Node*>::iterator i = edge->inputs_.begin();
  19. -             i != edge->inputs_.end() - edge->order_only_deps_; ++i) {
  20. -          time_t input_mtime = disk_interface_->Stat((*i)->path());
  21. -          if (input_mtime == 0) {
  22. -            restat_mtime = 0;
  23. -            break;
  24. -          }
  25. -          if (input_mtime > restat_mtime)
  26. -            restat_mtime = input_mtime;
  27. -        }
  28. -
  29. -        if (restat_mtime != 0 && !edge->rule().depfile().empty()) {
  30. -          time_t depfile_mtime = disk_interface_->Stat(edge->EvaluateDepFile());
  31. -          if (depfile_mtime == 0)
  32. -            restat_mtime = 0;
  33. -          else if (depfile_mtime > restat_mtime)
  34. -            restat_mtime = depfile_mtime;
  35. -        }
  36. +        restat_mtime = time(NULL);
  37.  
  38.          // The total number of edges in the plan may have changed as a result
  39.          // of a restat.