aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/target18
-rw-r--r--build/target.cxx5
2 files changed, 8 insertions, 15 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);
diff --git a/build/target.cxx b/build/target.cxx
index 236b729..37cec8c 100644
--- a/build/target.cxx
+++ b/build/target.cxx
@@ -70,8 +70,7 @@ namespace build
// Also reset the target state. If this is a noop recipe, then
// mark the target unchanged so that we don't waste time executing
- // the recipe. If this is a group recipe, then mark the state as
- // coming from the group.
+ // the recipe.
//
raw_state = target_state::unknown;
@@ -79,8 +78,6 @@ namespace build
{
if (*f == &noop_action)
raw_state = target_state::unchanged;
- else if (*f == &group_action)
- raw_state = target_state::group;
}
// This one is tricky: we don't want to reset the dependents count