From: Roland McGrath Date: Tue, 22 Dec 1992 22:16:14 +0000 (+0000) Subject: Formerly variable.c.~14~ X-Git-Tag: 3.70.2~506 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01e07f8ae2b4118368aead169a551b72cc8c73f6;p=thirdparty%2Fmake.git Formerly variable.c.~14~ --- diff --git a/variable.c b/variable.c index 60daf81b..181b76d3 100644 --- a/variable.c +++ b/variable.c @@ -490,7 +490,11 @@ target_environment (file) for (b = table[i]; b != 0; b = b->next) { register struct variable *v = b->variable; - result[nvariables++] = concat (v->name, "=", v->value); + /* If V is recursively expanded, expand its value. */ + char *value = v->recursive ? recursively_expand (v) : v->value; + result[nvariables++] = concat (v->name, "=", value); + if (v->recursive) + free (value); } } result[nvariables] = (char *) xmalloc (100);