char *path, *q;
p = x_strdup(p);
q = p;
- while ((path = strtok(q, ":"))) {
+ while ((path = strtok(q, PATH_DELIM))) {
cc_log("Hashing extra file %s", path);
hash_delimiter(hash, "extrafile");
if (!hash_file(hash, path)) {
*CCACHE_EXTRAFILES*::
- If you set the environment variable *CCACHE_EXTRAFILES* to a
- colon-separated list of paths then ccache will include the contents of
- those files when calculating the hash sum.
+ If you set the environment variable *CCACHE_EXTRAFILES* to a list of paths
+ then ccache will include the contents of those files when calculating the
+ hash sum. The list separator is semicolon in Windows systems and colon on
+ other systems.
*CCACHE_HARDLINK*::
checkstat 'cache miss' 1
testname="cache miss a b"
- CCACHE_EXTRAFILES="a:b" $CCACHE $COMPILER -c test.c
+ CCACHE_EXTRAFILES="a${PATH_DELIM}b" $CCACHE $COMPILER -c test.c
checkstat 'cache hit (preprocessed)' 1
checkstat 'cache miss' 2
testname="cache hit a b"
- CCACHE_EXTRAFILES="a:b" $CCACHE $COMPILER -c test.c
+ CCACHE_EXTRAFILES="a${PATH_DELIM}b" $CCACHE $COMPILER -c test.c
checkstat 'cache hit (preprocessed)' 2
checkstat 'cache miss' 2
testname="cache miss a b2"
echo b2 >b
- CCACHE_EXTRAFILES="a:b" $CCACHE $COMPILER -c test.c
+ CCACHE_EXTRAFILES="a${PATH_DELIM}b" $CCACHE $COMPILER -c test.c
checkstat 'cache hit (preprocessed)' 2
checkstat 'cache miss' 3
testname="cache hit a b2"
- CCACHE_EXTRAFILES="a:b" $CCACHE $COMPILER -c test.c
+ CCACHE_EXTRAFILES="a${PATH_DELIM}b" $CCACHE $COMPILER -c test.c
checkstat 'cache hit (preprocessed)' 3
checkstat 'cache miss' 3
case $host_os in
*MINGW*|*mingw*)
DEVNULL=NUL
+ PATH_DELIM=";"
;;
*)
DEVNULL=/dev/null
+ PATH_DELIM=":"
all_suites="$all_suites link basedir"
;;
esac