Re: [Compilercache-general] Making it easier to plug in new compilers
Brought to you by:
erikyyy
From: Jochen V. <vo...@ma...> - 2002-10-01 17:40:57
|
Hi, On Wed, Jan 09, 2002 at 10:42:17PM +0100, Jochen Voss wrote: > with the COMPILERNAMES variable it is not to hard to > plug new compilers into compilercache. But still > there is duplicated information: the compilernames are > enumerated both, in the COMPILERNAMES variable and (as > link names) in the COMPILERCACHEBINDIR directory. Just for completeness I add a patch to implement this: --- compilercache-1.0.10.orig/bin/compilercache +++ compilercache-1.0.10/bin/compilercache @@ -31,8 +31,7 @@ LINKOUTPUT=3D"no" PATH=3D"/bin:/usr/bin" COMPILERPATH=3D"/bin:/usr/bin" -COMPILERNAMES=3D"c++ g++ cc gcc" COMPILERCACHEBINDIR=3D"/usr/bin/compilercache" # source the systems global configuration file [ -f /etc/compilercacherc ] && source /etc/compilercacherc @@ -66,11 +65,9 @@ # determine compiler type COMP=3D"$(basename "$0")" COMPILERNAMEMATCHES=3Dno -for TESTCOMPILERNAME in $COMPILERNAMES; do - if [ "$TESTCOMPILERNAME" =3D "$COMP" ]; then - COMPILERNAMEMATCHES=3Dyes - fi -done +if test -L "$COMPILERCACHEBINDIR/$COMP"; then + COMPILERNAMEMATCHES=3Dyes +fi if [ "$COMPILERNAMEMATCHES" =3D no ]; then printf "unsupported compiler type\n" 1>&2 exit 1 It seems to work for me. Jochen --=20 http://www.mathematik.uni-kl.de/~wwwstoch/voss/ |