]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
added CCACHE_EXTENSION option
authorAndrew Tridgell <tridge@samba.org>
Mon, 3 Jun 2002 03:51:17 +0000 (05:51 +0200)
committerAndrew Tridgell <tridge@samba.org>
Mon, 3 Jun 2002 03:51:17 +0000 (05:51 +0200)
ccache.1
ccache.c
ccache.yo
web/ccache-man.html

index 76a9736136f11753c461dd8a2eb7377656f648ce..00b9c6b3cb233b9f658dcae1910917752efe4305 100644 (file)
--- a/ccache.1
+++ b/ccache.1
@@ -182,6 +182,15 @@ CCACHE_UNIFY is not set and vice versa\&. The reason the unifier is off
 by default is that it can give incorrect line number information in
 compiler warning messages\&.
 .IP 
+.IP "\fBCCACHE_EXTENSION\fP" 
+Normally ccache tries to automatically
+determine the extension to use for intermediate C pre-processor files
+based on the type of file being compiled\&. Unfortunately this sometimes
+doesn\&'t work, for example when using the aCC compiler on HP-UX\&. On
+systems like this you can use the CCACHE_EXTENSION option to override
+the default\&. On HP-UX set this environment variable to "i" if you use
+the aCC compiler\&.
+.IP 
 .PP 
 .SH "CACHE SIZE MANAGEMENT" 
 .PP 
index 70f23fdbde1927aea05d86aca4daa3afcc61b735..e1264b8e71905a661b1339e2c6a90ef244797681 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -545,6 +545,8 @@ static char *check_extension(const char *fname)
        p++;
        for (i=0; extensions[i].extension; i++) {
                if (strcmp(p, extensions[i].extension) == 0) {
+                       p = getenv("CCACHE_EXTENSION");
+                       if (p) return p;
                        return extensions[i].i_extension;
                }
        }
index 49ea00fa7accae7f64645687cc9498f1d33aa0d2..87461df8b5505fd53e0914e7c46ae0081f332cff 100644 (file)
--- a/ccache.yo
+++ b/ccache.yo
@@ -156,6 +156,14 @@ CCACHE_UNIFY is not set and vice versa. The reason the unifier is off
 by default is that it can give incorrect line number information in
 compiler warning messages.
 
+dit(bf(CCACHE_EXTENSION)) Normally ccache tries to automatically
+determine the extension to use for intermediate C pre-processor files
+based on the type of file being compiled. Unfortunately this sometimes
+doesn't work, for example when using the aCC compiler on HP-UX. On
+systems like this you can use the CCACHE_EXTENSION option to override
+the default. On HP-UX set this environment variable to "i" if you use
+the aCC compiler.
+
 enddit()
 
 manpagesection(CACHE SIZE MANAGEMENT)
index ddeeeec4e4ece01b853c26d57add5a77aa98741d..1c2a938764af7b2f63a7cb6271fc5270ca1d795d 100644 (file)
@@ -148,6 +148,13 @@ cached compiles with CCACHE_UNIFY set cannot be used when
 CCACHE_UNIFY is not set and vice versa. The reason the unifier is off
 by default is that it can give incorrect line number information in
 compiler warning messages.
+<p><p></p><dt><strong><strong>CCACHE_EXTENSION</strong></strong><dd> Normally ccache tries to automatically
+determine the extension to use for intermediate C pre-processor files
+based on the type of file being compiled. Unfortunately this sometimes
+doesn't work, for example when using the aCC compiler on HP-UX. On
+systems like this you can use the CCACHE_EXTENSION option to override
+the default. On HP-UX set this environment variable to "i" if you use
+the aCC compiler.
 <p></dl>
 <p><h2>CACHE SIZE MANAGEMENT</h2>