diff options
Diffstat (limited to 'build2/utility.cxx')
-rw-r--r-- | build2/utility.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/build2/utility.cxx b/build2/utility.cxx index 2b3f785..f2d9155 100644 --- a/build2/utility.cxx +++ b/build2/utility.cxx @@ -10,6 +10,7 @@ #include <cstdlib> // strtol() #include <iostream> // cerr +#include <build2/target.hxx> #include <build2/variable.hxx> #include <build2/diagnostics.hxx> @@ -125,6 +126,14 @@ namespace build2 dir_path home; const dir_path* relative_base = &work; + path + relative (const path_target& t) + { + const path& p (t.path ()); + assert (!p.empty ()); + return relative (p); + } + string diag_relative (const path& p, bool cur) { |