From dac7b49de4b935db71d7b4257c6354f16fe41cfa Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Tue, 17 Sep 2002 21:52:45 +0000 Subject: Fix bug #940 (from the Savannah bug tracker): make sure that target- specific variables work correctly in conjunction with double-colon targets. --- read.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'read.c') diff --git a/read.c b/read.c index dd930f7..3488524 100644 --- a/read.c +++ b/read.c @@ -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; -- cgit v1.2.3