diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-03-13 10:38:11 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-03-13 10:38:11 +0200 |
commit | 0cee33621a93d3348a1bf19a0c94441b717cbcbc (patch) | |
tree | 1f017e61794f705d9c0b872df108170cc4576b77 /build/b.cxx | |
parent | cf6b3e34b59ad120111e0c1ead779bbb3a70c38d (diff) |
Add postponed recipe execution support
Diffstat (limited to 'build/b.cxx')
-rw-r--r-- | build/b.cxx | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/build/b.cxx b/build/b.cxx index 0764622..5096bc2 100644 --- a/build/b.cxx +++ b/build/b.cxx @@ -480,7 +480,7 @@ main (int argc, char* argv[]) // Multiple targets in the same operation can be done in parallel. // - vector<reference_wrapper<target>> tgs; + vector<reference_wrapper<target>> tgs, psp; tgs.reserve (os.size ()); // First resolve and match all the targets. We don't want to @@ -531,11 +531,43 @@ main (int argc, char* argv[]) switch (execute (act, t)) { + case target_state::postponed: + { + info << "target " << t << " is postponed"; + psp.push_back (t); + break; + } + case target_state::unchanged: + { + info << "target " << t << " is up to date"; + break; + } + case target_state::changed: + break; + case target_state::failed: + //@@ This could probably happen in a parallel build. + default: + assert (false); + } + } + + // Re-examine postponed targets. + // + for (target& t: psp) + { + switch (t.state) + { + case target_state::postponed: + { + info << "target " << t << " unable to do at this time"; + break; + } case target_state::unchanged: { info << "target " << t << " is up to date"; break; } + case target_state::unknown: // Assume something was done to it. case target_state::changed: break; case target_state::failed: |