From bd2d124f275cec912d33ec1463ba66e799518340 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 6 Oct 2009 12:36:29 +0000 Subject: Fix savannah bug 25780. Optimize things a bit. --- implicit.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'implicit.c') diff --git a/implicit.c b/implicit.c index 08e56bc..b4e843c 100644 --- a/implicit.c +++ b/implicit.c @@ -612,20 +612,19 @@ pattern_search (struct file *file, int archive, add_dir = 1; } - /* Initialize file variables if we haven't already + /* Initialize and set file variables if we haven't already done so. */ if (!file_vars_initialized) { initialize_file_variables (file, 0); + set_file_variables (file); file_vars_initialized = 1; } - - /* Set file variables. Note that we cannot do it once at the - beginning of the function because the stem value changes - for each rule. */ - if (!file_variables_set) + /* Update the stem value in $* for this rule. */ + else if (!file_variables_set) { - set_file_variables (file); + define_variable_for_file ( + "*", 1, file->stem, o_automatic, 0, file); file_variables_set = 1; } -- cgit v1.2.3