From kde-commits Fri Jul 31 23:39:09 2009 From: Ralf Habacker Date: Fri, 31 Jul 2009 23:39:09 +0000 To: kde-commits Subject: kdesupport/emerge/bin/BuildSystem Message-Id: <1249083549.724257.28810.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=124908355609768 SVN commit 1005413 by habacker: - fixed problem not finding mingw make - fixed problem clearing builddir dir immediatly before configure M +3 -0 BuildSystemBase.py M +3 -6 CMakeBuildSystem.py --- trunk/kdesupport/emerge/bin/BuildSystem/BuildSystemBase.py #1005412:1005413 @@ -15,6 +15,9 @@ self.buildSystemType = type self.configureOptions = configureOptions self.makeOptions = makeOptions + self.envPath = "" + if self.compiler() == "mingw": + self.envPath = "mingw/bin" def configure(self): """configure the target""" --- trunk/kdesupport/emerge/bin/BuildSystem/CMakeBuildSystem.py #1005412:1005413 @@ -15,14 +15,12 @@ """constructor. configureOptions are added to the configure command line and makeOptions are added to the make command line""" BuildSystemBase.__init__(self,"cmake",configureOptions,makeOptions) - self.envPath = "" if self.compiler() == "msvc2005" or self.compiler() == "msvc2008": self.cmakeMakefileGenerator = "NMake Makefiles" self.cmakeMakeProgramm = "nmake" elif self.compiler() == "mingw": self.cmakeMakefileGenerator = "MinGW Makefiles" self.cmakeMakeProgramm = "mingw32-make" - self.envPath = "mingw/bin" else: utils.die( "unknown %s compiler" % self.compiler() ) @@ -46,10 +44,6 @@ def configure( self ): """Using cmake""" - ## \todo isn't builddir already cleaed on unpack ? - if not self.noClean: - utils.cleanDirectory( self.buildDir() ) - self.enterBuildDir() defines = self.configureDefaultDefines() @@ -70,6 +64,9 @@ """run the *make program""" self.enterBuildDir() + if self.envPath <> '': + utils.debug("adding %s to system path" % os.path.join( self.rootdir, self.envPath ),2) + os.putenv( "PATH", os.path.join( self.rootdir, self.envPath ) + ";" + os.getenv("PATH") ) command = self.cmakeMakeProgramm