]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
added CCACHE_CC option
authorAndrew Tridgell <tridge@samba.org>
Mon, 6 Jan 2003 04:25:13 +0000 (05:25 +0100)
committerAndrew Tridgell <tridge@samba.org>
Mon, 6 Jan 2003 04:25:13 +0000 (05:25 +0100)
ccache.1
ccache.c
ccache.yo
web/ccache-man.html

index aaef0f44f531059df6b1921e2f1b49ddf5d3215d..aafb3bba018d4ac3b27ce22e868be6bd0801c85c 100644 (file)
--- a/ccache.1
+++ b/ccache.1
@@ -136,6 +136,11 @@ don\&'t do this then ccache will look for the first executable matching
 the compiler name in the normal PATH that isn\&'t a symbolic link to
 ccache itself\&.
 .IP 
+.IP "\fBCCACHE_CC\fP" 
+You can optionally set CCACHE_CC to force the name
+of the compiler to use\&. If you don\&'t do this then ccache works it out
+from the command line\&.
+.IP 
 .IP "\fBCCACHE_DISABLE\fP" 
 If you set the environment variable
 CCACHE_DISABLE then ccache will just call the real compiler,
index c856748302185842064f7f652eeebcb9efd7f5b3..43aaf0b7e8213760002e6c43a8fb1a4528e7bd81 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -487,6 +487,11 @@ static void find_compiler(int argc, char **argv)
                base = basename(argv[1]);
        }
 
+       /* support user override of the compiler */
+       if ((path=getenv("CCACHE_CC"))) {
+               base = strdup(path);
+       }
+
        path = getenv("CCACHE_PATH");
        if (!path) {
                path = getenv("PATH");
index bb383d72c747c8d5e20740fb90fe8be563de93b3..7b1731e6aeee1edcd768e0340442cf1c52553bc0 100644 (file)
--- a/ccache.yo
+++ b/ccache.yo
@@ -116,6 +116,10 @@ don't do this then ccache will look for the first executable matching
 the compiler name in the normal PATH that isn't a symbolic link to
 ccache itself.
 
+dit(bf(CCACHE_CC)) You can optionally set CCACHE_CC to force the name
+of the compiler to use. If you don't do this then ccache works it out
+from the command line.
+
 dit(bf(CCACHE_DISABLE)) If you set the environment variable
 CCACHE_DISABLE then ccache will just call the real compiler,
 bypassing the cache completely.
index 007fe71c66bd6bc592b475e7f85dcb1f8a6f5f37..27d73d7c0fcc671214f63ec3736293bdb6084bb0 100644 (file)
@@ -114,6 +114,9 @@ separated path where ccache will look for the real compilers. If you
 don't do this then ccache will look for the first executable matching
 the compiler name in the normal PATH that isn't a symbolic link to
 ccache itself.
+<p><p></p><dt><strong><strong>CCACHE_CC</strong></strong><dd> You can optionally set CCACHE_CC to force the name
+of the compiler to use. If you don't do this then ccache works it out
+from the command line.
 <p><p></p><dt><strong><strong>CCACHE_DISABLE</strong></strong><dd> If you set the environment variable
 CCACHE_DISABLE then ccache will just call the real compiler,
 bypassing the cache completely.