diff options
author | Boris Kolpackov <boris@kolpackov.net> | 2006-03-22 13:16:03 +0000 |
---|---|---|
committer | Boris Kolpackov <boris@kolpackov.net> | 2006-03-22 13:16:03 +0000 |
commit | 367a49591e2b2335f3f5b42e290651d4df77e933 (patch) | |
tree | dba8cdac6ca0801de3350dbfe25e4ff045afa2ff /implicit.c | |
parent | 94aead216efa169f7d4dbb269188fd91c88c8bdd (diff) | |
download | gunmake-367a49591e2b2335f3f5b42e290651d4df77e933.tar.gz |
Fixed Savannah bug #16140.
Diffstat (limited to 'implicit.c')
-rw-r--r-- | implicit.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -442,6 +442,7 @@ pattern_search (struct file *file, int archive, struct file *f; unsigned int failed = 0; int check_lastslash; + int file_variables_set = 0; rule = tryrules[i]; @@ -479,9 +480,9 @@ pattern_search (struct file *file, int archive, 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". */ @@ -550,6 +551,15 @@ pattern_search (struct file *file, int archive, 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 |