X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/256187ac5f830a60ae79f441078c20c32be037b2..1beb7db8bbe445fcba0d37352b2e761c54ad9e7a:/buildtools/Cmake/Distrib.cmake diff --git a/buildtools/Cmake/Distrib.cmake b/buildtools/Cmake/Distrib.cmake index 41b88fd142..43cbb784ec 100644 --- a/buildtools/Cmake/Distrib.cmake +++ b/buildtools/Cmake/Distrib.cmake @@ -14,23 +14,29 @@ install(DIRECTORY "${CMAKE_HOME_DIRECTORY}/doc/html/" PATTERN "*~" EXCLUDE ) +#### Generate the manpages +if( NOT MANPAGE_DIR ) + set( MANPAGE_DIR $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/share/man/share/man/man1 ) +endif( NOT MANPAGE_DIR) + +add_custom_target(TARGET install + COMMAND ${CMAKE_COMMAND} -E make_directory ${MANPAGE_DIR} + COMMAND pod2man tools/simgrid_update_xml.pl > ${MANPAGE_DIR}/simgrid_update_xml.1 + COMMENT "Generating manpages" +) + # binaries install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/smpicc ${CMAKE_BINARY_DIR}/bin/smpif2c ${CMAKE_BINARY_DIR}/bin/smpiff ${CMAKE_BINARY_DIR}/bin/smpirun DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/) -if(WIN32) - install(PROGRAMS ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/tesh.pl - DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/ - RENAME tesh) - add_custom_target(tesh - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/tesh.pl ${CMAKE_BINARY_DIR}/bin/tesh - ) -else(WIN32) - install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/tesh - DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/) -endif(WIN32) + +install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/tesh +DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/) + +install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/graphicator +DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/) install(PROGRAMS ${CMAKE_HOME_DIRECTORY}/tools/MSG_visualization/colorize.pl DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/ @@ -72,29 +78,25 @@ if(enable_lib_static AND NOT WIN32) endif(enable_lib_static AND NOT WIN32) # include files -foreach(file ${install_HEADERS}) +set(HEADERS + ${headers_to_install} + ${generated_headers_to_install} + ) +foreach(file ${HEADERS}) get_filename_component(location ${file} PATH) string(REPLACE "${CMAKE_CURRENT_BINARY_DIR}/" "" location "${location}") install(FILES ${file} DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${location}) -endforeach(file ${install_HEADERS}) +endforeach(file ${HEADERS}) # example files foreach(file ${examples_to_install_in_doc}) - string(REPLACE "${CMAKE_HOME_DIRECTORY}/examples/" "" file ${file}) + string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/examples/" "" file ${file}) get_filename_component(location ${file} PATH) install(FILES "examples/${file}" DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/doc/simgrid/examples/${location}) endforeach(file ${examples_to_install_in_doc}) -# example README -foreach(file ${README_examples_files}) - string(REPLACE "${CMAKE_HOME_DIRECTORY}/examples/" "" file ${file}) - get_filename_component(location ${file} PATH) - install(FILES "examples/${file}" - DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/doc/simgrid/examples/${location}) -endforeach(file ${README_examples_files}) - # bindings cruft if(HAVE_LUA) @@ -105,32 +107,13 @@ if(HAVE_LUA) ) add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/lib/lua/5.1/simgrid.${LIB_EXE} - COMMAND ${CMAKE_COMMAND} -E create_symlink ../../libsimgrid.${LIB_EXE} ${CMAKE_BINARY_DIR}/lib/lua/5.1/simgrid.${LIB_EXE} + COMMAND ${CMAKE_COMMAND} -E create_symlink ../../www-id/Pages_Perso_Mescal/pierre.navarro//libsimgrid.${LIB_EXE} ${CMAKE_BINARY_DIR}/lib/lua/5.1/simgrid.${LIB_EXE} ) install(FILES ${CMAKE_BINARY_DIR}/lib/lua/5.1/simgrid.${LIB_EXE} DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/lua/5.1 ) endif(HAVE_LUA) -if(HAVE_RUBY) - string(REGEX REPLACE "^.*ruby/" "" install_link_ruby "${RUBY_ARCH_DIR}") - file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/lib/ruby/${install_link_ruby}") - add_custom_target(ruby_simgrid ALL - DEPENDS simgrid - ${CMAKE_BINARY_DIR}/lib/ruby/${install_link_ruby}/libsimgrid.${LIB_EXE} - ) - add_custom_command( - OUTPUT ${CMAKE_BINARY_DIR}/lib/ruby/${install_link_ruby}/libsimgrid.${LIB_EXE} - COMMAND ${CMAKE_COMMAND} -E create_symlink ../../../libsimgrid.${LIB_EXE} ${CMAKE_BINARY_DIR}/lib/ruby/${install_link_ruby}/libsimgrid.${LIB_EXE} - ) - install(FILES ${CMAKE_BINARY_DIR}/lib/ruby/${install_link_ruby}/libsimgrid.${LIB_EXE} - DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/ruby/${install_link_ruby}/ - ) - install(FILES ${CMAKE_HOME_DIRECTORY}/src/bindings/ruby/simgrid.rb - DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/ruby/${install_link_ruby}/) - -endif(HAVE_RUBY) - ########################################### ### Fill in the "make uninstall" target ### ########################################### @@ -175,16 +158,6 @@ if(HAVE_LUA) ) endif(HAVE_LUA) -if(HAVE_RUBY) - string(REGEX REPLACE "^.*ruby/" "" install_link_ruby "${RUBY_ARCH_DIR}") - add_custom_command(TARGET uninstall - COMMAND ${CMAKE_COMMAND} -E echo "uninstall binding ruby ok" - COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_INSTALL_PREFIX}/lib/ruby/${install_link_ruby}/libsimgrid.${LIB_EXE} - COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_INSTALL_PREFIX}/lib/ruby/${install_link_ruby}/simgrid.rb - WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}/" - ) -endif(HAVE_RUBY) - ################################################################ ## Build a sain "make dist" target to build a source package ### ## containing only the files that I explicitely state ### @@ -204,6 +177,7 @@ add_custom_target(dist-dir COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_HOME_DIRECTORY}/doc/html/ simgrid-${release_version}/doc/html/ ) add_dependencies(dist-dir simgrid_documentation) +add_dependencies(dist-dir maintainer_files) set(dirs_in_tarball "") foreach(file ${source_to_pack}) @@ -227,6 +201,11 @@ foreach(file ${source_to_pack}) TARGET dist-dir COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/${file} simgrid-${release_version}/${file_location}/ ) + + add_custom_command( + TARGET dist-dir + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Makefile.default simgrid-${release_version}/Makefile + ) endforeach(file ${source_to_pack}) ###################################### @@ -338,12 +317,27 @@ WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}" ### Fill in the "make sync-gforge" target ### ############################################# -add_custom_target(sync-gforge +add_custom_target(sync-gforge-doc COMMAND chmod g+rw -R doc/ COMMAND chmod a+rX -R doc/ COMMAND rsync --verbose --cvs-exclude --compress --delete --delete-excluded --rsh=ssh --ignore-times --recursive --links --perms --times --omit-dir-times doc/html/ scm.gforge.inria.fr:/home/groups/simgrid/htdocs/doc/ || true COMMAND scp doc/index.php doc/webcruft/robots.txt scm.gforge.inria.fr:/home/groups/simgrid/htdocs/ -COMMAND scp doc/html/simgrid_modules2.png doc/html/simgrid_modules.png doc/webcruft/simgrid_logo.png doc/webcruft/simgrid_logo_small.png scm.gforge.inria.fr:/home/groups/simgrid/htdocs/ +COMMAND scp doc/html/simgrid_modules2.png doc/html/simgrid_modules.png doc/webcruft/simgrid_logo.png doc/webcruft/fish.gif doc/webcruft/simgrid_logo_small.png scm.gforge.inria.fr:/home/groups/simgrid/htdocs/ +WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}" +) +add_custom_target(sync-gforge-dtd +COMMAND scp src/surf/simgrid.dtd scm.gforge.inria.fr:/home/groups/simgrid/htdocs/ +WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}" +) + +set(HOME_TEMP intra-id:/www-id/Pages_Perso_Mescal/pierre.navarro/doc/) + +add_custom_target(sync-temp-doc +COMMAND chmod g+rw -R doc/ +COMMAND chmod a+rX -R doc/ +COMMAND rsync --verbose --cvs-exclude --compress --delete --delete-excluded --rsh=ssh --ignore-times --recursive --links --perms --times --omit-dir-times doc/html/ ${HOME_TEMP} || true +COMMAND scp doc/index.php doc/webcruft/robots.txt ${HOME_TEMP} +COMMAND scp doc/html/simgrid_modules2.png doc/html/simgrid_modules.png doc/webcruft/simgrid_logo.png doc/webcruft/fish.gif doc/webcruft/simgrid_logo_small.png ${HOME_TEMP} WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}" )