Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add dependency for sync website and documentation.
[simgrid.git] / buildtools / Cmake / Distrib.cmake
index 8bc0770..411f1ff 100644 (file)
@@ -14,6 +14,17 @@ 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
@@ -67,16 +78,20 @@ 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})
@@ -99,25 +114,6 @@ if(HAVE_LUA)
                )
 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 ###
 ###########################################
@@ -162,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      ###
@@ -191,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})
@@ -330,14 +317,37 @@ 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 src/surf/simgrid.dtd scm.gforge.inria.fr:/home/groups/simgrid/htdocs/
+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/${release_version}/doc/ || true
+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/${release_version}/
+WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}"
+)
+add_dependencies(sync-gforge-doc simgrid_documentation)
+
+add_custom_target(sync-gforge-dtd
+COMMAND scp src/surf/simgrid.dtd scm.gforge.inria.fr:/home/groups/simgrid/htdocs/${release_version}/
 WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}"
 )
 
+#doc/index.php doc/webcruft/robots.txt doc/webcruft/fish.gif 
+add_custom_target(sync-gforge-website
+COMMAND chmod g+rw -R website/html
+COMMAND chmod a+rX -R website/html
+COMMAND scp -r website/html/* scm.gforge.inria.fr:/home/groups/simgrid/htdocs/
+WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}"
+)
+add_dependencies(sync-gforge-website simgrid_website)
+
+#PIPOL
+add_custom_target(sync-pipol
+COMMAND scp -r Experimental_bindings.sh Experimental.sh  MemCheck.sh pre-simgrid.sh navarro@pipol.inria.fr:~/
+COMMAND scp -r rc.* navarro@pipol.inria.fr:~/.pipol/
+COMMAND scp -r Nightly* navarro@pipol.inria.fr:~/.pipol/nightly
+COMMAND ssh navarro@pipol.inria.fr "chmod a=rwx ~/* ~/.pipol/rc.* ~/.pipol/nightly/*"
+WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}/buildtools/pipol/"
+)
+
 include(CPack)