aboutsummaryrefslogtreecommitdiff
path: root/build2/target
diff options
context:
space:
mode:
Diffstat (limited to 'build2/target')
-rw-r--r--build2/target13
1 files changed, 13 insertions, 0 deletions
diff --git a/build2/target b/build2/target
index 1a1fd8d..4316ff6 100644
--- a/build2/target
+++ b/build2/target
@@ -824,6 +824,7 @@ namespace build2
//
struct prerequisite_member
{
+ using scope_type = build2::scope;
using target_type = build2::target;
using prerequisite_type = build2::prerequisite;
using target_type_type = build2::target_type;
@@ -866,6 +867,12 @@ namespace build2
return target != nullptr ? target->name : prerequisite.name;
}
+ const dir_path&
+ dir () const
+ {
+ return target != nullptr ? target->dir : prerequisite.dir;
+ }
+
const optional<string>&
proj () const
{
@@ -876,6 +883,12 @@ namespace build2
: prerequisite.proj;
}
+ const scope_type&
+ scope () const
+ {
+ return target != nullptr ? target->base_scope () : prerequisite.scope;
+ }
+
const target_type&
search (const target_type& t) const
{