From 6e0527913c6724fa92e2135de991e27df54c4289 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Mon, 20 Feb 2006 02:14:00 +0000 Subject: - Memory cleanups, found with valgrind. - Fix handling of special targets like .SUFFIX for VMS insensitive targets. - Don't make temporary batch files for -n. Make sure batch files are created in text mode. --- expand.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'expand.c') diff --git a/expand.c b/expand.c index d25afef..39f0d19 100644 --- a/expand.c +++ b/expand.c @@ -113,11 +113,18 @@ recursively_expand_for_file (struct variable *v, struct file *file) expanding_var = &this_var; } + /* If we have no other file-reading context, use the variable's context. */ + if (!reading_file) + { + set_reading = 1; + reading_file = &v->fileinfo; + } + if (v->expanding) { if (!v->exp_count) /* Expanding V causes infinite recursion. Lose. */ - fatal (this_var, + fatal (*expanding_var, _("Recursive variable `%s' references itself (eventually)"), v->name); --v->exp_count; @@ -129,13 +136,6 @@ recursively_expand_for_file (struct variable *v, struct file *file) current_variable_set_list = file->variables; } - /* If we have no other file-reading context, use the variable's context. */ - if (!reading_file) - { - set_reading = 1; - reading_file = this_var; - } - v->expanding = 1; if (v->append) value = allocated_variable_append (v); -- cgit v1.2.3