From 35b736a6067ee76d86b9c2421305319a85ae19b1 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 3 Dec 2023 14:52:19 +0200 Subject: Support dir{}/fsdir{} idiosyncrasies in $name.*() function family --- libbuild2/functions-name.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libbuild2/functions-name.cxx') 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)); } -- cgit v1.1