aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/scope.ixx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/scope.ixx')
-rw-r--r--libbuild2/scope.ixx23
1 files changed, 22 insertions, 1 deletions
diff --git a/libbuild2/scope.ixx b/libbuild2/scope.ixx
index f13aa70..9aecd48 100644
--- a/libbuild2/scope.ixx
+++ b/libbuild2/scope.ixx
@@ -55,7 +55,28 @@ namespace build2
find_target_key (name& n, name& o, const location& loc) const
{
auto p (find_target_type (n, o, loc));
- return target_key {&p.first, &n.dir, &o.dir, &n.value, move (p.second)};
+ return target_key {
+ &p.first,
+ &n.dir,
+ o.dir.empty () ? &empty_dir_path : &o.dir,
+ &n.value,
+ move (p.second)};
+ }
+
+ inline prerequisite_key scope::
+ find_prerequisite_key (name& n, name& o, const location& loc) const
+ {
+ auto p (find_prerequisite_type (n, o, loc));
+ return prerequisite_key {
+ n.proj,
+ {
+ &p.first,
+ &n.dir,
+ o.dir.empty () ? &empty_dir_path : &o.dir,
+ &n.value,
+ move (p.second)
+ },
+ this};
}
inline dir_path