summaryrefslogtreecommitdiff
path: root/variable.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 /variable.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 'variable.c')
-rw-r--r--variable.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/variable.c b/variable.c
index f6cca0d..31b84a4 100644
--- a/variable.c
+++ b/variable.c
@@ -495,10 +495,25 @@ initialize_file_variables (struct file *file, int reading)
do
{
/* We found one, so insert it into the set. */
- struct variable *v = do_variable_definition (
- &p->variable.fileinfo, p->variable.name,
- p->variable.value, p->variable.origin,
- p->variable.flavor, 1);
+
+ struct variable *v;
+
+ if (p->variable.flavor == f_simple)
+ {
+ v = define_variable_loc (
+ p->variable.name, strlen (p->variable.name),
+ p->variable.value, p->variable.origin,
+ 0, &p->variable.fileinfo);
+
+ v->flavor = f_simple;
+ }
+ else
+ {
+ v = do_variable_definition (
+ &p->variable.fileinfo, p->variable.name,
+ p->variable.value, p->variable.origin,
+ p->variable.flavor, 1);
+ }
/* Also mark it as a per-target and copy export status. */
v->per_target = p->variable.per_target;