X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fa9a7c98a67969069d80299684f43a52e5a58137..3ef766de9bcfde2fa7534b57ac68253b461f4988:/buildtools/Cmake/Distrib.cmake diff --git a/buildtools/Cmake/Distrib.cmake b/buildtools/Cmake/Distrib.cmake index 4add056ca6..83af4c77bd 100644 --- a/buildtools/Cmake/Distrib.cmake +++ b/buildtools/Cmake/Distrib.cmake @@ -87,6 +87,14 @@ foreach(file ${examples_to_install_in_doc}) 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 "${PROJECT_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_JAVA) install(FILES ${CMAKE_BINARY_DIR}/simgrid.jar @@ -199,13 +207,22 @@ endif(HAVE_RUBY) ### Fill in the "make dist-dir" target ### ########################################## +if(enable_doc) add_custom_target(dist-dir + COMMENT "Generating the distribution directory" COMMAND test -e simgrid-${release_version}/ && chmod -R a+w simgrid-${release_version}/ || true COMMAND ${CMAKE_COMMAND} -E remove_directory simgrid-${release_version}/ COMMAND ${CMAKE_COMMAND} -E make_directory simgrid-${release_version} COMMAND ${CMAKE_COMMAND} -E make_directory simgrid-${release_version}/doc/html/ COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_DIRECTORY}/doc/html/ simgrid-${release_version}/doc/html/ ) +add_dependencies(dist-dir simgrid_documentation) +else(enable_doc) +add_custom_target(dist-dir + COMMAND ${CMAKE_COMMAND} -E echo "Please enable the doc to generate the doc" + COMMAND I_said_PLEASE_ENABLE_THE_DOC_GENERATION_BEFORE_BUILDING_AN_ARCHIVE +) +endif(enable_doc) set(dirs_in_tarball "") foreach(file ${source_to_pack}) @@ -240,6 +257,7 @@ add_custom_target(dist ) add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/simgrid-${release_version}.tar.gz + COMMENT "Compressing the archive from the distribution directory" COMMAND ${CMAKE_COMMAND} -E tar cf simgrid-${release_version}.tar simgrid-${release_version}/ COMMAND gzip -9v simgrid-${release_version}.tar COMMAND ${CMAKE_COMMAND} -E remove_directory simgrid-${release_version}/