summaryrefslogtreecommitdiff
path: root/read.c
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@kolpackov.net>2004-10-05 16:56:14 +0000
committerBoris Kolpackov <boris@kolpackov.net>2004-10-05 16:56:14 +0000
commitb0d67e0e15490e43bbc074ec50618488c206399b (patch)
tree68ffc649b47bf74c8a738bca4872136839b1d0a5 /read.c
parentfb6410f43583a9e0b457d675e1bc2d1ed5ba279b (diff)
downloadgunmake-b0d67e0e15490e43bbc074ec50618488c206399b.tar.gz
Moved expansion of simple pattern-specific variables from the rebuild stage
to the read stage.
Diffstat (limited to 'read.c')
-rw-r--r--read.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/read.c b/read.c
index 3704836..291c691 100644
--- a/read.c
+++ b/read.c
@@ -1675,7 +1675,12 @@ record_target_var (struct nameseq *filenames, char *defn,
variable definition. */
v = parse_variable_definition (&p->variable, defn);
assert (v != 0);
- v->value = xstrdup (v->value);
+
+ if (v->flavor == f_simple)
+ v->value = allocated_variable_expand (v->value);
+ else
+ v->value = xstrdup (v->value);
+
fname = p->target;
}
else