Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Initial commit for split doc (in order to let Pierre play with it). Please do not...
[simgrid.git] / buildtools / Cmake / Distrib.cmake
1 #########################################
2 ### Fill in the "make install" target ###
3 #########################################
4           
5 # doc
6 if(NOT EXISTS ${CMAKE_HOME_DIRECTORY}/doc/ref_guide/html/)
7         file(MAKE_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/ref_guide/html/)
8 endif(NOT EXISTS ${CMAKE_HOME_DIRECTORY}/doc/ref_guide/html/)
9
10 if(NOT EXISTS ${CMAKE_HOME_DIRECTORY}/doc/user_guide/html/)
11         file(MAKE_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/user_guide/html/)
12 endif(NOT EXISTS ${CMAKE_HOME_DIRECTORY}/doc/user_guide/html/)
13
14
15 install(DIRECTORY "${CMAKE_HOME_DIRECTORY}/doc/ref_guide/html/"
16   DESTINATION "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/doc/simgrid/ref_guide/html/"
17   PATTERN ".svn" EXCLUDE 
18   PATTERN ".git" EXCLUDE 
19   PATTERN "*.o" EXCLUDE
20   PATTERN "*~" EXCLUDE
21 )
22
23
24 install(DIRECTORY "${CMAKE_HOME_DIRECTORY}/doc/user_guide/html/"
25   DESTINATION "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/doc/simgrid/user_guide/html/"
26   PATTERN ".svn" EXCLUDE 
27   PATTERN ".git" EXCLUDE 
28   PATTERN "*.o" EXCLUDE
29   PATTERN "*~" EXCLUDE
30 )
31
32 #### Generate the manpages
33 if(NOT WIN32)
34 if( NOT MANPAGE_DIR)
35         set( MANPAGE_DIR ${CMAKE_BINARY_DIR}/manpages )
36 endif( NOT MANPAGE_DIR)
37
38 add_custom_target(manpages ALL
39         COMMAND ${CMAKE_COMMAND} -E make_directory ${MANPAGE_DIR}
40         COMMAND pod2man ${CMAKE_HOME_DIRECTORY}/tools/simgrid_update_xml.pl > ${MANPAGE_DIR}/simgrid_update_xml.1
41         COMMENT "Generating manpages"
42 )
43 install(FILES ${MANPAGE_DIR}/simgrid_update_xml.1
44         DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/share/man/man1)
45
46 endif(NOT WIN32)
47
48 # binaries
49 install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/smpicc
50                  ${CMAKE_BINARY_DIR}/bin/smpif2c
51                  ${CMAKE_BINARY_DIR}/bin/smpiff
52                  ${CMAKE_BINARY_DIR}/bin/smpirun
53                 DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/)
54
55 install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/tesh
56 DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/)
57
58 install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/graphicator
59 DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/)
60         
61 install(PROGRAMS ${CMAKE_HOME_DIRECTORY}/tools/MSG_visualization/colorize.pl
62         DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/
63                 RENAME simgrid-colorizer)
64                 
65 add_custom_target(simgrid-colorizer ALL
66 COMMENT "Install ${CMAKE_BINARY_DIR}/bin/colorize"
67 COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/tools/MSG_visualization/colorize.pl ${CMAKE_BINARY_DIR}/bin/colorize
68 )
69                                 
70 install(PROGRAMS ${CMAKE_HOME_DIRECTORY}/tools/simgrid_update_xml.pl
71                 DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/
72                 RENAME simgrid_update_xml)
73                 
74 add_custom_target(simgrid_update_xml ALL
75 COMMENT "Install ${CMAKE_BINARY_DIR}/bin/simgrid_update_xml"
76 COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/tools/simgrid_update_xml.pl ${CMAKE_BINARY_DIR}/bin/simgrid_update_xml
77 )
78                 
79 install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/gras_stub_generator
80                 DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/)
81
82 # libraries
83 install(TARGETS simgrid gras 
84         DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/)
85         
86 if(enable_smpi) 
87   install(TARGETS smpi
88           DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/)
89 endif(enable_smpi)
90
91 if(enable_lib_static AND NOT WIN32)
92         install(TARGETS simgrid_static 
93                 DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/)
94         if(enable_smpi) 
95                 install(TARGETS smpi_static
96                         DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/)
97         endif(enable_smpi)
98 endif(enable_lib_static AND NOT WIN32)
99
100 # include files
101 set(HEADERS
102     ${headers_to_install}
103     ${generated_headers_to_install}
104     )
105 foreach(file ${HEADERS})
106   get_filename_component(location ${file} PATH)
107   string(REPLACE "${CMAKE_CURRENT_BINARY_DIR}/" "" location "${location}")
108   install(FILES ${file}
109           DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${location})
110 endforeach(file ${HEADERS})
111
112 # example files
113 foreach(file ${examples_to_install})
114   string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/examples/" "" file ${file})
115   get_filename_component(location ${file} PATH)
116   install(FILES "examples/${file}"
117           DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/doc/simgrid/examples/${location})
118 endforeach(file ${examples_to_install})
119
120 # bindings cruft
121
122 if(HAVE_LUA)
123         file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/lib/lua/5.1")
124         add_custom_target(simgrid_lua ALL
125                 DEPENDS simgrid 
126                                 ${CMAKE_BINARY_DIR}/lib/lua/5.1/simgrid.${LIB_EXE}
127                 )
128         add_custom_command(
129                 OUTPUT ${CMAKE_BINARY_DIR}/lib/lua/5.1/simgrid.${LIB_EXE}
130                 COMMAND ${CMAKE_COMMAND} -E create_symlink ../../libsimgrid.${LIB_EXE} ${CMAKE_BINARY_DIR}/lib/lua/5.1/simgrid.${LIB_EXE}
131         )
132         install(FILES ${CMAKE_BINARY_DIR}/lib/lua/5.1/simgrid.${LIB_EXE}
133                 DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/lua/5.1
134                 )
135 endif(HAVE_LUA)
136
137 ###########################################
138 ### Fill in the "make uninstall" target ###
139 ###########################################
140
141 add_custom_target(uninstall
142 COMMAND ${CMAKE_COMMAND} -E     remove_directory ${CMAKE_INSTALL_PREFIX}/doc/simgrid
143 COMMAND ${CMAKE_COMMAND} -E     echo "uninstall doc ok"
144 COMMAND ${CMAKE_COMMAND} -E     remove -f ${CMAKE_INSTALL_PREFIX}/lib/libgras*
145 COMMAND ${CMAKE_COMMAND} -E     remove -f ${CMAKE_INSTALL_PREFIX}/lib/libsimgrid*
146 COMMAND ${CMAKE_COMMAND} -E     remove -f ${CMAKE_INSTALL_PREFIX}/lib/libsmpi*
147 COMMAND ${CMAKE_COMMAND} -E     echo "uninstall lib ok"
148 COMMAND ${CMAKE_COMMAND} -E     remove -f ${CMAKE_INSTALL_PREFIX}/bin/smpicc
149 COMMAND ${CMAKE_COMMAND} -E     remove -f ${CMAKE_INSTALL_PREFIX}/bin/smpif2c
150 COMMAND ${CMAKE_COMMAND} -E     remove -f ${CMAKE_INSTALL_PREFIX}/bin/smpiff
151 COMMAND ${CMAKE_COMMAND} -E     remove -f ${CMAKE_INSTALL_PREFIX}/bin/smpirun
152 COMMAND ${CMAKE_COMMAND} -E     remove -f ${CMAKE_INSTALL_PREFIX}/bin/tesh
153 COMMAND ${CMAKE_COMMAND} -E     remove -f ${CMAKE_INSTALL_PREFIX}/bin/simgrid-colorizer
154 COMMAND ${CMAKE_COMMAND} -E     remove -f ${CMAKE_INSTALL_PREFIX}/bin/simgrid_update_xml
155 COMMAND ${CMAKE_COMMAND} -E     remove -f ${CMAKE_INSTALL_PREFIX}/bin/gras_stub_generator
156 COMMAND ${CMAKE_COMMAND} -E     remove -f ${CMAKE_INSTALL_PREFIX}/bin/graphicator
157 COMMAND ${CMAKE_COMMAND} -E     echo "uninstall bin ok"
158 COMMAND ${CMAKE_COMMAND} -E     remove_directory ${CMAKE_INSTALL_PREFIX}/include/amok
159 COMMAND ${CMAKE_COMMAND} -E     remove_directory ${CMAKE_INSTALL_PREFIX}/include/gras
160 COMMAND ${CMAKE_COMMAND} -E     remove_directory ${CMAKE_INSTALL_PREFIX}/include/instr
161 COMMAND ${CMAKE_COMMAND} -E     remove_directory ${CMAKE_INSTALL_PREFIX}/include/msg 
162 COMMAND ${CMAKE_COMMAND} -E     remove_directory ${CMAKE_INSTALL_PREFIX}/include/simdag
163 COMMAND ${CMAKE_COMMAND} -E     remove_directory ${CMAKE_INSTALL_PREFIX}/include/smpi
164 COMMAND ${CMAKE_COMMAND} -E     remove_directory ${CMAKE_INSTALL_PREFIX}/include/simix
165 COMMAND ${CMAKE_COMMAND} -E     remove_directory ${CMAKE_INSTALL_PREFIX}/include/surf
166 COMMAND ${CMAKE_COMMAND} -E     remove_directory ${CMAKE_INSTALL_PREFIX}/include/xbt
167 COMMAND ${CMAKE_COMMAND} -E     remove_directory ${CMAKE_INSTALL_PREFIX}/include/mc
168 COMMAND ${CMAKE_COMMAND} -E     remove_directory ${CMAKE_INSTALL_PREFIX}/include/simgrid
169 COMMAND ${CMAKE_COMMAND} -E     remove -f ${CMAKE_INSTALL_PREFIX}/include/simgrid_config.h
170 COMMAND ${CMAKE_COMMAND} -E     remove -f ${CMAKE_INSTALL_PREFIX}/include/gras.h 
171 COMMAND ${CMAKE_COMMAND} -E     remove -f ${CMAKE_INSTALL_PREFIX}/include/xbt.h
172 COMMAND ${CMAKE_COMMAND} -E     echo "uninstall include ok"
173 COMMAND ${CMAKE_COMMAND} -E     remove -f ${CMAKE_INSTALL_PREFIX}/share/man/man1/simgrid_update_xml.1
174 COMMAND ${CMAKE_COMMAND} -E     echo "uninstall man ok"
175 WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}"
176 )
177
178 if(HAVE_LUA)
179         add_custom_command(TARGET uninstall
180         COMMAND ${CMAKE_COMMAND} -E echo "uninstall binding lua ok"
181         COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_INSTALL_PREFIX}/lib/lua/5.1/simgrid.${LIB_EXE}
182         WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}/"
183         )
184 endif(HAVE_LUA)
185
186 ################################################################
187 ## Build a sain "make dist" target to build a source package ###
188 ##   containing only the files that I explicitely state      ###
189 ##   (instead of any cruft laying on my disk as CPack does)  ###
190 ################################################################
191
192 # This is the complete list of what will be added to the source archive
193 set(source_to_pack  
194   ${headers_to_install}
195   ${source_of_generated_headers}
196   ${XBT_RL_SRC}
197   ${EXTRA_DIST}
198   ${SMPI_SRC}
199   ${GRAS_RL_SRC}
200   ${XBT_SRC}
201   ${GTNETS_SRC}
202   ${NS3_SRC}
203   ${SURF_SRC}
204   ${SIMIX_SRC}
205   ${TRACING_SRC}
206   ${MSG_SRC}
207   ${SIMDAG_SRC}
208   ${GRAS_COMMON_SRC}
209   ${GRAS_SG_SRC}
210   ${AMOK_SRC}
211   ${LUA_SRC}
212   ${MC_SRC}
213   ${JEDULE_SRC}
214   ${RNGSTREAM_SRC}
215   ${BINDINGS_FILES}
216   ${CMAKE_SOURCE_FILES}
217   ${EXAMPLES_CMAKEFILES_TXT}
218   ${TESHSUITE_CMAKEFILES_TXT}
219   ${TOOLS_CMAKEFILES_TXT}
220   ${TESTSUITE_CMAKEFILES_TXT}
221   ${DOC_SOURCES}
222   ${DOC_FIGS}
223   ${README_files}
224   ${xml_files}
225   ${tesh_files}
226   ${txt_files}
227   ${bin_files}
228   ${examples_src}
229   ${teshsuite_src}
230   ${tools_src}
231   ${testsuite_src}
232   ${PLATFORMS_EXAMPLES}
233 )
234
235 ##########################################
236 ### Fill in the "make dist-dir" target ###
237 ##########################################
238
239 add_custom_target(dist-dir
240   COMMENT "Generating the distribution directory"
241   COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_NAME}-${release_version}/
242   COMMAND ${CMAKE_COMMAND} -E remove ${PROJECT_NAME}-${release_version}.tar.gz
243   COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_NAME}-${release_version}
244   COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_NAME}-${release_version}/doc/user_guide/html/
245   COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_NAME}-${release_version}/doc/ref_guide/html/
246   COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_HOME_DIRECTORY}/doc/user_guide/html/ ${PROJECT_NAME}-${release_version}/doc/user_guide/html/
247   COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_HOME_DIRECTORY}/doc/ref_guide/html/ ${PROJECT_NAME}-${release_version}/doc/ref_guide/html/
248 )
249 add_dependencies(dist-dir simgrid_documentation)
250 add_dependencies(dist-dir maintainer_files)
251
252 set(dirs_in_tarball "")
253 foreach(file ${source_to_pack})
254   #message(${file})
255   # This damn prefix is still set somewhere (seems to be in subdirs)
256   string(REPLACE "${CMAKE_HOME_DIRECTORY}/" "" file "${file}")
257   
258   # Create the directory on need
259   get_filename_component(file_location ${file} PATH)
260   string(REGEX MATCH ";${file_location};" OPERATION "${dirs_in_tarball}")
261   if(NOT OPERATION)
262     set(dirs_in_tarball "${dirs_in_tarball};${file_location};")
263     add_custom_command(
264       TARGET dist-dir
265       COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_NAME}-${release_version}/${file_location}/
266     )
267   endif(NOT OPERATION)
268   
269   # Actually copy the file
270   add_custom_command(
271     TARGET dist-dir
272     COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/${file} ${PROJECT_NAME}-${release_version}/${file_location}/
273   )
274   
275   add_custom_command(
276     TARGET dist-dir
277     COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/Makefile.default ${PROJECT_NAME}-${release_version}/Makefile
278   )
279 endforeach(file ${source_to_pack})
280
281 ######################################
282 ### Fill in the "make dist" target ###
283 ######################################
284
285 add_custom_target(dist
286   COMMENT "Removing the distribution directory"
287   DEPENDS ${CMAKE_BINARY_DIR}/${PROJECT_NAME}-${release_version}.tar.gz
288   COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_NAME}-${release_version}/
289 )
290
291 add_custom_command(
292         OUTPUT ${CMAKE_BINARY_DIR}/${PROJECT_NAME}-${release_version}.tar.gz    
293         COMMENT "Compressing the archive from the distribution directory"
294         COMMAND ${CMAKE_COMMAND} -E tar cf ${PROJECT_NAME}-${release_version}.tar ${PROJECT_NAME}-${release_version}/
295         COMMAND gzip -9v ${PROJECT_NAME}-${release_version}.tar
296         COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_NAME}-${release_version}/
297 )
298 add_dependencies(dist dist-dir)
299
300 if(NOT enable_maintainer_mode)
301   add_custom_target(echo-dist
302     COMMAND ${CMAKE_COMMAND} -E echo "WARNING: ----------------------------------------------------"
303     COMMAND ${CMAKE_COMMAND} -E echo "WARNING: Distrib is generated without option maintainer mode "
304     COMMAND ${CMAKE_COMMAND} -E echo "WARNING: ----------------------------------------------------"
305   )
306    add_dependencies(dist echo-dist)
307 endif(NOT enable_maintainer_mode)
308
309 ###########################################
310 ### Fill in the "make distcheck" target ###
311 ###########################################
312
313 set(CMAKE_BINARY_TEST_DIR ${CMAKE_BINARY_DIR})
314
315 # Allow to test the "make dist"
316 add_custom_target(distcheck
317   COMMAND ${CMAKE_COMMAND} -E echo "XXX remove old copy"
318   COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_TEST_DIR}/${PROJECT_NAME}-${release_version} 
319
320   COMMAND ${CMAKE_COMMAND} -E echo "XXX Untar distrib"
321   COMMAND ${CMAKE_COMMAND} -E tar  xf ${CMAKE_BINARY_TEST_DIR}/${PROJECT_NAME}-${release_version}.tar.gz ${CMAKE_BINARY_TEST_DIR}/${PROJECT_NAME}-${release_version}
322
323   COMMAND ${CMAKE_COMMAND} -E echo "XXX create build and install subtrees"
324   COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_TEST_DIR}/${PROJECT_NAME}-${release_version}/_build
325   COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_TEST_DIR}/${PROJECT_NAME}-${release_version}/_inst
326    
327   COMMAND ${CMAKE_COMMAND} -E echo "XXX Configure"
328   COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_TEST_DIR}/${PROJECT_NAME}-${release_version}/_build 
329           ${CMAKE_COMMAND} 
330           -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_TEST_DIR}/${PROJECT_NAME}-${release_version}/_inst 
331           -Denable_lua=ON
332           -Denable_model-checking=ON
333           ..
334   COMMAND ${CMAKE_COMMAND} -E echo "XXX Build"
335   COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_TEST_DIR}/${PROJECT_NAME}-${release_version}/_build ${CMAKE_MAKE_PROGRAM}
336
337   COMMAND ${CMAKE_COMMAND} -E echo "XXX Test"
338   COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_TEST_DIR}/${PROJECT_NAME}-${release_version}/_build ctest || true
339
340   COMMAND ${CMAKE_COMMAND} -E echo "XXX Install"
341   COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_TEST_DIR}/${PROJECT_NAME}-${release_version}/_build ${CMAKE_MAKE_PROGRAM} install
342   COMMAND ${CMAKE_COMMAND} -E create_symlink 
343                             ${CMAKE_BINARY_TEST_DIR}/${PROJECT_NAME}-${release_version}/_inst/lib/libsimgrid.so
344                             ${CMAKE_BINARY_TEST_DIR}/${PROJECT_NAME}-${release_version}/_inst/lib/libsimgridtest.so
345
346   COMMAND ${CMAKE_COMMAND} -E echo "XXX Remove temp directories"
347   COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_TEST_DIR}/${PROJECT_NAME}-${release_version}
348 )
349 #add_dependencies(distcheck dist)
350
351 #######################################
352 ### Fill in the "make check" target ###
353 #######################################
354
355 if(enable_memcheck)
356         add_custom_target(check
357         COMMAND ctest -D ExperimentalMemCheck
358         )
359 else(enable_memcheck)
360         add_custom_target(check
361         COMMAND make test
362         )
363 endif(enable_memcheck)
364
365 #######################################
366 ### Fill in the "make xxx-clean" target ###
367 #######################################
368
369 add_custom_target(maintainer-clean
370 COMMAND ${CMAKE_COMMAND} -E remove -f src/config_unit.c
371 COMMAND ${CMAKE_COMMAND} -E remove -f src/cunit_unit.c
372 COMMAND ${CMAKE_COMMAND} -E remove -f src/dict_unit.c
373 COMMAND ${CMAKE_COMMAND} -E remove -f src/dynar_unit.c
374 COMMAND ${CMAKE_COMMAND} -E remove -f src/ex_unit.c
375 COMMAND ${CMAKE_COMMAND} -E remove -f src/set_unit.c
376 COMMAND ${CMAKE_COMMAND} -E remove -f src/simgrid_units_main.c
377 COMMAND ${CMAKE_COMMAND} -E remove -f src/swag_unit.c
378 COMMAND ${CMAKE_COMMAND} -E remove -f src/xbt_sha_unit.c
379 COMMAND ${CMAKE_COMMAND} -E remove -f src/xbt_str_unit.c
380 COMMAND ${CMAKE_COMMAND} -E remove -f src/xbt_strbuff_unit.c
381 COMMAND ${CMAKE_COMMAND} -E remove -f src/xbt_synchro_unit.c
382 WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}"
383 )
384
385 add_custom_target(supernovae-clean
386 COMMAND ${CMAKE_COMMAND} -E remove -f src/supernovae_gras.c
387 COMMAND ${CMAKE_COMMAND} -E remove -f src/supernovae_sg.c
388 COMMAND ${CMAKE_COMMAND} -E remove -f src/supernovae_smpi.c
389 WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}"
390 )
391
392 #############################################
393 ### Fill in the "make sync-gforge" target ###
394 #############################################
395
396 ### TODO: LBO: CHECK IF CORRECT
397 add_custom_target(sync-gforge-doc
398 COMMAND chmod g+rw -R doc/
399 COMMAND chmod a+rX -R doc/
400 COMMAND ssh scm.gforge.inria.fr mkdir /home/groups/simgrid/htdocs/simgrid/${release_version}/ || true 
401 COMMAND rsync --verbose --cvs-exclude --compress --delete --delete-excluded --rsh=ssh --ignore-times --recursive --links --perms --times --omit-dir-times 
402 doc/user_guide/html/ scm.gforge.inria.fr:/home/groups/simgrid/htdocs/simgrid/${release_version}/doc/user_guide || true
403 COMMAND rsync --verbose --cvs-exclude --compress --delete --delete-excluded --rsh=ssh --ignore-times --recursive --links --perms --times --omit-dir-times 
404 doc/ref_guide/html/ scm.gforge.inria.fr:/home/groups/simgrid/htdocs/simgrid/${release_version}/doc/ref_guide || true
405 COMMAND scp doc/user_guide/html/simgrid_modules2.png doc/user_guide/html/simgrid_modules.png doc/webcruft/simgrid_logo_2011.png  doc/webcruft/simgrid_logo_small.png scm.gforge.inria.fr:/home/groups/simgrid/htdocs/simgrid/${release_version}/
406 WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}"
407 )
408 add_dependencies(sync-gforge-doc user_guide)
409 add_dependencies(sync-gforge-doc ref_guide)
410
411 add_custom_target(sync-gforge-dtd
412 COMMAND scp src/surf/simgrid.dtd scm.gforge.inria.fr:/home/groups/simgrid/htdocs/simgrid/${release_version}/simgrid.dtd
413 COMMAND scp src/surf/simgrid.dtd scm.gforge.inria.fr:/home/groups/simgrid/htdocs/simgrid.dtd
414 WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}"
415 )
416
417 #PIPOL
418 add_custom_target(sync-pipol
419 COMMAND scp -r Experimental_bindings.sh Experimental.sh  MemCheck.sh pre-simgrid.sh navarro@pipol.inria.fr:~/
420 COMMAND scp -r rc.* navarro@pipol.inria.fr:~/.pipol/
421 COMMAND scp -r Nightly* navarro@pipol.inria.fr:~/.pipol/nightly
422 COMMAND ssh navarro@pipol.inria.fr "chmod a=rwx ~/* ~/.pipol/rc.* ~/.pipol/nightly/*"
423 WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}/buildtools/pipol/"
424 )
425
426 include(CPack)