aboutsummaryrefslogtreecommitdiff
path: root/build/target
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-11-30 18:17:45 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-11-30 18:17:45 +0200
commit4dabe6e1fb2ebf714582a50d582c1f9e2efc08a3 (patch)
tree376a64d61386c064cae3463e2f34eaf8efeef170 /build/target
parent6e18ee41d75f73e8ef62ea296a9a2cc5af45acea (diff)
Don't try to install targets from other projects
Diffstat (limited to 'build/target')
-rw-r--r--build/target11
1 files changed, 11 insertions, 0 deletions
diff --git a/build/target b/build/target
index d4a4bef..a866c98 100644
--- a/build/target
+++ b/build/target
@@ -205,6 +205,8 @@ namespace build
target_key
key () const {return target_key {&type (), &dir, &name, &ext};}
+ // Scoping.
+ //
public:
// Most qualified scope that contains this target.
//
@@ -225,6 +227,15 @@ namespace build
scope&
strong_scope () const {return *root_scope ().strong_scope ();}
+
+ bool
+ in (const scope& s) const
+ {
+ return
+ (s.out_path_ != nullptr && dir.sub (*s.out_path_)) ||
+ (s.src_path_ != nullptr && dir.sub (*s.src_path_));
+ }
+
// Prerequisites.
//
public: