From d303019f4c92354aa0a8a3b5e079c0225897cd53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Mon, 24 Oct 2005 03:01:57 +0000 Subject: [PATCH] icecream/ccache support... --- pisi/build.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pisi/build.py b/pisi/build.py index 3dfea893..0072fe68 100644 --- a/pisi/build.py +++ b/pisi/build.py @@ -177,8 +177,17 @@ class Builder: "SRC_RELEASE": self.spec.source.release } os.environ.update(evn) - # Add ccache directory for support Compiler Cache :) - os.environ["PATH"] = "/usr/lib/ccache/bin/:" + os.environ["PATH"] + + # First check icecream, if not found use ccache, no need to use both + # together (according to kde-wiki it cause performance loss) + if os.path.exists("/opt/icecream/bin/gcc"): + # Add icecream directory for support distributed compiling :) + os.environ["PATH"] = "/opt/icecream/bin/:" + os.environ["PATH"] + ctx.ui.info(_("IceCream detected. Make sure your daemon is up and running...") + elif os.path.exists("/usr/lib/ccache/bin/gcc"): + # Add ccache directory for support Compiler Cache :) + os.environ["PATH"] = "/usr/lib/ccache/bin/:" + os.environ["PATH"] + ctx.ui.info(_("CCache detected...") def fetch_source_archive(self): ctx.ui.info(_("Fetching source from: %s") % self.spec.source.archiveUri)