diff --git a/src/tools/jam/hcache.c b/src/tools/jam/hcache.c index 849b0e2c33..54a3bd8170 100644 --- a/src/tools/jam/hcache.c +++ b/src/tools/jam/hcache.c @@ -348,10 +348,16 @@ hcache (TARGET *t, LIST *hdrscan) { HCACHEDATA cachedata, *c = &cachedata; LIST *l = 0; + char _normalizedPath[PATH_MAX]; + char *normalizedPath = normalize_path(t->boundname, _normalizedPath, + sizeof(_normalizedPath)); ++queries; - c->boundname = t->boundname; + if (normalizedPath) + c->boundname = normalizedPath; + else + c->boundname = t->boundname; if (hashcheck (hcachehash, (HASHDATA **) &c)) { diff --git a/src/tools/jam/jcache.c b/src/tools/jam/jcache.c index de120a7720..5342b96256 100644 --- a/src/tools/jam/jcache.c +++ b/src/tools/jam/jcache.c @@ -338,7 +338,7 @@ find_jcache_entry(jamfile_cache* cache, char* filename) { jcache_entry _entry; jcache_entry* entry = &_entry; -entry->filename = filename; + entry->filename = filename; if (!hashcheck(cache->entries, (HASHDATA**)&entry)) entry = 0; return entry; @@ -624,12 +624,18 @@ jcache_done(void) contents of the specified file, or 0, if an error occured. */ char** -jcache(char *filename) +jcache(char *_filename) { char** strings = 0; jamfile_cache* cache = get_jcache(); - // get file time time_t time; + // normalize the filename + char _normalizedPath[PATH_MAX]; + char *filename = normalize_path(_filename, _normalizedPath, + sizeof(_normalizedPath)); + if (!filename) + filename = _filename; + // get file time if (!cache) return 0; if (file_time(filename, &time) == 0) {