aboutsummaryrefslogtreecommitdiff
path: root/build/path
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-03-25 14:48:36 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-03-25 14:48:36 +0200
commitcd75e06a87aa74aa6968113107afa53d401d20bc (patch)
tree1e104829d10f375a783d6efbbf7eef3e2c6d2ef5 /build/path
parenta94dcda7f00b10cb22b5f2138b1c29bcfbe7de37 (diff)
Configure/disfigure src_root saving/removing support; fsdir{} injection
We can now build out-of-tree.
Diffstat (limited to 'build/path')
-rw-r--r--build/path15
1 files changed, 10 insertions, 5 deletions
diff --git a/build/path b/build/path
index 699882e..1a62287 100644
--- a/build/path
+++ b/build/path
@@ -257,13 +257,18 @@ namespace build
// Return true if *this is a sub-path of the specified path (i.e.,
// the specified path is a prefix). Expects both paths to be
// normalized. Note that this function returns true if the paths
- // are equal.
+ // are equal. Empty path is considered a prefix of any path.
//
bool
- sub (const basic_path& p) const
- {
- return path_.compare (0, p.path_.size (), p.path_) == 0;
- }
+ sub (const basic_path&) const;
+
+ // Return true if *this is a super-path of the specified path (i.e.,
+ // the specified path is a suffix). Expects both paths to be
+ // normalized. Note that this function returns true if the paths
+ // are equal. Empty path is considered a suffix of any path.
+ //
+ bool
+ sup (const basic_path&) const;
public:
// Return the path without the directory part.