When /usr/lib/distcc/bin does not exist, only add a maximum of one distcc to CC and...
authorZac Medico <zmedico@gentoo.org>
Wed, 24 May 2006 08:12:48 +0000 (08:12 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 24 May 2006 08:12:48 +0000 (08:12 -0000)
svn path=/main/trunk/; revision=3408

bin/ebuild.sh

index 31f32ed8ae93f1d9c5756dac0f47f27772ad90b9..bfe9e072df0ee0ac7ff099e2b6d2ded357e314d1 100755 (executable)
@@ -1348,8 +1348,12 @@ if [ "$*" != "depend" ] && [ "$*" != "clean" ] && [ "$*" != "setup" ]; then
                        export PATH="/usr/lib/distcc/bin:${PATH}"
                        [ ! -z "${DISTCC_LOG}" ] && addwrite "$(dirname ${DISTCC_LOG})"
                elif which distcc &>/dev/null; then
-                       export CC="distcc $CC"
-                       export CXX="distcc $CXX"
+                       if ! hasq distcc $CC; then
+                               export CC="distcc $CC"
+                       fi
+                       if ! hasq distcc $CXX; then
+                               export CXX="distcc $CXX"
+                       fi
                fi
        fi