From 0fa1b933460236b6cd600728daae5796fd1ece80 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 7 Jan 2003 06:19:00 +0100 Subject: [PATCH] added CCACHE_HASHDIR option --- ccache.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ccache.c b/ccache.c index aa4720375..f55f74d0f 100644 --- a/ccache.c +++ b/ccache.c @@ -284,6 +284,15 @@ static void find_hash(ARGS *args) hash_int(st.st_size); hash_int(st.st_mtime); + /* possibly hash the current working directory */ + if (getenv("CCACHE_HASHDIR")) { + char *cwd = gnu_getcwd(); + if (cwd) { + hash_string(cwd); + free(cwd); + } + } + /* now the run */ x_asprintf(&path_stdout, "%s/tmp.stdout.%s.%s", cache_dir, tmp_string(), i_extension); -- 2.47.3