summaryrefslogtreecommitdiff
path: root/implicit.c
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@kolpackov.net>2009-10-06 12:36:29 +0000
committerBoris Kolpackov <boris@kolpackov.net>2009-10-06 12:36:29 +0000
commitbd2d124f275cec912d33ec1463ba66e799518340 (patch)
tree001ad6cbe5778e036c188bc67008efa2bf182af5 /implicit.c
parent4254e88cfa7704ea4a55d94a9aee5b19b081b3db (diff)
downloadgunmake-bd2d124f275cec912d33ec1463ba66e799518340.tar.gz
Fix savannah bug 25780. Optimize things a bit.
Diffstat (limited to 'implicit.c')
-rw-r--r--implicit.c13
1 files changed, 6 insertions, 7 deletions
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;
}