diff --git a/bootstrap/builder/Builder.py b/bootstrap/builder/Builder.py index d6cd90f3..362f62f7 100644 --- a/bootstrap/builder/Builder.py +++ b/bootstrap/builder/Builder.py @@ -51,16 +51,16 @@ class Builder: if attribute in self._conf.getAllIds(): setattr( self._conf, attribute, value ) - if attribute == "quiet": self._quiet = value - elif attribute == "rmBuild": self._rmBuild = value - elif attribute == "doBuild": self._doBuild = value - elif attribute == "noCache": self._noCache = value - elif attribute == "enableDoc": self._enableDoc = value - elif attribute == "enableShared": self._enableShared = value - elif attribute == "checkDatabase": self._checkDatabase = value - elif attribute == "checkDeterminism": self._checkDeterminism = value - elif attribute == "verboseMakefile": self._verboseMakefile = value - elif attribute == "makeArguments": self._makeArguments = value.split () + if attribute == "quiet": self._quiet = value + elif attribute == "rmBuild": self._rmBuild = value + elif attribute == "doBuild": self._doBuild = value + elif attribute == "noCache": self._noCache = value + elif attribute == "enableDoc": self._enableDoc = value + elif attribute == "enableShared": self._enableShared = value + elif attribute == "checkDatabase": self._checkDatabase = value + elif attribute == "checkDeterminism": self._checkDeterminism = value + elif attribute == "verboseMakefile": self._verboseMakefile = value + elif attribute == "makeArguments": self._makeArguments = value.split () return diff --git a/bootstrap/builder/Configuration.py b/bootstrap/builder/Configuration.py index 32d4cc48..5745e199 100644 --- a/bootstrap/builder/Configuration.py +++ b/bootstrap/builder/Configuration.py @@ -2,7 +2,7 @@ # -*- mode:Python -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved +# Copyright (c) UPMC/LIP6 2008-2013, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -120,8 +120,8 @@ class Configuration ( object ): def _guessOs ( self ): self._libSuffix = None - self._osSlsoc6x_64 = re.compile (".*Linux.*el6.*x86_64.*") - self._osSlsoc6x = re.compile (".*Linux.*el6.*") + self._osSlsoc6x_64 = re.compile (".*Linux.*(el6|slsoc6).*x86_64.*") + self._osSlsoc6x = re.compile (".*Linux.*(el6|slsoc6).*") self._osSLSoC5x_64 = re.compile (".*Linux.*el5.*x86_64.*") self._osSLSoC5x = re.compile (".*Linux.*(el5|2.6.23.13.*SoC).*") self._osLinux_64 = re.compile (".*Linux.*x86_64.*") diff --git a/bootstrap/ccb.py b/bootstrap/ccb.py index bc15ad27..fd314762 100755 --- a/bootstrap/ccb.py +++ b/bootstrap/ccb.py @@ -3,7 +3,7 @@ # -*- mode:Python -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved +# Copyright (c) UPMC 2008-2013, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -54,8 +54,8 @@ def safeImport ( moduleName, symbol=None ): def guessOs (): libDir = 'lib' - osSlsoc6x_64 = re.compile (".*Linux.*el6.*x86_64.*") - osSlsoc6x = re.compile (".*Linux.*el6.*") + osSlsoc6x_64 = re.compile (".*Linux.*(el6|slsoc6).*x86_64.*") + osSlsoc6x = re.compile (".*Linux.*(el6|slsoc6).*") osSLSoC5x_64 = re.compile (".*Linux.*el5.*x86_64.*") osSLSoC5x = re.compile (".*Linux.*(el5|2.6.23.13.*SoC).*") osLinux_64 = re.compile (".*Linux.*x86_64.*") @@ -71,16 +71,20 @@ def guessOs (): if osSlsoc6x_64.match(lines[0]): osType = "Linux.slsoc6x_64" libDir = "lib64" - elif osSlsoc6x .match(lines[0]): osType = "Linux.slsoc6x" + elif osSlsoc6x.match(lines[0]): + osType = "Linux.slsoc6x" elif osSLSoC5x_64.match(lines[0]): osType = "Linux.SLSoC5x_64" libDir = "lib64" - elif osSLSoC5x .match(lines[0]): osType = "Linux.SLSoC5x" + elif osSLSoC5x .match(lines[0]): + osType = "Linux.SLSoC5x" elif osLinux_64.match(lines[0]): osType = "Linux.x86_64" libDir = "lib64" - elif osLinux .match(lines[0]): osType = "Linux.i386" - elif osDarwin.match(lines[0]): osType = "Darwin" + elif osLinux .match(lines[0]): + osType = "Linux.i386" + elif osDarwin.match(lines[0]): + osType = "Darwin" elif osFreeBSD8x_amd64.match(lines[0]): osType = "FreeBSD.8x.amd64" libDir = "lib64" @@ -105,9 +109,10 @@ def guessPythonSitePackage (): def autoLocate (): + osType, libDir = guessOs() + print 'Building for target: <%s>' % osType print 'Making an educated guess to locate myself:' sitePackage = guessPythonSitePackage() - osType, libDir = guessOs() builderDir = None locations = [ os.path.abspath(os.path.dirname(sys.argv[0])) @@ -140,6 +145,7 @@ def autoLocate (): sys.exit(1) sys.path.insert( 0, builderDir ) + return @@ -226,7 +232,7 @@ else: if options.static: builder.enableShared = "OFF" if options.doc: builder.enableDoc = "ON" if options.checkDb: builder.checkDatabase = "ON" - if options.checkDeterminism: builder.enableDeterminism = "ON" + if options.checkDeterminism: builder.checkDeterminism = "ON" if options.verboseMakefile: builder.verboseMakefile = "ON" if options.rootDir: builder.rootDir = options.rootDir if options.noBuild: builder.doBuild = False