aboutsummaryrefslogtreecommitdiff
path: root/libbuild2
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2')
-rw-r--r--libbuild2/file.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/libbuild2/file.cxx b/libbuild2/file.cxx
index 33f380d..88f1a9b 100644
--- a/libbuild2/file.cxx
+++ b/libbuild2/file.cxx
@@ -2726,6 +2726,9 @@ namespace build2
{
name n;
+ if (src_root.empty ())
+ src_root = root->src_path ();
+
n.dir = move (src_root);
n.dir /= *altn ? alt_export_dir : std_export_dir;
if (!tgt.dir.empty ())
@@ -2778,6 +2781,9 @@ namespace build2
if (cache_out_root.empty ())
cache_out_root = out_root;
+ if (src_root.empty ())
+ src_root = root->src_path ();
+
ts.assign (ctx.var_out_root) = move (out_root);
ts.assign (ctx.var_src_root) = move (src_root);