diff --git a/bootstrap/CMakeLists.txt b/bootstrap/CMakeLists.txt index 07fbfbf6..c4e26222 100644 --- a/bootstrap/CMakeLists.txt +++ b/bootstrap/CMakeLists.txt @@ -1,6 +1,18 @@ - project ( Bootstrap ) + project(Bootstrap) -cmake_minimum_required ( VERSION 2.4.0 ) + cmake_minimum_required(VERSION 2.4.0) - add_subdirectory ( cmake_modules ) + add_subdirectory(cmake_modules) + + list(INSERT CMAKE_MODULE_PATH 0 "${Bootstrap_SOURCE_DIR}/cmake_modules/") + find_package(Bootstrap REQUIRED) + print_cmake_module_path() + + setup_sysconfdir("$ENV{CORIOLIS_TOP}") + + install(FILES coriolisEnv.py coriolis2.sh + DESTINATION ${SYS_CONF_DIR}/coriolis2 + PERMISSIONS OWNER_WRITE + OWNER_READ GROUP_READ WORLD_READ + OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE) diff --git a/bootstrap/buildCoriolis.py b/bootstrap/buildCoriolis.py index 04ad6f03..78acbcbc 100755 --- a/bootstrap/buildCoriolis.py +++ b/bootstrap/buildCoriolis.py @@ -595,7 +595,7 @@ if __name__ == "__main__": if options.debug: builder.buildMode = "Debug" if options.static: builder.enableShared = "OFF" if options.doc: builder.enableDoc = "ON" - if options.checkDb: builder.enableDatabase = "ON" + if options.checkDb: builder.checkDatabase = "ON" if options.checkDeterminism: builder.enableDeterminism = "ON" if options.verboseMakefile: builder.verboseMakefile = "ON" if options.rootDir: builder.rootDir = options.rootDir diff --git a/bootstrap/coriolis2.sh b/bootstrap/coriolis2.sh new file mode 100644 index 00000000..02f6e52c --- /dev/null +++ b/bootstrap/coriolis2.sh @@ -0,0 +1,7 @@ + + CORIOLIS_TOP="/asim/coriolis2" + if [ ! -d "$CORIOLIS_TOP" ]; then + echo "[ERROR] Coriolis 2 root directory <$CORIOLIS_TOP> not found." + else + eval "`$CORIOLIS_TOP/etc/coriolis2/coriolisEnv.py --root=/users/outil/coriolis/coriolis-2.x --v2 --release --shared --python`" + fi diff --git a/bootstrap/coriolisEnv.py b/bootstrap/coriolisEnv.py index 9a3dc15b..746d725f 100755 --- a/bootstrap/coriolisEnv.py +++ b/bootstrap/coriolisEnv.py @@ -70,7 +70,6 @@ if __name__ == "__main__": linkType = "Shared" coriolisVersion = None rootDir = None - sysCoriolisTop = "/asim/coriolis2" parser = optparse.OptionParser () # Build relateds. @@ -81,6 +80,7 @@ if __name__ == "__main__": parser.add_option ( "--devel" , action="store_true" , dest="devel" ) parser.add_option ( "--static" , action="store_true" , dest="static" ) parser.add_option ( "--shared" , action="store_true" , dest="shared" ) + parser.add_option ( "--python" , action="store_true" , dest="python" ) parser.add_option ( "--root" , action="store" , type="string", dest="rootDir" ) ( options, args ) = parser.parse_args () @@ -126,8 +126,17 @@ fi buildDir = buildType + "." + linkType coriolisTop = "%s/%s/%s/install" % ( rootDir, osDir, buildDir ) + absLibDir = "%s/%s" % ( coriolisTop, libDir ) strippedPath = "%s/bin:%s" % ( coriolisTop, strippedPath ) - strippedLibraryPath = "%s/%s:%s" % ( coriolisTop, libDir, strippedLibraryPath ) + strippedLibraryPath = "%s:%s" % ( absLibDir, strippedLibraryPath ) + + if options.python: + pyVersion = sys.version_info + version = "%d.%d" % (pyVersion[0],pyVersion[1]) + sitePackagesDir = "%s/python%s/site-packages" % (absLibDir,version) + strippedPythonPath = "%s:" % (sitePackagesDir) + strippedPythonPath + strippedPythonPath = "%s/cumulus:" % (sitePackagesDir) + strippedPythonPath + strippedPythonPath = "%s/stratus:" % (sitePackagesDir) + strippedPythonPath shellScript = \ """