From: lbobelin Date: Fri, 15 Jun 2012 07:34:10 +0000 (+0200) Subject: Initial modifications in doc. To be merged with Pierre's removal of FILE_GLOB X-Git-Tag: v3_8~563^2~18 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/1c990af7381be73a56c9bab672d425fde1861590 Initial modifications in doc. To be merged with Pierre's removal of FILE_GLOB --- diff --git a/CMakeLists.txt b/CMakeLists.txt index d5afc0abda..bf3d12a749 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -233,7 +233,8 @@ include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Pipol.cmake) ### Build the doc if(NOT WIN32) -include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/GenerateDoc.cmake) +include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/GenerateUserGuide.cmake) +include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/GenerateRefGuide.cmake) else(NOT WIN32) include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/GenerateDocWin.cmake) endif(NOT WIN32) diff --git a/buildtools/Cmake/DefinePackages.cmake b/buildtools/Cmake/DefinePackages.cmake index f09be9309f..5483f31def 100644 --- a/buildtools/Cmake/DefinePackages.cmake +++ b/buildtools/Cmake/DefinePackages.cmake @@ -658,10 +658,8 @@ set(DOC_SOURCES doc/Doxyfile.in doc/footer.html.in - tools/doxygen/doxygen_postprocesser.pl tools/doxygen/index_create.pl tools/doxygen/toc_create.pl - tools/doxygen/bibtex2html_wrapper.pl tools/doxygen/fig2dev_postprocessor.pl tools/doxygen/xbt_log_extract_hierarchy.pl ) @@ -799,7 +797,8 @@ buildtools/Cmake/Scripts/generate_memcheck_tests.pl buildtools/Cmake/MaintainerMode.cmake buildtools/Cmake/Supernovae.cmake buildtools/Cmake/Pipol.cmake -buildtools/Cmake/GenerateDoc.cmake +buildtools/Cmake/GenerateUserGuide.cmake +buildtools/Cmake/GenerateRefGuide.cmake buildtools/Cmake/test_prog/prog_getline.c buildtools/Cmake/test_prog/prog_mutex_timedlock.c buildtools/Cmake/test_prog/prog_gtnets.cpp diff --git a/buildtools/Cmake/Distrib.cmake b/buildtools/Cmake/Distrib.cmake index 34d620b302..32e8e7d499 100644 --- a/buildtools/Cmake/Distrib.cmake +++ b/buildtools/Cmake/Distrib.cmake @@ -385,7 +385,8 @@ doc/html/ scm.gforge.inria.fr:/home/groups/simgrid/htdocs/simgrid/${release_vers COMMAND scp doc/html/simgrid_modules2.png doc/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}/ WORKING_DIRECTORY "${CMAKE_HOME_DIRECTORY}" ) -add_dependencies(sync-gforge-doc simgrid_documentation) +add_dependencies(sync-gforge-doc user_guide) +add_dependencies(sync-gforge-doc ref_guide) add_custom_target(sync-gforge-dtd COMMAND scp src/surf/simgrid.dtd scm.gforge.inria.fr:/home/groups/simgrid/htdocs/simgrid/${release_version}/simgrid.dtd diff --git a/buildtools/Cmake/GenerateRefGuide.cmake b/buildtools/Cmake/GenerateRefGuide.cmake new file mode 100644 index 0000000000..97ab0c11e3 --- /dev/null +++ b/buildtools/Cmake/GenerateRefGuide.cmake @@ -0,0 +1,121 @@ +#### Generate the html documentation + +find_path(FIG2DEV_PATH NAMES fig2dev PATHS NO_DEFAULT_PATHS) +find_path(DOXYGEN_PATH NAMES doxygen PATHS NO_DEFAULT_PATHS) + + +file(GLOB_RECURSE source_doxygen + "${CMAKE_HOME_DIRECTORY}/tools/gras/*.[chl]" + "${CMAKE_HOME_DIRECTORY}/src/*.[chl]" + "${CMAKE_HOME_DIRECTORY}/include/*.[chl]" +) + + +if(DOXYGEN_PATH AND FIG2DEV_PATH) + + #DOC_SOURCE=doc/*.doc, defined in DefinePackage + set(DOCSSOURCES "${source_doxygen}\n${DOC_SOURCE}") + string(REPLACE "\n" ";" DOCSSOURCES ${DOCSSOURCES}) + + + set(DOC_PNGS + ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_2011.png + ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_small.png + ) + + configure_file(${CMAKE_HOME_DIRECTORY}/doc/Doxyfile.in ${CMAKE_HOME_DIRECTORY}/doc/Doxyfile @ONLY) + configure_file(${CMAKE_HOME_DIRECTORY}/doc/footer.html.in ${CMAKE_HOME_DIRECTORY}/doc/footer.html @ONLY) + + ADD_CUSTOM_TARGET(ref_guide + COMMENT "Generating the SimGrid ref guide..." + DEPENDS ${DOC_SOURCES} ${DOC_FIGS} ${source_doxygen} + COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_HOME_DIRECTORY}/doc/ref_guide/html + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/doc/ref_guide/html + 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 + ) + + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_HOME_DIRECTORY}/doc/logcategories.doc + DEPENDS ${source_doxygen} + COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_HOME_DIRECTORY}/doc/logcategories.doc + COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/xbt_log_extract_hierarchy.pl > ${CMAKE_HOME_DIRECTORY}/doc/logcategories.doc + WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY} + ) + + foreach(file ${DOC_FIGS}) + string(REPLACE ".fig" ".png" tmp_file ${file}) + string(REPLACE "${CMAKE_HOME_DIRECTORY}/doc/fig/" "${CMAKE_HOME_DIRECTORY}/doc/html/" tmp_file ${tmp_file}) + ADD_CUSTOM_COMMAND(TARGET ref_guide + COMMAND ${FIG2DEV_PATH}/fig2dev -Lpng -S 4 ${file} ${tmp_file} + ) + endforeach(file ${DOC_FIGS}) + + foreach(file ${DOC_PNGS}) + ADD_CUSTOM_COMMAND(TARGET ref_guide + COMMAND ${CMAKE_COMMAND} -E copy ${file} ${CMAKE_HOME_DIRECTORY}/doc/html/ + ) + endforeach(file ${DOC_PNGS}) + + ADD_CUSTOM_COMMAND(TARGET ref_guide + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/doc/simgrid.css ${CMAKE_HOME_DIRECTORY}/doc/html/ + ) + + ADD_CUSTOM_COMMAND(TARGET ref_guide + COMMAND ${CMAKE_COMMAND} -E echo "XX First Doxygen pass" + COMMAND ${DOXYGEN_PATH}/doxygen Doxyfile + COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/index_create.pl simgrid.tag index-API.doc + + COMMAND ${CMAKE_COMMAND} -E echo "XX Second Doxygen pass" + COMMAND ${DOXYGEN_PATH}/doxygen Doxyfile + + COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/doc/html/dir* + + 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 + + COMMAND ${CMAKE_COMMAND} -E echo \"\" > ${CMAKE_HOME_DIRECTORY}/doc/html/amok.html + COMMAND ${CMAKE_COMMAND} -E echo \"


Advanced Metacomputing Overlay Kit.

\" >> ${CMAKE_HOME_DIRECTORY}/doc/html/amok.html + + COMMAND ${CMAKE_COMMAND} -E echo \"\" > ${CMAKE_HOME_DIRECTORY}/doc/html/msg.html + COMMAND ${CMAKE_COMMAND} -E echo \"


Meta SimGrid.

\" >> ${CMAKE_HOME_DIRECTORY}/doc/html/msg.html + + COMMAND ${CMAKE_COMMAND} -E echo \"\" > ${CMAKE_HOME_DIRECTORY}/doc/html/simdag.html + COMMAND ${CMAKE_COMMAND} -E echo \"


DAG Simulator.

\" >> ${CMAKE_HOME_DIRECTORY}/doc/html/simdag.html + WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/ + ) + +else(DOXYGEN_PATH AND FIG2DEV_PATH) + + ADD_CUSTOM_TARGET(ref_guide + COMMENT "Generating the SimGrid documentation..." + ) + + ADD_CUSTOM_COMMAND(TARGET ref_guide + COMMAND ${CMAKE_COMMAND} -E echo "DOXYGEN_PATH = ${DOXYGEN_PATH}" + COMMAND ${CMAKE_COMMAND} -E echo "FIG2DEV_PATH = ${FIG2DEV_PATH}" + COMMAND ${CMAKE_COMMAND} -E echo "IN ORDER TO GENERATE THE DOCUMENTATION YOU NEED ALL TOOLS !!!" + COMMAND ${CMAKE_COMMAND} -E echo "FAIL TO MAKE SIMGRID DOCUMENTATION see previous messages for details ..." + COMMAND false + ) + + +endif(DOXYGEN_PATH AND FIG2DEV_PATH) + +##############################################################################" + + +ADD_CUSTOM_TARGET(ref_guide_pdf + COMMAND ${CMAKE_COMMAND} -E echo "XX First pass simgrid_documentation.pdf" + COMMAND make clean + COMMAND make pdf || true + COMMAND ${CMAKE_COMMAND} -E echo "XX Second pass simgrid_documentation.pdf" + COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/doc/latex/refman.pdf + COMMAND make pdf || true + COMMAND ${CMAKE_COMMAND} -E echo "XX Write Simgrid_documentation.pdf" + COMMAND ${CMAKE_COMMAND} -E rename ${CMAKE_HOME_DIRECTORY}/doc/latex/refman.pdf ${CMAKE_HOME_DIRECTORY}/doc/latex/simgrid_documentation.pdf + + WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/latex/ +) +add_dependencies(pdf ref_guide) diff --git a/buildtools/Cmake/GenerateDoc.cmake b/buildtools/Cmake/GenerateUserGuide.cmake similarity index 70% rename from buildtools/Cmake/GenerateDoc.cmake rename to buildtools/Cmake/GenerateUserGuide.cmake index 21f403f6f9..805e8b7970 100644 --- a/buildtools/Cmake/GenerateDoc.cmake +++ b/buildtools/Cmake/GenerateUserGuide.cmake @@ -1,33 +1,17 @@ -#### Generate the html documentation - -if(BIBTEX2HTML) - set(BIBTEX2HTML_PATH ${BIBTEX2HTML}) -else(BIBTEX2HTML) - find_path(BIBTEX2HTML_PATH NAMES bibtex2html PATHS NO_DEFAULT_PATHS) -endif(BIBTEX2HTML) +#### Generate the html documentation for the user guide. find_path(FIG2DEV_PATH NAMES fig2dev PATHS NO_DEFAULT_PATHS) find_path(DOXYGEN_PATH NAMES doxygen PATHS NO_DEFAULT_PATHS) -### Check whether the bibtex2html that we found is the one that Arnaud requires -exec_program("${BIBTEX2HTML_PATH}/bibtex2html -version" OUTPUT_VARIABLE OUTPUT_BIBTEX2HTML_VERSION) -STRING(REPLACE "[-bibtex]" "" OUTPUT_BIBTEX2HTML_VERSION_2 ${OUTPUT_BIBTEX2HTML_VERSION}) file(GLOB_RECURSE source_doxygen - "${CMAKE_HOME_DIRECTORY}/tools/gras/*.[chl]" "${CMAKE_HOME_DIRECTORY}/src/*.[chl]" "${CMAKE_HOME_DIRECTORY}/include/*.[chl]" ) -if(${OUTPUT_BIBTEX2HTML_VERSION_2} STREQUAL ${OUTPUT_BIBTEX2HTML_VERSION}) # wrong version - SET(GOOD_BIBTEX2HTML_VERSION 0) -else(${OUTPUT_BIBTEX2HTML_VERSION_2} STREQUAL ${OUTPUT_BIBTEX2HTML_VERSION}) # good version - SET(GOOD_BIBTEX2HTML_VERSION 1) -endif(${OUTPUT_BIBTEX2HTML_VERSION_2} STREQUAL ${OUTPUT_BIBTEX2HTML_VERSION}) -if(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTEX2HTML_PATH AND GOOD_BIBTEX2HTML_VERSION) +if(DOXYGEN_PATH AND FIG2DEV_PATH) - #DOC_SOURCE=doc/*.doc, defined in DefinePackage set(DOCSSOURCES "${source_doxygen}\n${DOC_SOURCE}") string(REPLACE "\n" ";" DOCSSOURCES ${DOCSSOURCES}) @@ -42,48 +26,17 @@ if(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTEX2HTML_PATH AND GOOD_BIBTEX2HTML_VERSI ${CMAKE_HOME_DIRECTORY}/doc/webcruft/win_install_04.png ${CMAKE_HOME_DIRECTORY}/doc/webcruft/win_install_05.png ${CMAKE_HOME_DIRECTORY}/doc/webcruft/win_install_06.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_001.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_002.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_003.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_004.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_005.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_006.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_007.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_008.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_009.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_010.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_011.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_012.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_013.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_014.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_015.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_016.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_017.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_018.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_019.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_020.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_021.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_022.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_023.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_024.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_025.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_026.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_027.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_028.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_029.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101_030.png - ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid-101.pdf ) configure_file(${CMAKE_HOME_DIRECTORY}/doc/Doxyfile.in ${CMAKE_HOME_DIRECTORY}/doc/Doxyfile @ONLY) configure_file(${CMAKE_HOME_DIRECTORY}/doc/footer.html.in ${CMAKE_HOME_DIRECTORY}/doc/footer.html @ONLY) - ADD_CUSTOM_TARGET(simgrid_documentation - COMMENT "Generating the SimGrid documentation..." + ADD_CUSTOM_TARGET(user_guide + COMMENT "Generating the SimGrid user guide..." 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 - 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 + COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_HOME_DIRECTORY}/doc/userguide/html + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/doc/userguide/html + 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 ) @@ -98,18 +51,18 @@ if(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTEX2HTML_PATH AND GOOD_BIBTEX2HTML_VERSI foreach(file ${DOC_FIGS}) string(REPLACE ".fig" ".png" tmp_file ${file}) string(REPLACE "${CMAKE_HOME_DIRECTORY}/doc/fig/" "${CMAKE_HOME_DIRECTORY}/doc/html/" tmp_file ${tmp_file}) - ADD_CUSTOM_COMMAND(TARGET simgrid_documentation + ADD_CUSTOM_COMMAND(TARGET user_guide COMMAND ${FIG2DEV_PATH}/fig2dev -Lpng -S 4 ${file} ${tmp_file} ) endforeach(file ${DOC_FIGS}) foreach(file ${DOC_PNGS}) - ADD_CUSTOM_COMMAND(TARGET simgrid_documentation + ADD_CUSTOM_COMMAND(TARGET user_guide COMMAND ${CMAKE_COMMAND} -E copy ${file} ${CMAKE_HOME_DIRECTORY}/doc/html/ ) endforeach(file ${DOC_PNGS}) - ADD_CUSTOM_COMMAND(TARGET simgrid_documentation + ADD_CUSTOM_COMMAND(TARGET user_guide COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/doc/webcruft/Paje_MSG_screenshot_thn.jpg ${CMAKE_HOME_DIRECTORY}/doc/html/ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/doc/webcruft/Paje_MSG_screenshot.jpg ${CMAKE_HOME_DIRECTORY}/doc/html/ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/doc/triva-graph_configuration.png ${CMAKE_HOME_DIRECTORY}/doc/html/ @@ -118,18 +71,15 @@ if(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTEX2HTML_PATH AND GOOD_BIBTEX2HTML_VERSI COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/doc/simgrid.css ${CMAKE_HOME_DIRECTORY}/doc/html/ ) - ADD_CUSTOM_COMMAND(TARGET simgrid_documentation + ADD_CUSTOM_COMMAND(TARGET user_guide COMMAND ${CMAKE_COMMAND} -E echo "XX First Doxygen pass" COMMAND ${DOXYGEN_PATH}/doxygen Doxyfile COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/index_create.pl simgrid.tag index-API.doc - COMMAND ${CMAKE_HOME_DIRECTORY}/tools/doxygen/toc_create.pl pls.doc index.doc FAQ.doc gtut-introduction.doc install.doc bindings.doc options.doc tracing.doc platform.doc COMMAND ${CMAKE_COMMAND} -E echo "XX Second Doxygen pass" COMMAND ${DOXYGEN_PATH}/doxygen Doxyfile - 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/doxygen_postprocesser.pl COMMAND ${CMAKE_COMMAND} -E echo "XX Create shortcuts pages" COMMAND ${CMAKE_COMMAND} -E echo \"\" > ${CMAKE_HOME_DIRECTORY}/doc/html/gras.html @@ -146,33 +96,22 @@ if(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTEX2HTML_PATH AND GOOD_BIBTEX2HTML_VERSI WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/ ) -else(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTEX2HTML_PATH AND GOOD_BIBTEX2HTML_VERSION) - - ADD_CUSTOM_TARGET(simgrid_documentation - COMMENT "Generating the SimGrid documentation..." - ) +else(DOXYGEN_PATH AND FIG2DEV_PATH) - 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:" - 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" + ADD_CUSTOM_TARGET(user_guide + COMMENT "Generating the SimGrid user guide..." ) - endif(NOT GOOD_BIBTEX2HTML_VERSION) - ADD_CUSTOM_COMMAND(TARGET simgrid_documentation + ADD_CUSTOM_COMMAND(TARGET user_guide COMMAND ${CMAKE_COMMAND} -E echo "DOXYGEN_PATH = ${DOXYGEN_PATH}" COMMAND ${CMAKE_COMMAND} -E echo "FIG2DEV_PATH = ${FIG2DEV_PATH}" - COMMAND ${CMAKE_COMMAND} -E echo "BIBTEX2HTML_PATH = ${BIBTEX2HTML_PATH}" COMMAND ${CMAKE_COMMAND} -E echo "IN ORDER TO GENERATE THE DOCUMENTATION YOU NEED ALL TOOLS !!!" COMMAND ${CMAKE_COMMAND} -E echo "FAIL TO MAKE SIMGRID DOCUMENTATION see previous messages for details ..." COMMAND false ) -endif(DOXYGEN_PATH AND FIG2DEV_PATH AND BIBTEX2HTML_PATH AND GOOD_BIBTEX2HTML_VERSION) +endif(DOXYGEN_PATH AND FIG2DEV_PATH) ##############################################################################" @@ -303,4 +242,4 @@ ADD_CUSTOM_TARGET(pdf WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/latex/ ) -add_dependencies(pdf simgrid_documentation) +add_dependencies(pdf user_guide) diff --git a/tools/doxygen/bibtex2html_table_count.pl b/tools/doxygen/bibtex2html_table_count.pl deleted file mode 100755 index 36dc8aa0e7..0000000000 --- a/tools/doxygen/bibtex2html_table_count.pl +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/perl -w -use utf8; - -$first=1; -while($line = ) { - chomp $line; - if($line =~ /^\s*@[\w\s]*{/) { - if(!$first) { - $count{$cat}{$year}++; - } else { - $first=0; - } - next; - } - if($line =~ /^\s*year\s*=\s*/i) { - $year = $line; - $year =~ s/\D*//g; - } - if($line =~ /^\s*category\s*=\s*/i) { - $cat = $line; - $cat =~ s/^.*=//; - $cat =~ s/\s*//g; - $cat =~ s/\W*//g; - } -} -$count{$cat}{$year}++; - -%pretty_print = ( - "core" => "Other publications about the SimGrid framework", - "extern" => "Papers that use SimGrid-generated results (not counting our owns)", - "intra" => "Our own papers that use SimGrid-generated results" - ); - -@years=(); -foreach $cat (keys %count) { - push @years, keys %{$count{$cat}}; -} - -@years = sort {$a <=> $b} @years; -$year_min = $years[0]; -$year_max = $years[$#years]; - -#Print -print " -"; -foreach $year ($year_min..$year_max) { - print " "; -} -print "\n"; -print "\n"; - -foreach $cat (keys %count) { - $sum = 0; - print ""; - - foreach $year ($year_min..$year_max) { - if(defined($count{$cat}{$year})) { - print " "; - $sum+=$count{$cat}{$year}; - } else { - print " "; - } - } - print "\n"; - print "\n"; -} - - - -print ""; - -$ssum=0; -foreach $year ($year_min..$year_max) { - $sum = 0; - foreach $cat (keys %count) { - if(defined($count{$cat}{$year})) { - $sum+=$count{$cat}{$year}; - } - } - $ssum+=$sum; - print " "; -} -print " "; -print "\n"; - - -print "
Year$yearTotal
$pretty_print{$cat}$count{$cat}{$year}-$sum
Total $sum$ssum
\n"; - diff --git a/tools/doxygen/bibtex2html_wrapper.pl b/tools/doxygen/bibtex2html_wrapper.pl deleted file mode 100755 index 5e412846a1..0000000000 --- a/tools/doxygen/bibtex2html_wrapper.pl +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/perl -w -use utf8; -use strict; - -my $file = shift @ARGV || die "USAGE: bibtex2html_wrapper \n"; - -my $output; -my $write; -my $line; -my $title; - -open IN,"bibtex2html -single-output -nv -force -sort year -copy-icons ${file}.bib -output -|iconv -f latin1 -t utf8 -|"; - -$write=0; -while($line = ) { - chomp $line; - next if $line =~ /WARNING: unknown field type/; - - if($line =~ /table width/) { - $line = ; - chomp $line; - if($line =~ /height="50"/) { - ## Skip preembule - $write=1; - do { - $line = ; - chomp $line; - } while (!($line =~ /table/)); - next; - } - if($line =~ /height="35"/) { - my $output; - ## Change this uggly table into a h2 - do { - $line = ; - chomp $line; - } while (($line =~ /; - chomp $line; - } while (!($line =~ /table/)); - $output .= "

$title

\n"; - next; - } - } - $line =~ s/
    /
      /g; - $line =~ s/<\/ol>/<\/ul>/g; - - if($line =~ /Disclaimer:/ || $line =~ /body>/) { - $write=0; - next; - } - if($line =~ /This document was translated f/) { - $write=1; - } - - if($write) { - $output .= $line."\n"; - } - -} -open(OUT,">${file}_bib.html"); -print OUT $output; -close(OUT); -close(IN); \ No newline at end of file diff --git a/tools/doxygen/doxygen_postprocesser.pl b/tools/doxygen/doxygen_postprocesser.pl deleted file mode 100755 index d35168f9ab..0000000000 --- a/tools/doxygen/doxygen_postprocesser.pl +++ /dev/null @@ -1,441 +0,0 @@ -#! /usr/bin/perl - -use strict; - -# Add here the pages of the documentation generated by a @page doxygen macro -my @extra_files = qw(html/index.html html/pages.html html/modules.html html/annotated.html html/functions.html - html/functions_vars.html index.php - html/GRAS_tut.html html/tracing.html html/platform.html html/install.html html/bindings.html - html/options.html html/use.html html/pls.html html/FAQ.html); - -# GRAS tutorial -map {push @extra_files, "html/GRAS_tut_$_.html"} qw (intro - tour tour_install tour_setup tour_simpleexchange tour_args tour_callbacks tour_globals - tour_logs tour_timers tour_exceptions tour_simpledata tour_rpc tour_explicitwait - tour_message_recaping tour_staticstruct tour_pointers tour_dynar - tour_manualdatadef tour_exchangecb); - -# GRAS examples -map {push @extra_files, "html/GRAS_ex_$_.html"} qw (ping mmrpc token timer); - -my %debug; -$debug{'parse'} = 0; # show how we parse the module tree -$debug{'input'} = 0; # display the resulting tree -$debug{'handle'}= 0; # Be verbose on the post-processing -$debug{'rename'}= 0; # do not overwrite the files (allows several debuging runs without rerunning doxygen) - -my @allfiles; -### -### Get the module definitions -### - -open IN, "html/modules.html" || die "Cannot parse html/modules.html. Did you really run doxygen?\n"; - -# pass headers -while () { - last if /group__SimGrid__API.html/; -} - -# Parse the tree -my $top; -my $current; -my $entry; - -# $current->{'label'}="ROOT"; -# push @{$top->{'down'}},$current; -# print "Push $current '".($current->{'label'})."' as child of $top '".($top->{'label'})."'\n" if $debug{'parse'}; -# $current=$top; -$top->{'label'}="ROOT"; -print "Create ROOT $top\n" if $debug{'parse'}; -$current=$top; - - -# Read the whole data to postprocess it a bit -my $in; -while () { - $in .= $_; -} -$in =~ s/
        /\n
          \n/sg; -foreach $_ (split(/\n/,$in)) { - next unless length($_); - next if ($_ =~ m|^$|); - print " Seen '$_'\n" if $debug{'parse'}; - if (/
            /) { - print "DOWN: $current '$current->{'label'}' -> " if $debug{'parse'}; - $current = $current->{'down'}[scalar @{$current->{'down'}} - 1]; - print "$current '$current->{'label'}'\n" if $debug{'parse'}; - next; - } - if (/<\/ul>/) { - $current = $current->{'up'}; - print "UP to $current '$current->{'label'}'\n" if $debug{'parse'}; - next; - } - if (/

            /) { - last; - } - - m|href="([^"]*)">([^<]*)|; #" - - $entry = {}; - $entry->{'file'} = $1; - $entry->{'label'} = $2; - $entry->{'up'} = $current; - push @{$current->{'down'}},$entry; - print "Push file:$1 label:'$2' as child of $current '$current->{'label'}'\n" if $debug{'parse'}; - push @allfiles,"html/$1"; -} -close IN; - -# Check each file for extra information (short name, extra childs) -sub extra_info { - my $current=shift; - - if (defined($current->{'file'})) { - open IN, "html/$current->{'file'}"; - while () { - if (/DOXYGEN_NAVBAR_LABEL/) { - if (/DOXYGEN_NAVBAR_LABEL="([^"]*)"/) {#" - print "Extra info from $current->{'file'}: label=$1, not $current->{'label'}\n" if $debug{'parse'}; - $current->{'label'}=$1; - } else { - die "Malformated DOXYGEN_NAVBAR_LABEL line in $current->{'file'}"; - } - } - if (/DOXYGEN_NAVBAR_CHILD/) { - if (/DOXYGEN_NAVBAR_CHILD *"([^"]*)"=([^ ]*)/) {#" - $entry = {}; - $entry->{'label'} = $1; - $entry->{'file'} = $2; - chomp($entry->{'file'}); - $entry->{'up'} = $current; - push @{$current->{'down'}},$entry; - print "Extra info from $current->{'file'}: New child $entry->{'label'}=$entry->{'file'}\n" if $debug{'parse'}; - } else { - die "Malformated DOXYGEN_NAVBAR_CHILD line in $current->{'file'}"; - } - } - } - } - - foreach my $entry (@{$current->{'down'}}) { - extra_info($entry); - } -} -extra_info($top); - -## debug function -sub display { - my $current=shift; - my $level=shift; - print " " x $level; - print "$current: ".$current->{'label'}." ($current->{'file'})\n"; - foreach my $entry (@{$current->{'down'}}) { - display($entry,$level+1); - } -} - -display($top,0) if $debug{'input'}; - -### -### Generate the navbar -### - -# the root deserves some special handling -open IN,"html/modules.html" || die; -open OUT,">html/modules.new.html" || die; -my $line; -while ($line = ) { - last if $line =~ /

            SimGrid Modules\n \n"; -print OUT $line; -while () { - print OUT $_; -} - -close OUT; -close IN; -rename("html/modules.new.html","html/modules.html") unless $debug{'rename'}; - -# Operate the recursion -sub handle_page { - my $current=shift; - my $level=shift; - - print "Handle $current->{'file'} at level $level\n" if $debug{'handle'}; - - # we generate the tabs bottom up begining from where we are in the tree - # and display them top down, as it should in a file - my @tabs = (); - my $found_div_tabs=0; - - if (defined ($current->{'label'}) and $current->{'label'} ne 'ROOT') { -# print "handle $current->{'file'}, at level $level\n"; - # generate the tabs - my $iterator = $current; - my $lvl_it=$level; - while ($lvl_it >= 0) { - my $father = $iterator->{'up'}; - $tabs[$lvl_it] = "
            \n
            \n"; - $iterator = $father; - $lvl_it--; - } - if (defined $current->{'down'}) { # there's some kid. Display them too - $tabs[$level+1] = "
            \n
              \n"; - foreach my $kid (@{$current->{'down'}}) { - $tabs[$level+1] .= "
            • {'file'}\">$kid->{'label'}
            • \n"; - } - $tabs[$level+1] .= "
            \n"; - } - - # put them in place - open FROM,"html/$current->{'file'}" || die; - my $newname="html/$current->{'file'}"; - $newname =~ s/.html/.handlepage.html/; - open TO,">$newname" || die; -# print "XXX Deal with html/$current->{'file'} -> $newname\n"; - while () { -# print "--Read $_"; - # add "current" to the module API granfather page - s|
          • [^<]*
          • |
          • Modules API
          • |; -# print "++Write $_"; - $found_div_tabs=1 if m/div.*class="tabs"/; - print TO "$_"; - last if ((m||)&&($found_div_tabs)); - } - - print TO "\n\n"; - - foreach (@tabs) { -# print "TAB: $_"; - print TO "$_"; - } - print TO "\n\n"; - - if ($current->{'file'} =~ m/^class/) { - while () { - last if (m||); - } - print TO "$_"; - } - while () { - if (m/POST-PROCESSED TABS/) { - while () { - last if (m/END OF POST-PROCESSED TABS/); - } - next; - } - - if (m/The documentation for/) { - while () { - last if (m/

            /); - } - } - print TO "$_"; - } - close FROM; - close TO; - rename("$newname","html/$current->{'file'}") unless $debug{'rename'}; - } - - # recurse on childs - foreach my $entry (@{$current->{'down'}}) { - handle_page($entry,$level+1); - } -} - -### -### Launch the modules navbar reworking -### -handle_page($top,-1);# skip roots (we have 2 roots) in level counting - -### -### Add the modules navbar reworking to the modules.html file -### -sub add_tabs_to_module_html { - my $found_div_tabs=0; - my $module_tabs = "

            \n
            \n"; - - my $oldname = "html/modules.html"; - open FROM,$oldname || die; - my $newname=$oldname; - $newname =~ s/.html/.handlepage.html/; - open TO,">$newname" || die; - while () { - $found_div_tabs=1 if m/div.*class="tabs"/; - print TO "$_"; - last if ((m||)&&($found_div_tabs)); - } - - print TO "\n\n"; - print TO $module_tabs; - print TO "\n\n"; - - while () { - print TO "$_"; - } - close FROM; - close TO; - rename($newname, $oldname) unless $debug{'rename'}; - - # die; -} - -add_tabs_to_module_html; - -### -### Post-processsing common to all pages -### -map {push @allfiles,$_} @extra_files; -print "All files: ".(join(", ",@allfiles))."\n" if $debug{'parse'}; -my $tabs; - -foreach my $file (@allfiles) { - $file =~ s/.html/.handlepage.html/ if $debug{'rename'}; # Take right name if debugging - - open FROM,"$file" || die; - my $outfile = "$file"; - $outfile =~ s/.(html|php)$/.new.$1/; - open TO,">$outfile" || die; -# print "POSTPROCESSING $file (tmp=$outfile)\n"; - while () { - # Add the simgrid css, just in case - print TO ''."\n" - if (m||); - - if($tabs){ - if($file =~ /^html\/index\..*/){ - $_ =~ s/
          • /
          • /g; - $_ =~ s/
          • /
          • /g; - } - $_ =~ s/
          • /
          • /g; - - if($file =~ /^html\/pages\..*/){ - $_ =~ s/
          • /
          • /g; - } - } - - if($file =~ /^html\/publis.*/){ - $_ =~ s/
            /
            /g; - $_ =~ s/
            /
            /g; - } - - # Add the FAQ PUBLIS PEOPLE HISTORY and CONTRIB to the top navbar. - if( $_ =~ //){ - $tabs = 1; - } - if( $_ =~ /<\/div>/){ - $tabs = 0; - } - if( $_ =~ /<\/ul>/ && $tabs){ - my $tmp_buff=""; - $tmp_buff .= '
          • Using SimGrid
          • '."\n"; - $tmp_buff .= '
          • Forge
          • '."\n"; - $tmp_buff .= '
          • Website
          • '."\n"; - $tmp_buff .= '
          • Documentation index
          • '."\n"; - $tmp_buff .= '
          • FAQ
          • '."\n"; - $tmp_buff .= $_; - $tabs = 0; - - # Rework the navbar and add menu for use.html - # Fix the current "button" of buggy Doxygen tabs - if($file =~ /^html\/use.*/ - || $file =~ /^html\/install.*/ - || $file =~ /^html\/options.*/ - || $file =~ /^html\/tracing.*/ - || $file =~ /^html\/platform.*/ - || $file =~ /^html\/bindings.*/ - || $file =~ /^html\/pls.*/ - || $file =~ /^html\/modules.*/ - || $file =~ /^html\/annotated.*/ - || $file =~ /^html\/group__.*/ - || $file =~ /^html\/functions.*/ - || $file =~ /^html\/GRAS_tut_tour_.*/) - { - $tmp_buff .= '
            '."\n"; - $tmp_buff .= '
            '."\n"; - $tmp_buff .= ' '."\n"; - - my $filename = $file; - $filename =~ s/html\///g; - $filename =~ s/\.html//g; - $filename =~ s/publis_.*/publis/g; - $tmp_buff =~ s/
          • /
          • /g; - $tmp_buff =~ s/
          • /
          • /g; - $tmp_buff =~ s/
          • /
          • /g; - - } - - # Rework the navbar - # Fix the current "button" of buggy Doxygen tabs - if($file =~ /^html\/pages.*/ - || $file =~ /^html\/FAQ.*/) - { - my $filename = $file; - $filename =~ s/html\///g; - $filename =~ s/\.html//g; - $tmp_buff =~ s/
          • /
          • /g; - $tmp_buff =~ s/
          • /
          • /g; - } - if($file =~ /^html\/group__.*/ - || $file =~ /^html\/GRAS_tut_tour_.*/) - { - $tmp_buff =~ s/
          • /
          • /g; - } - if($file =~ /^html\/functions.*/) - { - $tmp_buff =~ s/
          • /
          • /g; - } - - print TO $tmp_buff; - next; - } - s|Modules|Modules API|g; - s|Related Pages
          • \n||g; - s|
          • Modules API
          • \n||g; - s|
          • Modules API
          • \n||g; - if($file =~ /^html\/group__.*/) - { - s|
          • |
          • |g; - s|
          • Modules API
          • \n|
          • Modules API
          • \n|g; - } - else - { - s|
          • Modules API
          • \n||g; - } - s|
          • Data Structures
          • \n||g; - s|
          • Data Structures
          • \n||g; - s|Related Pages<|Documentation index<|g; - - print TO $_; - } - close FROM; - close TO; - rename("$outfile", "$file") unless $debug{'rename'}; -} - - - diff --git a/tools/doxygen/index_php.pl b/tools/doxygen/index_php.pl deleted file mode 100755 index 3a2e6144fd..0000000000 --- a/tools/doxygen/index_php.pl +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/perl -w - -($#ARGV >= 2) or die "Usage: index_php.pl "; - -my(@toc); -my($level,$label,$name); - -$inputphp = $ARGV[0]; -$inputhtml = $ARGV[1]; -$output = $ARGV[2]; - -my($onglets) = ""; -my($body) = ""; - -open FILE,$inputhtml; -while(defined($line=)) { - if($line =~/
            /) { - $onglets = $line; - while(defined($line=) && !($line =~/<\/div>/)) { - $line =~ s/ class="current"//g; - $onglets.=$line; - } - $onglets.=$line; - #$onglets.="


            \n" - } - if($line =~/(.*)$/) { - $tmp=$1; - if($tmp =~/(.*)/) { - $body .= $1; - } else { - $body .= $tmp; - while(defined($line=) && !($line =~//)) { - $body.=$line; - } - $line =~/^(.*)/; - $body.=$1; - } - } -} -close FILE; - -# (?!http) : A zero-width negative look-ahead assertion. -# For example "/foo(?!bar)/" matches any occurrence of "foo" that isn’t followed by "bar". - -$onglets =~ s/href=\"(?!http)/href=\"doc\//gi; -$onglets =~ s/src=\"(?!http)/src=\"doc\//gi; - -$body =~ s/href=\"(?!http)/href=\"doc\//gi; -$body =~ s/src=\"(?!http)/src=\"doc\//gi; - -open FILE,$inputphp; -open OUTPUT,"> $output"; - -while(defined($line=)) { - chomp $line; - if($line =~/______ONGLETS______/) { - $onglets =~ s/