diff --git a/bootstrap/CMakeLists.txt b/bootstrap/CMakeLists.txt index 7c5be6a8..df208c73 100644 --- a/bootstrap/CMakeLists.txt +++ b/bootstrap/CMakeLists.txt @@ -9,7 +9,7 @@ find_package(Bootstrap REQUIRED) print_cmake_module_path() - setup_sysconfdir("$ENV{BOOTSTRAP_TOP}") + setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") install(FILES coriolisEnv.py coriolis2.sh DESTINATION ${SYS_CONF_DIR}/coriolis2 diff --git a/bootstrap/buildCoriolis.py b/bootstrap/buildCoriolis.py index a787f9dc..3046b4c1 100755 --- a/bootstrap/buildCoriolis.py +++ b/bootstrap/buildCoriolis.py @@ -381,14 +381,19 @@ class ProjectBuilder: def _setEnvironment ( self, systemVariable, userVariable ): - if not self._environment.has_key(systemVariable): - self._environment[ systemVariable ] = self._installDir - #if not self._environment.has_key(userVariable): - # self._environment[ userVariable ] = self._installDir + if not self._environment.has_key(systemVariable) or self._environment[systemVariable] == "": + if not self._environment.has_key(userVariable) or self._environment[userVariable] == "" : + self._environment[ systemVariable ] = self._installDir + print "[WARNING] Neither <%s> nor <%s> environment variables are sets." \ + % (systemVariable,userVariable) + print " Setting <%s> to <%s>." % (systemVariable,self._installDir) + else: + self._environment[ systemVariable ] = self._environment[ userVariable ] + if not self._quiet: - print "Setting %s = \"%s\"." % (systemVariable ,self._environment[systemVariable]) + print "Setting <%s> to <%s>." % (systemVariable,self._environment[systemVariable]) if self._environment.has_key(userVariable): - print "Transmitting %s = \"%s\"." % (userVariable,self._environment[userVariable]) + print "Transmitting <%s> as <%s>." % (userVariable,self._environment[userVariable]) return