From cd75e06a87aa74aa6968113107afa53d401d20bc Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 25 Mar 2015 14:48:36 +0200 Subject: Configure/disfigure src_root saving/removing support; fsdir{} injection We can now build out-of-tree. --- build/path | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'build/path') 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. -- cgit v1.1