* <All Tools>/CMakeLists.txt:

- Change: For the setup_sysconfdir() boostrap/cmake macro uses the
        CMAKE_INSTALL_PREFIX to guess where we are being installed.
        Should be more reliable than any *_TOP environment variable.

  * ./bootstrap:
    - Change: In builCoriolis.py, detect not only when the X_TOP is not
        sets but also when it's sets to an empty value. In either case
        gives priority of the X_USER_TOP over the X_TOP.
This commit is contained in:
Jean-Paul Chaput 2011-02-15 13:15:24 +00:00
parent feecdab3e1
commit 19b8436da0
2 changed files with 12 additions and 7 deletions

View File

@ -9,7 +9,7 @@
find_package(Bootstrap REQUIRED) find_package(Bootstrap REQUIRED)
print_cmake_module_path() print_cmake_module_path()
setup_sysconfdir("$ENV{BOOTSTRAP_TOP}") setup_sysconfdir("${CMAKE_INSTALL_PREFIX}")
install(FILES coriolisEnv.py coriolis2.sh install(FILES coriolisEnv.py coriolis2.sh
DESTINATION ${SYS_CONF_DIR}/coriolis2 DESTINATION ${SYS_CONF_DIR}/coriolis2

View File

@ -381,14 +381,19 @@ class ProjectBuilder:
def _setEnvironment ( self, systemVariable, userVariable ): def _setEnvironment ( self, systemVariable, userVariable ):
if not self._environment.has_key(systemVariable): if not self._environment.has_key(systemVariable) or self._environment[systemVariable] == "":
self._environment[ systemVariable ] = self._installDir if not self._environment.has_key(userVariable) or self._environment[userVariable] == "" :
#if not self._environment.has_key(userVariable): self._environment[ systemVariable ] = self._installDir
# self._environment[ userVariable ] = 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: 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): if self._environment.has_key(userVariable):
print "Transmitting %s = \"%s\"." % (userVariable,self._environment[userVariable]) print "Transmitting <%s> as <%s>." % (userVariable,self._environment[userVariable])
return return