diff options
author | Paul Smith <psmith@gnu.org> | 2006-02-20 02:14:00 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2006-02-20 02:14:00 +0000 |
commit | 6e0527913c6724fa92e2135de991e27df54c4289 (patch) | |
tree | c9e4c448ae4476e5ef81ca5a5ca8feb344e519c7 /expand.c | |
parent | bde826b18aeb6fd3c9de7a7733d1e163efde90e1 (diff) | |
download | gunmake-6e0527913c6724fa92e2135de991e27df54c4289.tar.gz |
- 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.
Diffstat (limited to 'expand.c')
-rw-r--r-- | expand.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -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); |