diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-12-03 14:52:19 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-12-03 16:48:07 +0200 |
commit | 35b736a6067ee76d86b9c2421305319a85ae19b1 (patch) | |
tree | dbd8f8ad817a98f2a439c0196da9bd3b7f46a92e /libbuild2/functions-name.cxx | |
parent | b259a318223370881d5244cc38ff8a7be58e2a3e (diff) |
Support dir{}/fsdir{} idiosyncrasies in $name.*() function family
Diffstat (limited to 'libbuild2/functions-name.cxx')
-rw-r--r-- | libbuild2/functions-name.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libbuild2/functions-name.cxx b/libbuild2/functions-name.cxx index c11b4b5..17a8adb 100644 --- a/libbuild2/functions-name.cxx +++ b/libbuild2/functions-name.cxx @@ -39,6 +39,12 @@ namespace build2 if (rp.first != nullptr) n.type = rp.first->name; + if (n.value.empty () && (n.type == "dir" || n.type == "fsdir")) + { + n.value = n.dir.leaf ().string (); + n.dir.make_directory (); + } + return make_pair (move (n), move (rp.second)); } |