Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Correct path for install ruby. New version.
authornavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 4 May 2010 13:35:44 +0000 (13:35 +0000)
committernavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 4 May 2010 13:35:44 +0000 (13:35 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7678 48e7efb5-ca39-0410-a469-dd3cf9ba447f

CMakeLists.txt
buildtools/Cmake/src/CMakeDistrib.txt

index 6f5f8f4..a3494a3 100644 (file)
@@ -4,7 +4,7 @@ SET(CMAKE_LANGUAGE "Cxx")
 SET(PROJECT_NAME "Simgrid")
 SET(PROJECT_LABEL "Simgrid")
 set(CMAKE_C_FLAGS "" CACHE TYPE INTERNAL FORCE)
-set(release_version "3.4")
+set(release_version "3.4.1")
 set(libsimgrid_version "${release_version}")
 set(libgras_version "${release_version}")
 set(libsmpi_version "${release_version}")
index caa7075..487010c 100755 (executable)
@@ -51,7 +51,7 @@ string(REPLACE "${PROJECT_DIRECTORY}/tools/MSG_visualization/colorize.pl" "${pre
 string(REPLACE "${PROJECT_DIRECTORY}/src/.libs" "${prefix}/lib" uninstall_libs "${install_libs}")
 string(REPLACE "./" "${prefix}/" uninstall_HEADERS "${install_HEADERS}")
 
-string(REPLACE "/usr/lib/ruby" "" install_link_ruby "${RUBY_INCLUDE_PATH}")
+string(REGEX REPLACE "^.*ruby/" "" install_link_ruby ${RUBY_INCLUDE_PATH})
 
 add_custom_target(install-simgrid
 COMMAND mkdir -p $ENV{DESTDIR}${prefix}
@@ -66,7 +66,7 @@ COMMAND cp ${PROJECT_DIRECTORY}/tools/MSG_visualization/colorize.pl $ENV{DESTDIR
 COMMAND echo "install bin           OK"
 COMMAND cp ${install_libs} $ENV{DESTDIR}${prefix}/lib
 COMMAND echo "install lib           OK"
-COMMAND cp ${install_HEADERS} $ENV{DESTDIR}${prefix}
+COMMAND cp --parents ${install_HEADERS} $ENV{DESTDIR}${prefix}
 COMMAND echo "install include       OK"
 COMMAND cp -rf ${PROJECT_DIRECTORY}/doc/html/ $ENV{DESTDIR}${prefix}/doc/simgrid
 COMMAND echo "install doc/html      OK"
@@ -76,7 +76,7 @@ WORKING_DIRECTORY "${PROJECT_DIRECTORY}/"
 foreach(file ${ex_to_svg})
        string(REPLACE "${PROJECT_DIRECTORY}" "." file "${file}")
        add_custom_command(TARGET install-simgrid
-               COMMAND cp -f ${file} $ENV{DESTDIR}${prefix}/doc/simgrid/
+               COMMAND cp --parents -f ${file} $ENV{DESTDIR}${prefix}/doc/simgrid/
                WORKING_DIRECTORY "${PROJECT_DIRECTORY}"
        )
 endforeach(file ${ex_to_svg})
@@ -88,27 +88,27 @@ add_custom_command(TARGET install-simgrid
 add_custom_target(uninstall
 COMMAND rm -rf ${prefix}/doc/simgrid
 COMMAND echo "uninstall doc ok"
-COMMAND rm ${uninstall_libs}
+COMMAND rm -f ${uninstall_libs}
 COMMAND echo "uninstall lib ok"
-COMMAND rm ${uninstall_bins}
-COMMAND rm ${prefix}/bin/simgrid_colorizer.pl
+COMMAND rm -f ${uninstall_bins}
+COMMAND rm -f ${prefix}/bin/simgrid_colorizer.pl
 COMMAND echo "uninstall bin ok"
-COMMAND rm ${uninstall_HEADERS}
+COMMAND rm -f ${uninstall_HEADERS}
 COMMAND echo "uninstal include ok"
-COMMAND rm -R ${prefix}/include/amok ${prefix}/include/gras ${prefix}/include/instr ${prefix}/include/msg 
-COMMAND rm -R ${prefix}/include/simdag ${prefix}/include/smpi ${prefix}/include/surf ${prefix}/include/xbt
+COMMAND rm -Rf ${prefix}/include/amok ${prefix}/include/gras ${prefix}/include/instr ${prefix}/include/msg 
+COMMAND rm -Rf ${prefix}/include/simdag ${prefix}/include/smpi ${prefix}/include/surf ${prefix}/include/xbt
 WORKING_DIRECTORY "${prefix}"
 )
 
 if(HAVE_JAVA)
        add_custom_command(TARGET install-simgrid
-       COMMAND echo "install binding java  OK"
-       COMMAND mkdir --parent $ENV{DESTDIR}${prefix}/share/
+       COMMAND mkdir -p $ENV{DESTDIR}${prefix}/share/
        COMMAND cp ${PROJECT_DIRECTORY}/src/simgrid.jar $ENV{DESTDIR}${prefix}/share/simgrid.jar
+       COMMAND echo "install binding java  OK"
        WORKING_DIRECTORY "${PROJECT_DIRECTORY}/"
        )
        add_custom_command(TARGET uninstall
-       COMMAND rm ${prefix}/share/simgrid.jar
+       COMMAND rm -f ${prefix}/share/simgrid.jar
        COMMAND echo "uninstall binding java"
        WORKING_DIRECTORY "${PROJECT_DIRECTORY}/"
        )       
@@ -116,30 +116,30 @@ endif(HAVE_JAVA)
 
 if(HAVE_LUA)
        add_custom_command(TARGET install-simgrid
-       COMMAND echo "install binding lua   OK"
-       COMMAND mkdir --parent $ENV{DESTDIR}${prefix}/lib/lua/5.1/
+       COMMAND mkdir -p $ENV{DESTDIR}${prefix}/lib/lua/5.1/
        COMMAND ln -sf ${prefix}/lib/libsimgrid.so $ENV{DESTDIR}${prefix}/lib/lua/5.1/simgrid.so
+       COMMAND echo "install binding lua   OK"
        WORKING_DIRECTORY "${PROJECT_DIRECTORY}/"
        )
        add_custom_command(TARGET uninstall
        COMMAND echo "uninstall binding lua"
-       COMMAND rm ${prefix}/lib/lua/5.1/simgrid.so     
+       COMMAND rm -f ${prefix}/lib/lua/5.1/simgrid.so  
        WORKING_DIRECTORY "${PROJECT_DIRECTORY}/"
        )
 endif(HAVE_LUA)
 
 if(HAVE_RUBY)
        add_custom_command(TARGET install-simgrid
+       COMMAND mkdir -p "$ENV{DESTDIR}${prefix}/lib/ruby/${install_link_ruby}/"
+       COMMAND ln -sf ${prefix}/lib/libsimgrid.so $ENV{DESTDIR}${prefix}/lib/ruby/${install_link_ruby}/libsimgrid.so
+       COMMAND cp ${PROJECT_DIRECTORY}/src/bindings/ruby/simgrid.rb $ENV{DESTDIR}${prefix}/lib/ruby/${install_link_ruby}/simgrid.rb
        COMMAND echo "install binding ruby  OK"
-       COMMAND mkdir --parent $ENV{DESTDIR}${prefix}/lib/ruby${install_link_ruby}/
-       COMMAND ln -sf ${prefix}/lib/libsimgrid.so $ENV{DESTDIR}${prefix}/lib/ruby${install_link_ruby}/libsimgrid.so
-       COMMAND cp ${PROJECT_DIRECTORY}/src/bindings/ruby/simgrid.rb $ENV{DESTDIR}${prefix}/lib/ruby${install_link_ruby}/simgrid.rb
        WORKING_DIRECTORY "${PROJECT_DIRECTORY}/"
        )
        add_custom_command(TARGET uninstall
        COMMAND echo "uninstall binding ruby"
-       COMMAND rm ${prefix}/lib/ruby${install_link_ruby}/libsimgrid.so
-       COMMAND rm ${prefix}/lib/ruby${install_link_ruby}/simgrid.rb
+       COMMAND rm -f ${prefix}/lib/ruby/${install_link_ruby}/libsimgrid.so
+       COMMAND rm -f ${prefix}/lib/ruby/${install_link_ruby}/simgrid.rb
        WORKING_DIRECTORY "${PROJECT_DIRECTORY}/"
        )
 endif(HAVE_RUBY)
@@ -149,9 +149,9 @@ COMMAND echo "Make the html doc"
 COMMAND echo "cmake -DBIBTEX2HTML=${BIBTEX2HTML} ./"
 COMMAND cmake -DBIBTEX2HTML=${BIBTEX2HTML} ./
 COMMAND rm -rf ${PROJECT_DIRECTORY}/buildtools/Cmake/src/doc/CMakeFiles
-COMMAND rm ${PROJECT_DIRECTORY}/buildtools/Cmake/src/doc/CMakeCache.txt
-COMMAND rm ${PROJECT_DIRECTORY}/buildtools/Cmake/src/doc/cmake_install.cmake
-COMMAND rm ${PROJECT_DIRECTORY}/buildtools/Cmake/src/doc/Makefile
+COMMAND rm -f ${PROJECT_DIRECTORY}/buildtools/Cmake/src/doc/CMakeCache.txt
+COMMAND rm -f ${PROJECT_DIRECTORY}/buildtools/Cmake/src/doc/cmake_install.cmake
+COMMAND rm -f ${PROJECT_DIRECTORY}/buildtools/Cmake/src/doc/Makefile
 WORKING_DIRECTORY "${PROJECT_DIRECTORY}/buildtools/Cmake/src/doc"
 )