mirror of
https://github.com/mirror/make.git
synced 2024-12-26 12:50:20 +08:00
* src/function.c (func_let): Don't edit nonexistent values
* tests/scripts/functions/let: Test trailing whitespace in value list.
This commit is contained in:
parent
dd1980426e
commit
89bea82af3
@ -915,8 +915,6 @@ func_let (char *o, char **argv, const char *funcname UNUSED)
|
||||
const char *vp;
|
||||
const char *vp_next = varnames;
|
||||
const char *list_iterator = list;
|
||||
char *p;
|
||||
size_t len;
|
||||
size_t vlen;
|
||||
|
||||
push_new_variable_scope ();
|
||||
@ -926,8 +924,9 @@ func_let (char *o, char **argv, const char *funcname UNUSED)
|
||||
NEXT_TOKEN (vp_next);
|
||||
while (*vp_next != '\0')
|
||||
{
|
||||
p = find_next_token (&list_iterator, &len);
|
||||
if (*list_iterator != '\0')
|
||||
size_t len;
|
||||
char *p = find_next_token (&list_iterator, &len);
|
||||
if (p && *list_iterator != '\0')
|
||||
{
|
||||
++list_iterator;
|
||||
p[len] = '\0';
|
||||
|
@ -42,9 +42,10 @@ null =
|
||||
v = $(let ,$(info blankvar),abc)
|
||||
x = $(let $(null),$(info side-effect),abc)
|
||||
y = $(let y,,$ydef)
|
||||
z = $(let a b, ,+$a+$b+)
|
||||
|
||||
all: ; @echo $v/$x/$y',
|
||||
'', "blankvar\nside-effect\nabc/abc/def\n");
|
||||
all: ; @echo $v/$x/$y/$z',
|
||||
'', "blankvar\nside-effect\nabc/abc/def/+++\n");
|
||||
|
||||
# The example macro from the manual.
|
||||
run_make_test('
|
||||
|
Loading…
Reference in New Issue
Block a user