aboutsummaryrefslogtreecommitdiff
path: root/build/target
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-08-14 16:58:20 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-08-14 16:58:20 +0200
commit040ebadfa9e606b56005b80571e7fc714a3f1f2c (patch)
tree8b12a8a44273ec7424c20ade97125b87b2dc9ada /build/target
parent47bf5cd6a167730ee06a1c7cffeae6540f67dde0 (diff)
Don't short-cut to group_state if recipe is group_recipe
This way we mess up the dependents count.
Diffstat (limited to 'build/target')
-rw-r--r--build/target18
1 files changed, 7 insertions, 11 deletions
diff --git a/build/target b/build/target
index 35b013a..9e15550 100644
--- a/build/target
+++ b/build/target
@@ -81,12 +81,12 @@ namespace build
using recipe_function = target_state (action, target&);
using recipe = std::function<recipe_function>;
- // Commonly-used recipes. The default recipe executes the action
- // on all the prerequisites in a loop, skipping ignored. Specially,
+ // Commonly-used recipes. The default recipe executes the action on
+ // all the prerequisites in a loop, skipping ignored. Specifically,
// for actions with the "first" execution mode, it calls
// execute_prerequisites() while for those with the "last" mode --
// reverse_execute_prerequisites(); see <build/operation>,
- // <build/algorithm> for details. The group recipe calls the group's
+ // <build/algorithm> for details. The group recipe call's the group's
// recipe.
//
extern const recipe empty_recipe;
@@ -780,12 +780,10 @@ namespace build
public:
using target::target;
- // Target mtime is only available after a rule has been matched
- // (because this is when we know if we should get our mtime from
- // the group and where the path which we need to load mtime is
- // normally assigned). The mtime is also unavailable while the
- // execution of the target is postponed (because we temporarily
- // loose our group state).
+ // Generally, modification time for a target can only be queried
+ // after a rule has been matched since that's where the path is
+ // normally gets assigned. Normally, however, it would make sense
+ // to first execute the rule to get the "updated" timestamp.
//
// The rule for groups that utilize the group state is as follows:
// if it has any members that are mtime_targets, then the group
@@ -794,8 +792,6 @@ namespace build
timestamp
mtime () const
{
- assert (raw_state != target_state::postponed);
-
const mtime_target* t (raw_state == target_state::group
? static_cast<const mtime_target*> (group)
: this);