aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/target.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/target.cxx')
-rw-r--r--libbuild2/target.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/libbuild2/target.cxx b/libbuild2/target.cxx
index 22f5e66..e4218ed 100644
--- a/libbuild2/target.cxx
+++ b/libbuild2/target.cxx
@@ -659,7 +659,7 @@ namespace build2
}
const path& path_target::
- derive_path (const char* de, const char* np, const char* ns)
+ derive_path (const char* de, const char* np, const char* ns, const char* ee)
{
path_type p (dir);
@@ -674,11 +674,11 @@ namespace build2
if (ns != nullptr)
p += ns;
- return derive_path (move (p), de);
+ return derive_path (move (p), de, ee);
}
const path& path_target::
- derive_path (path_type p, const char* de)
+ derive_path (path_type p, const char* de, const char* ee)
{
// Derive and add the extension if any.
//
@@ -692,6 +692,12 @@ namespace build2
}
}
+ if (ee != nullptr)
+ {
+ p += '.';
+ p += ee;
+ }
+
path (move (p));
return path_;
}