aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build2/prerequisite6
-rw-r--r--build2/target3
2 files changed, 8 insertions, 1 deletions
diff --git a/build2/prerequisite b/build2/prerequisite
index 345c84f..6ea7fe0 100644
--- a/build2/prerequisite
+++ b/build2/prerequisite
@@ -70,7 +70,7 @@ namespace build2
target (nullptr) {}
public:
- const std::string* proj; // NULL if not project-qualified.
+ const std::string* const proj; // NULL if not project-qualified.
const target_type_type& type;
const dir_path dir; // Normalized absolute or relative (to scope).
const std::string name;
@@ -79,6 +79,10 @@ namespace build2
target_type* target; // NULL if not yet resolved. Note that this should
// always be the "primary target", not a member of
// a target group.
+
+ // Note that the returned key "tracks" the prerequisite; that is, any
+ // updates to the prerequisite's members will be reflected in the key.
+ //
prerequisite_key
key () const
{
diff --git a/build2/target b/build2/target
index 2f4479b..429df71 100644
--- a/build2/target
+++ b/build2/target
@@ -204,6 +204,9 @@ namespace build2
virtual group_view
group_members (action_type) const;
+ // Note that the returned key "tracks" the target; that is, any updates
+ // to the targets's members will be reflected in the key.
+ //
target_key
key () const {return target_key {&type (), &dir, &name, &ext};}