+2006-03-22 Boris Kolpackov <boris@kolpackov.net>
+
+ * implicit.c (pattern_search): Call set_file_variables only
+ if we have prerequisites that need second expansion. Fixes
+ Savannah bug #16140.
+
2006-03-19 Paul D. Smith <psmith@gnu.org>
* remake.c (update_file): Add alloca(0) to clean up alloca'd
struct file *f;
unsigned int failed = 0;
int check_lastslash;
+ int file_variables_set = 0;
rule = tryrules[i];
strncpy (stem_str, stem, stemlen);
stem_str[stemlen] = '\0';
- /* Temporary assign STEM to file->stem and set file variables. */
+ /* Temporary assign STEM to file->stem (needed to set file
+ variables below). */
file->stem = stem_str;
- set_file_variables (file);
/* Try each dependency; see if it "exists". */
depname[len] = '\0';
}
+ /* Set file variables. Note that we cannot do it once
+ at the beginning of the function because of the stem
+ value. */
+ if (!file_variables_set)
+ {
+ set_file_variables (file);
+ file_variables_set = 1;
+ }
+
p2 = variable_expand_for_file (depname, file);
}
else