aboutsummaryrefslogtreecommitdiff
path: root/build2/cli
diff options
context:
space:
mode:
Diffstat (limited to 'build2/cli')
-rw-r--r--build2/cli/rule.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/build2/cli/rule.cxx b/build2/cli/rule.cxx
index 5b78723..b97bea2 100644
--- a/build2/cli/rule.cxx
+++ b/build2/cli/rule.cxx
@@ -231,12 +231,18 @@ namespace build2
{
cli_cxx& t (static_cast<cli_cxx&> (xt));
- // Execute our prerequsites and check if we are out of date.
+ // Update prerequisites and determine if any relevant ones render us
+ // out-of-date. Note that currently we treat all the prerequisites
+ // as potentially affecting the result (think prologues/epilogues,
+ // etc).
//
- cli* s (execute_prerequisites<cli> (a, t, t.mtime ()));
+ cli* s;
+ {
+ auto p (execute_prerequisites<cli> (a, t, t.mtime ()));
- if (s == nullptr)
- return target_state::unchanged;
+ if ((s = p.first) == nullptr)
+ return p.second;
+ }
// Translate paths to relative (to working directory). This
// results in easier to read diagnostics.