]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Improve incorrect documentation on what cache_dir does
authorJoel Rosdahl <joel@rosdahl.net>
Tue, 8 Dec 2020 20:19:19 +0000 (21:19 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 8 Dec 2020 20:32:36 +0000 (21:32 +0100)
The manual says that cache_dir only takes effect if set by $CCACHE_DIR
or by cache_dir in the secondary (system-wide) configuration file, which
is incorrect. It’s kind of correct for how the primary configuration
file is found, though.

doc/MANUAL.adoc

index 46e0e4ed77084554e3e961e9cf7fc3bb02c19659..062f041c55b07183228217de15eeba6e8e5c311f 100644 (file)
@@ -268,13 +268,15 @@ The location of the primary (cache-specific) configuration is determined like
 this:
 
 1. If *CCACHE_CONFIGPATH* is set, use that path.
-2. Otherwise, if <<config_cache_dir,*cache_dir*>> (*CCACHE_DIR*) is set then
-   use *<ccache_dir>/ccache.conf*.
-3. Otherwise, if there is a legacy *$HOME/.ccache* directory then use
+2. Otherwise, if the environment variable *CCACHE_DIR* is set then use
+   *$CCACHE_DIR/ccache.conf*.
+3. Otherwise, if <<config_cache_dir,*cache_dir*>> is set in the secondary
+   (system-wide) configuration file then use *<cache_dir>/ccache.conf*.
+4. Otherwise, if there is a legacy *$HOME/.ccache* directory then use
    *$HOME/.ccache/ccache.conf*.
-4. Otherwise, if *XDG_CONFIG_HOME* is set then use
+5. Otherwise, if *XDG_CONFIG_HOME* is set then use
    *$XDG_CONFIG_HOME/ccache/ccache.conf*.
-5. Otherwise, use *%APPDATA%/ccache/ccache.conf* (Windows),
+6. Otherwise, use *%APPDATA%/ccache/ccache.conf* (Windows),
    *$HOME/Library/Preferences/ccache/ccache.conf* (macOS) or
    *$HOME/.config/ccache/ccache.conf* (other systems).
 
@@ -383,12 +385,12 @@ project2 will be a different absolute path.
 [[config_cache_dir]] *cache_dir* (*CCACHE_DIR*)::
 
     This option specifies where ccache will keep its cached compiler outputs.
-    It will only take effect if set in the system-wide configuration file or as
-    an environment variable. The default is *$XDG_CACHE_HOME/ccache* if
-    *XDG_CACHE_HOME* is set, otherwise *$HOME/.cache/ccache*. Exception: If the
-    legacy directory *$HOME/.ccache* exists then that directory is the default.
-    See also _<<_location_of_the_primary_configuration_file,Location of the
-    primary configuration file>>_.
+    The default is *$XDG_CACHE_HOME/ccache* if *XDG_CACHE_HOME* is set,
+    otherwise *$HOME/.cache/ccache*. Exception: If the legacy directory
+    *$HOME/.ccache* exists then that directory is the default.
++
+See also _<<_location_of_the_primary_configuration_file,Location of the primary
+configuration file>>_.
 +
 If you want to use another *CCACHE_DIR* value temporarily for one ccache
 invocation you can use the `-d/--directory` command line option instead.