aboutsummaryrefslogtreecommitdiff
path: root/build2/context.txx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-10-13 18:20:35 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-04 08:12:47 +0200
commitae579402c8c64ea8ceea2e9fcee5097b3c53e353 (patch)
tree5933a00f434adab5583e81c147754d5d4dc69f12 /build2/context.txx
parent8d2e541ab1aa24140eb680fb046e49a4a3f0bbd2 (diff)
Minor dependency cleanup
Diffstat (limited to 'build2/context.txx')
-rw-r--r--build2/context.txx44
1 files changed, 0 insertions, 44 deletions
diff --git a/build2/context.txx b/build2/context.txx
deleted file mode 100644
index f40ecdc..0000000
--- a/build2/context.txx
+++ /dev/null
@@ -1,44 +0,0 @@
-// file : build2/context.txx -*- C++ -*-
-// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
-// license : MIT; see accompanying LICENSE file
-
-namespace build2
-{
- template <typename K>
- basic_path<char, K>
- relative (const basic_path<char, K>& p)
- {
- typedef basic_path<char, K> path;
-
- const dir_path& b (*relative_base);
-
- if (p.simple () || b.empty ())
- return p;
-
- if (p.sub (b))
- return p.leaf (b);
-
- // If base is a sub-path of {src,out}_root and this path is also a
- // sub-path of it, then use '..' to form a relative path.
- //
- // Don't think this is a good heuristic. For example, why shouldn't
- // we display paths from imported projects as relative if they are
- // more readable than absolute?
- //
- /*
- if ((work.sub (src_root) && p.sub (src_root)) ||
- (work.sub (out_root) && p.sub (out_root)))
- return p.relative (work);
- */
-
- if (p.root_directory () == b.root_directory ())
- {
- path r (p.relative (b));
-
- if (r.string ().size () < p.string ().size ())
- return r;
- }
-
- return p;
- }
-}