From: Andrew Tridgell Date: Mon, 3 Jun 2002 03:51:17 +0000 (+0200) Subject: added CCACHE_EXTENSION option X-Git-Tag: v2.0~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=205bb5d6e0335100ad62bfd95fca4c502f49ea8a;p=thirdparty%2Fccache.git added CCACHE_EXTENSION option --- diff --git a/ccache.1 b/ccache.1 index 76a973613..00b9c6b3c 100644 --- 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 diff --git a/ccache.c b/ccache.c index 70f23fdbd..e1264b8e7 100644 --- 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; } } diff --git a/ccache.yo b/ccache.yo index 49ea00fa7..87461df8b 100644 --- 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) diff --git a/web/ccache-man.html b/web/ccache-man.html index ddeeeec4e..1c2a93876 100644 --- a/web/ccache-man.html +++ b/web/ccache-man.html @@ -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. +

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.

CACHE SIZE MANAGEMENT