X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/df18faac51d5f0b3ae8aa7d00bee5740c066aa81..234ae403478cdecaa20912b4d549bc50919ccda9:/buildtools/pipol/liste_install.sh diff --git a/buildtools/pipol/liste_install.sh b/buildtools/pipol/liste_install.sh index 35c4e75a3a..90daa775bf 100644 --- a/buildtools/pipol/liste_install.sh +++ b/buildtools/pipol/liste_install.sh @@ -6,21 +6,6 @@ if [ -e /usr/bin/yum ] ; then sudo yum -y update fi -which_cmake=`which cmake` #cmake necessary -echo $which_cmake -if [ x$which_cmake = x ] ; then - echo "Try to install cmake" - if [ -e /usr/bin/apt-get ] ; then - sudo apt-get -y install cmake - fi - if [ -e /usr/bin/yum ] ; then - sudo yum -y install cmake - fi - if [ x$arch = xDarwin ] ; then - sudo fink -y install cmake - fi -fi - which_svn=`which svn` #svn necessary echo $which_svn if [ x$which_svn = x ] ; then @@ -84,29 +69,29 @@ if [ x$which_java = x ] ; then fi if [ x$arch = xDarwin ] ; then - which_lua=`find /sw/include -name lualib.h` #lualib.h optional + which_lua=`which lua` #lua else - which_lua=`find /usr/include/ -name lualib.h` #lualib.h optional + which_lua=`which lua` #lua fi echo $which_lua if [ x$which_lua = x ] ; then echo "Try to install lua" if [ -e /usr/bin/apt-get ] ; then - sudo apt-get -y install liblua5.1 + sudo apt-get -y install lua5.1 liblua5.1-dev fi if [ -e /usr/bin/yum ] ; then sudo yum -y install lua-devel fi if [ x$arch = xDarwin ] ; then - sudo fink -y install lua51-dev + sudo fink -y install lua51-dev lua51 fi fi if [ x$arch = xDarwin ] ; then - which_ruby=`find /sw/lib/ruby/ -name ruby.h` #lualib.h optional + which_ruby=`which ruby` #lua else - which_ruby=`find /usr/lib/ruby/ -name ruby.h` #ruby.h optional + which_ruby=`which ruby` #lua fi echo $which_ruby @@ -138,3 +123,45 @@ if [ x$which_unzip = x ] ; then sudo fink -y install unzip fi fi + +which_cmake=`which cmake` #cmake necessary +echo $which_cmake +if [ x$which_cmake = x ] ; then + echo "Try to install cmake" + if [ -e /usr/bin/apt-get ] ; then + sudo apt-get -y remove cmake + sudo apt-get -y install cmake + fi + if [ -e /usr/bin/yum ] ; then + sudo yum -y install cmake + fi + if [ x$arch = xDarwin ] ; then + sudo fink -y install cmake + fi +fi + +which_cmake_version=`cmake --version` +which_cpack_version=`cpack --version` +which_ctest_version=`ctest --version` +echo "current version of cmake : $which_cmake_version" +echo "current version of cpack : $which_cpack_version" +echo "current version of ctest : $which_ctest_version" +if [ "x$which_cmake_version" != "xcmake version 2.8.1" ] ; then + which_cmake=`which cmake` + which_cpack=`which cpack` + which_ctest=`which ctest` + cp -rf ~/cmake-2.8.1/ ./ + cd ./cmake-2.8.1/ + cmake . > /dev/null + make -j > /dev/null 2>&1 + sudo ln -sf `pwd`/bin/cmake $which_cmake + sudo ln -sf `pwd`/bin/cpack $which_cpack + sudo ln -sf `pwd`/bin/ctest $which_ctest + which_cmake_version=`cmake --version` + which_cpack_version=`cpack --version` + which_ctest_version=`ctest --version` + echo "new version of cmake : $which_cmake_version" + echo "new version of cpack : $which_cpack_version" + echo "new version of ctest : $which_ctest_version" + cd .. +fi