aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/install
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-12-08 13:41:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-12-08 13:41:06 +0200
commit138ca40c2187ab4d1f11747555d9878cf3422496 (patch)
tree9e88d2b75d68745b7a8af6300bbc8deeb19d6dd2 /libbuild2/install
parentf7600f07eecbdac0a4400ca2bc39e3e9f5a53b1b (diff)
Normalize extracted header/library search directories (GH issue #235)
Diffstat (limited to 'libbuild2/install')
-rw-r--r--libbuild2/install/functions.cxx5
-rw-r--r--libbuild2/install/rule.cxx8
-rw-r--r--libbuild2/install/utility.hxx7
3 files changed, 12 insertions, 8 deletions
diff --git a/libbuild2/install/functions.cxx b/libbuild2/install/functions.cxx
index 5668efe..c36a46e 100644
--- a/libbuild2/install/functions.cxx
+++ b/libbuild2/install/functions.cxx
@@ -15,8 +15,9 @@ namespace build2
{
function_family f (m, "install");
- // Resolve potentially relative install.* value to an absolute directory
- // based on (other) install.* values visible from the calling scope.
+ // Resolve potentially relative install.* value to an absolute and
+ // normalized directory based on (other) install.* values visible from
+ // the calling scope.
//
// Note that this function is not pure.
//
diff --git a/libbuild2/install/rule.cxx b/libbuild2/install/rule.cxx
index 8818ea3..5ff4703 100644
--- a/libbuild2/install/rule.cxx
+++ b/libbuild2/install/rule.cxx
@@ -553,7 +553,8 @@ namespace build2
const dir_path& d (t.out_dir ().leaf (p->out_path ()));
// Add it as another leading directory rather than modifying
- // the last one directly; somehow, it feels right.
+ // the last one directly; somehow, it feels right. Note: the
+ // result is normalized.
//
if (!d.empty ())
rs.emplace_back (rs.back ().dir / d, rs.back ());
@@ -564,8 +565,9 @@ namespace build2
return rs.back ();
}
- // Resolve installation directory name to absolute directory path. Return
- // all the super-directories leading up to the destination (last).
+ // Resolve installation directory name to absolute and normalized
+ // directory path. Return all the super-directories leading up to the
+ // destination (last).
//
// If target is not NULL, then also handle the subdirs logic.
//
diff --git a/libbuild2/install/utility.hxx b/libbuild2/install/utility.hxx
index 3e2dcad..530a9d7 100644
--- a/libbuild2/install/utility.hxx
+++ b/libbuild2/install/utility.hxx
@@ -69,9 +69,10 @@ namespace build2
install_scope (const target&);
// Resolve relative installation directory path (e.g., include/libfoo) to
- // its absolute directory path (e.g., /usr/include/libfoo). If the
- // resolution encountered an unknown directory, issue diagnostics and fail
- // unless fail_unknown is false, in which case return empty directory.
+ // its absolute and normalized directory path (e.g., /usr/include/libfoo).
+ // If the resolution encountered an unknown directory, issue diagnostics
+ // and fail unless fail_unknown is false, in which case return empty
+ // directory.
//
// Note: implemented in rule.cxx.
//