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
commit4d2adf711eba330c7151b663240e55f5dd05cbc0 (patch)
tree001ad6cbe5778e036c188bc67008efa2bf182af5 /implicit.c
parentc3b91d2c427a9f3823a1a6e9dec263d8fef14c9d (diff)
downloadmake-4d2adf711eba330c7151b663240e55f5dd05cbc0.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 08e56bce..b4e843cb 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;
}