X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/eb121f444cbfc4be8dbeba38c2c23da09d2ca736..6e31bb477ffc836d630ada9793873dab17243622:/buildtools/Cmake/GenerateDoc.cmake diff --git a/buildtools/Cmake/GenerateDoc.cmake b/buildtools/Cmake/GenerateDoc.cmake index 308831cfb8..e478ee18d5 100644 --- a/buildtools/Cmake/GenerateDoc.cmake +++ b/buildtools/Cmake/GenerateDoc.cmake @@ -1,3 +1,5 @@ +#### Generate the html documentation + if(BIBTEX2HTML) set(BIBTEX2HTML_PATH ${BIBTEX2HTML}) else(BIBTEX2HTML) @@ -45,9 +47,7 @@ if(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTOOL_PATH AND BIBTEX2HTML_PATH AND ICONV ADD_CUSTOM_TARGET(simgrid_documentation COMMENT "Generating the SimGrid documentation..." - DEPENDS ${DOC_SOURCES} ${DOC_FIGS} ${source_doxygen} - COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_HOME_DIRECTORY}/doc/html - COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/doc/html + DEPENDS ${DOC_SOURCES} ${DOC_FIGS} ${source_doxygen} ${DOC_bib} COMMAND ${FIG2DEV_PATH}/fig2dev -Lmap ${CMAKE_HOME_DIRECTORY}/doc/fig/simgrid_modules.fig | perl -pe 's/imagemap/simgrid_modules/g'| perl -pe 's/ ${CMAKE_HOME_DIRECTORY}/doc/simgrid_modules.map WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc ) @@ -93,9 +93,9 @@ if(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTOOL_PATH AND BIBTEX2HTML_PATH AND ICONV COMMAND ${CMAKE_COMMAND} -E echo "XX Post-processing Doxygen result" COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/doc/html/dir* - COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/index_php.pl index.php.in html/index.html index.php COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/doxygen_postprocesser.pl - + COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/index_php.pl index.php.in html/index.html index.php + COMMAND ${CMAKE_COMMAND} -E echo "XX Create shortcuts pages" COMMAND ${CMAKE_COMMAND} -E echo \"\" > ${CMAKE_HOME_DIRECTORY}/doc/html/gras.html COMMAND ${CMAKE_COMMAND} -E echo \"


Grid Reality And Simulation.

\" >> ${CMAKE_HOME_DIRECTORY}/doc/html/gras.html @@ -111,33 +111,27 @@ if(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTOOL_PATH AND BIBTEX2HTML_PATH AND ICONV WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/ ) - - ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_HOME_DIRECTORY}/doc/publis_count.html - DEPENDS all.bib - COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/bibtex2html_table_count.pl < ${CMAKE_HOME_DIRECTORY}/doc/all.bib > ${CMAKE_HOME_DIRECTORY}/doc/publis_count.html - ) - add_dependencies(simgrid_documentation ${CMAKE_HOME_DIRECTORY}/doc/publis_count.html) - - ADD_CUSTOM_COMMAND( - OUTPUT publis_core.bib publis_extern.bib publis_intra.bib - DEPENDS all.bib - - COMMAND ${BIBTOOL_PATH}/bibtool -- 'select.by.string={category "core"}' -- 'preserve.key.case={on}' -- 'preserve.keys={on}' ${CMAKE_HOME_DIRECTORY}/doc/all.bib -o ${CMAKE_HOME_DIRECTORY}/doc/publis_core.bib - COMMAND ${BIBTOOL_PATH}/bibtool -- 'select.by.string={category "extern"}' -- 'preserve.key.case={on}' -- 'preserve.keys={on}' ${CMAKE_HOME_DIRECTORY}/doc/all.bib -o ${CMAKE_HOME_DIRECTORY}/doc/publis_extern.bib - COMMAND ${BIBTOOL_PATH}/bibtool -- 'select.by.string={category "intra"}' -- 'preserve.key.case={on}' -- 'preserve.keys={on}' ${CMAKE_HOME_DIRECTORY}/doc/all.bib -o ${CMAKE_HOME_DIRECTORY}/doc/publis_intra.bib - ) + ADD_CUSTOM_TARGET(bib_files + DEPENDS ${CMAKE_HOME_DIRECTORY}/doc/all.bib + COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_HOME_DIRECTORY}/doc/html + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/doc/html + COMMAND ${CMAKE_COMMAND} -E echo "XX Generate publis_core.bib publis_extern.bib publis_intra.bib" + COMMAND ${BIBTOOL_PATH}/bibtool -- 'select.by.string={category \"core\"}' -- 'preserve.key.case={on}' -- 'preserve.keys={on}' all.bib -o publis_core.bib + COMMAND ${BIBTOOL_PATH}/bibtool -- 'select.by.string={category \"extern\"}' -- 'preserve.key.case={on}' -- 'preserve.keys={on}' all.bib -o publis_extern.bib + COMMAND ${BIBTOOL_PATH}/bibtool -- 'select.by.string={category \"intra\"}' -- 'preserve.key.case={on}' -- 'preserve.keys={on}' all.bib -o publis_intra.bib - foreach(file "publis_core publis_extern publis_intra") - ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_HOME_DIRECTORY}/doc/${file}.html - DEPENDS "${file}.bib" + COMMAND ${CMAKE_COMMAND} -E echo "XX Generate publis_count.html" + COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/bibtex2html_table_count.pl < ${CMAKE_HOME_DIRECTORY}/doc/all.bib > ${CMAKE_HOME_DIRECTORY}/doc/publis_count.html - COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/bibtex2html_wrapper.pl ${file} - ) + COMMAND ${CMAKE_COMMAND} -E echo "XX Generate publis_core.html publis_extern.html publis_intra.html" + COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/bibtex2html_wrapper.pl publis_core + COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/bibtex2html_wrapper.pl publis_extern + COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/bibtex2html_wrapper.pl publis_intra + + WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/ + ) - add_dependencies(simgrid_documentation ${CMAKE_HOME_DIRECTORY}/doc/${file}.html) - endforeach(file "publis_core publis_extern publis_intra") + add_dependencies(simgrid_documentation bib_files) else(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTOOL_PATH AND BIBTEX2HTML_PATH AND ICONV_PATH AND GOOD_BIBTEX2HTML_VERSION) @@ -148,7 +142,10 @@ else(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTOOL_PATH AND BIBTEX2HTML_PATH AND ICO if(NOT GOOD_BIBTEX2HTML_VERSION) # wrong version ADD_CUSTOM_COMMAND(TARGET simgrid_documentation COMMAND ${CMAKE_COMMAND} -E echo "This is not the good bibtex2html program !!!" - COMMAND ${CMAKE_COMMAND} -E echo "You can download it from : ftp://ftp-sop.inria.fr/epidaure/Softs/bibtex2html/bibtex2html-1.02.tar.gz" + COMMAND ${CMAKE_COMMAND} -E echo "You can download it from:" + COMMAND ${CMAKE_COMMAND} -E echo " ftp://ftp-sop.inria.fr/epidaure/Softs/bibtex2html/bibtex2html-1.02.tar.gz" + COMMAND ${CMAKE_COMMAND} -E echo "There is also an unofficial Debian/Ubuntu package, see:" + COMMAND ${CMAKE_COMMAND} -E echo " http://www.loria.fr/~lnussbau/bibtex2html/README" ) endif(NOT GOOD_BIBTEX2HTML_VERSION) @@ -159,7 +156,8 @@ else(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTOOL_PATH AND BIBTEX2HTML_PATH AND ICO COMMAND ${CMAKE_COMMAND} -E echo "BIBTEX2HTML_PATH = ${BIBTEX2HTML_PATH}" COMMAND ${CMAKE_COMMAND} -E echo "ICONV_PATH = ${ICONV_PATH}" COMMAND ${CMAKE_COMMAND} -E echo "IN ORDER TO GENERATE THE DOCUMENTATION YOU NEED ALL TOOLS !!!" - COMMAND FAIL TO MAKE SIMGRID DOCUMENTATION see previous messages for details ... + COMMAND ${CMAKE_COMMAND} -E echo "FAIL TO MAKE SIMGRID DOCUMENTATION see previous messages for details ..." + COMMAND false ) @@ -168,9 +166,27 @@ endif(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTOOL_PATH AND BIBTEX2HTML_PATH AND IC ##############################################################################" message(STATUS "Check individual TOCs") -file(GLOB_RECURSE LISTE_GTUT - "${CMAKE_HOME_DIRECTORY}/doc/gtut-tour-*.doc" +set(LISTE_GTUT + doc/gtut-tour-00-install.doc + doc/gtut-tour-01-bones.doc + doc/gtut-tour-02-simple.doc + doc/gtut-tour-03-args.doc + doc/gtut-tour-04-callback.doc + doc/gtut-tour-05-globals.doc + doc/gtut-tour-06-logs.doc + doc/gtut-tour-07-timers.doc + doc/gtut-tour-08-exceptions.doc + doc/gtut-tour-09-simpledata.doc + doc/gtut-tour-10-rpc.doc + doc/gtut-tour-11-explicitwait.doc + doc/gtut-tour-recap-messages.doc + doc/gtut-tour-12-staticstruct.doc + doc/gtut-tour-13-pointers.doc + doc/gtut-tour-14-dynar.doc + doc/gtut-tour-15-manualdatadef.doc + doc/gtut-tour-16-exchangecb.doc ) + foreach(file_name ${LISTE_GTUT}) file(REMOVE ${CMAKE_HOME_DIRECTORY}/doc/tmp.curtoc) file(REMOVE ${CMAKE_HOME_DIRECTORY}/doc/tmp.realtoc) @@ -179,7 +195,8 @@ foreach(file_name ${LISTE_GTUT}) string(REGEX MATCH "Table of Contents.*
" valeur_line "${file_content}") string(REPLACE "\n" ";" valeur_line "${valeur_line}") string(REPLACE "\n" ";" file_content "${file_content}") - + + file(APPEND ${CMAKE_HOME_DIRECTORY}/doc/tmp.realtoc "\n") # make sure it exists foreach(line ${file_content}) string(REGEX MATCH "[\\]s?u?b?s?u?b?section.*" line2 "${line}") string(REGEX MATCH ".*_toc.*" line3 "${line}") @@ -195,6 +212,7 @@ foreach(file_name ${LISTE_GTUT}) endif(line2 AND NOT line3) endforeach(line ${file_content}) + file(APPEND ${CMAKE_HOME_DIRECTORY}/doc/tmp.curtoc "\n") # make sure it exists foreach(line ${valeur_line}) string(REGEX MATCH ".*ref.*" line_ok ${line}) if(line_ok) @@ -260,4 +278,4 @@ else(compare_files) file(REMOVE ${CMAKE_HOME_DIRECTORY}/doc/tmp.realtoc) endif(compare_files) -file(REMOVE ${CMAKE_HOME_DIRECTORY}/doc/tmp.curtoc) \ No newline at end of file +file(REMOVE ${CMAKE_HOME_DIRECTORY}/doc/tmp.curtoc)