diff options
author | Paul Smith <psmith@gnu.org> | 1999-08-22 17:50:57 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 1999-08-22 17:50:57 +0000 |
commit | 6fa76a7d153a9ec19d0f19dd19f6d456e044fcbe (patch) | |
tree | e968d88c7860b87a674111d68a932c1ff119a9ff /variable.c | |
parent | 4ff6c6245665ba7b611bd1f3ee2f5141895d9d69 (diff) | |
download | gunmake-6fa76a7d153a9ec19d0f19dd19f6d456e044fcbe.tar.gz |
* Various changes.
Diffstat (limited to 'variable.c')
-rw-r--r-- | variable.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -780,9 +780,9 @@ try_variable_definition (flocp, line, origin) case f_simple: /* A simple variable definition "var := value". Expand the value. We have to allocate memory since otherwise it'll clobber the - variable buffer, and we still need that. */ - alloc_value = allocated_variable_expand (p); - value = alloc_value; + variable buffer, and we may still need that if we're looking at a + target-specific variable. */ + value = alloc_value = allocated_variable_expand (p); break; case f_conditional: /* A conditional variable definition "var ?= value". @@ -824,8 +824,10 @@ try_variable_definition (flocp, line, origin) else /* The previous definition of the variable was simple. The new value comes from the old value, which was expanded - when it was set; and from the expanded new value. */ - p = variable_expand (p); + when it was set; and from the expanded new value. Allocate + memory for the expansion as we may still need the rest of the + buffer if we're looking at a target-specific variable. */ + p = alloc_value = allocated_variable_expand (p); oldlen = strlen (v->value); newlen = strlen (p); |