]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Use colon instead of whitespace as CCACHE_EXTRAFILES separator
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 9 May 2010 19:20:41 +0000 (21:20 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 9 May 2010 19:20:41 +0000 (21:20 +0200)
ccache.c
manual.txt
test.sh

index 1c25f72479c3108d3e6e619b75446f7f46d6dc1c..7b41f750169cdd60046b1ab3ac78ac1a2bd876be 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -820,7 +820,7 @@ static void calculate_common_hash(ARGS *args, struct mdfour *hash)
                char *path, *q;
                p = x_strdup(p);
                q = p;
-               while ((path = strtok(q, " \t\r\n"))) {
+               while ((path = strtok(q, ":"))) {
                        cc_log("Hashing extra file %s", path);
                        hash_delimiter(hash, "extrafile");
                        if (!hash_file(hash, path)) {
index e88107839f8d3fe781645d1e727de9d2cb597ead..e116863eeae5949d2de8ad26f745a1a5c0d7e049 100644 (file)
@@ -227,7 +227,7 @@ cases you won't need any of these as the defaults will be fine.
 *CCACHE_EXTRAFILES*::
 
     If you set the environment variable *CCACHE_EXTRAFILES* to a
-    space-separated list of paths then ccache will include the contents of
+    colon-separated list of paths then ccache will include the contents of
     those files when calculating the hash sum.
 
 *CCACHE_HARDLINK*::
diff --git a/test.sh b/test.sh
index 933f4e00d2b390d7be3551d8085e42d31679df9f..067a1b15d42f422289b94b9baf23593eacb69782 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -1119,23 +1119,23 @@ EOF
     checkstat 'cache miss' 1
 
     testname="cache miss a b"
-    CCACHE_EXTRAFILES="a b" $CCACHE $COMPILER -c test.c
+    CCACHE_EXTRAFILES="a: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: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: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:b" $CCACHE $COMPILER -c test.c
     checkstat 'cache hit (preprocessed)' 3
     checkstat 'cache miss' 3