From 920ed11a433b0e292a18adb8c68829a00e8c70cc Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 26 May 2020 21:35:59 +0300 Subject: Allow process path values and targets as buildscript program names Also deduce the recipe name. --- libbuild2/functions-process.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libbuild2/functions-process.cxx') 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 -- cgit v1.1