aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/functions-process.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-05-26 21:35:59 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-06-03 12:26:33 +0300
commit920ed11a433b0e292a18adb8c68829a00e8c70cc (patch)
treee365baf8be68b168e19f42f20c5dde1526c1cbba /libbuild2/functions-process.cxx
parent4001ff053071c09008e88312c4f973c417322a07 (diff)
Allow process path values and targets as buildscript program names
Also deduce the recipe name.
Diffstat (limited to 'libbuild2/functions-process.cxx')
-rw-r--r--libbuild2/functions-process.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/libbuild2/functions-process.cxx b/libbuild2/functions-process.cxx
index 3fa7819..e6c0582 100644
--- a/libbuild2/functions-process.cxx
+++ b/libbuild2/functions-process.cxx
@@ -93,8 +93,8 @@ namespace build2
return value (move (r));
}
- // Return the builtin function pointer if this is a call to a builtin and
- // NULL otherwise.
+ // Return the builtin function pointer if this is a call to an internal
+ // builtin and NULL otherwise.
//
static builtin_function*
builtin (const names& args)
@@ -106,7 +106,8 @@ namespace build2
if (!nm.simple () || nm.pair)
return nullptr;
- return builtins.find (nm.value);
+ const builtin_info* r (builtins.find (nm.value));
+ return r != nullptr ? r->function : nullptr;
}
// Return the builtin name and its arguments. The builtin function is only