diff options
author | Paul Smith <psmith@gnu.org> | 2002-09-17 21:52:45 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2002-09-17 21:52:45 +0000 |
commit | dac7b49de4b935db71d7b4257c6354f16fe41cfa (patch) | |
tree | f82cb34b108309d38903bd4d1695942e0b79e951 /read.c | |
parent | d7ebcadadbfc100af64cc4c18580a6373bd52738 (diff) | |
download | gunmake-dac7b49de4b935db71d7b4257c6354f16fe41cfa.tar.gz |
Fix bug #940 (from the Savannah bug tracker): make sure that target-
specific variables work correctly in conjunction with double-colon
targets.
Diffstat (limited to 'read.c')
-rw-r--r-- | read.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -1671,8 +1671,16 @@ record_target_var (filenames, defn, two_colon, origin, flocp) { struct file *f; - /* Get a file reference for this file, and initialize it. */ - f = enter_file (name); + /* Get a file reference for this file, and initialize it. + We don't want to just call enter_file() because that allocates a + new entry if the file is a double-colon, which we don't want in + this situation. */ + f = lookup_file (name); + if (!f) + f = enter_file (name); + else if (f->double_colon) + f = f->double_colon; + initialize_file_variables (f, 1); vlist = f->variables; fname = f->name; |