1 # Copyright (c) 2004-2007. The SimGrid team. All right reserved.
3 # This file is part of the SimGrid project. This is free software:
4 # You can redistribute and/or modify it under the terms of the
5 # GNU LGPL (v2.1) licence.
8 DOCSOURCES = $(shell find @top_srcdir@/tools/gras @top_srcdir@/src @top_srcdir@/include -name "*.[chl]") \
9 $(shell find @srcdir@ -name "*.doc")
10 FIGS=simgrid_modules.fig simgrid_modules2.fig amok_bw_test.fig amok_bw_sat.fig
11 PNGS=$(patsubst %.fig,%.png,$(FIGS)) webcruft/simgrid_logo.png webcruft/simgrid_logo_small.png webcruft/poster_thumbnail.png
13 EXTRA_DIST = html Doxyfile \
14 modules.doc FAQ.doc contrib.doc index.doc publis.doc footer.html history.doc \
15 $(foreach file,$(FIGS),fig/$(file)) $(PNGS)
19 DISTCLEANFILES = index-API.doc simgrid.tag
20 MAINTAINERCLEANFILES = html
23 simgrid_modules.map: fig/simgrid_modules.fig
24 fig2dev -Lmap fig/simgrid_modules.fig | grep -e IMG -e MAP -e AREA | \
25 sed 's/imagemap/simgrid_modules/g' | sed 's/\.gif/.png/' | \
26 sed 's/<IMG /<IMG style="border:0px "/g' | sed 's/\.gif/.png/' \
32 html: Doxyfile ./logcategories.doc simgrid_modules.map $(PNGS) $(DOCSOURCES) \
33 html/gras.html html/amok.html html/msg.html html/simdag.html
35 touch index-API.doc .FAQ.doc.toc .index.doc.toc .contrib.doc.toc .history.doc.toc
36 test -e html || mkdir html
37 cp $(foreach file,$(PNGS),@srcdir@/$(file)) html/
38 cp @srcdir@/webcruft/Paje_MSG_screenshot_thn.jpg @srcdir@/webcruft/Paje_MSG_screenshot.jpg html/
39 cp @srcdir@/simgrid.css html/
41 doxygen Doxyfile >/dev/null
42 @top_srcdir@/tools/doxygen/index_create.pl simgrid.tag index-API.doc
43 @top_srcdir@/tools/doxygen/toc_create.pl \
44 @srcdir@/FAQ.doc @srcdir@/index.doc @srcdir@/contrib.doc \
45 @srcdir@/gtut-introduction.doc @srcdir@/history.doc
47 doxygen Doxyfile >/dev/null
50 @top_srcdir@/tools/doxygen/index_php.pl @srcdir@/index.php.in html/index.html index.php
51 @top_srcdir@/tools/doxygen/doxygen_postprocesser.pl
55 echo "<html><META HTTP-EQUIV='Refresh' content='0;URL=http://simgrid.gforge.inria.fr/doc/group__GRAS__API.html'>" > $@
56 echo "<center><h2><br><a href='http://simgrid.gforge.inria.fr/doc/group__GRAS__API.html'>Grid Reality And Simulation.</a></h2></center></html>" >> $@
58 echo "<html><META HTTP-EQUIV='Refresh' content='0;URL=http://simgrid.gforge.inria.fr/doc/group__AMOK__API.html'>" > $@
59 echo "<center><h2><br><a href='http://simgrid.gforge.inria.fr/doc/group__AMOK__API.html'>Advanced Metacomputing Overlay Kit.</a></h2></center></html>" >> $@
61 echo "<html><META HTTP-EQUIV='Refresh' content='0;URL=http://simgrid.gforge.inria.fr/doc/group__MSG__API.html'>" > $@
62 echo "<center><h2><br><a href='http://simgrid.gforge.inria.fr/doc/group__MSG__API.html'>Meta SimGrid.</a></h2></center></html>" >> $@
64 echo "<html><META HTTP-EQUIV='Refresh' content='0;URL=http://simgrid.gforge.inria.fr/doc/group__SD__API.html'>" > $@
65 echo "<center><h2><br><a href='http://simgrid.gforge.inria.fr/doc/group__SD__API.html'>DAG Simulator.</a></h2></center></html>" >> $@
68 $(MAKE) -C .. sync-gforge
71 ./logcategories.doc: $(DOCSOURCES)
72 pwd=`pwd`; rm $$pwd/logcategories.doc; set -e; \
73 echo "/* Generated file, do not edit */" > $$pwd/logcategories.doc; \
74 echo "/** \addtogroup XBT_log_cats" >> $$pwd/logcategories.doc; \
75 echo " @{" >> $$pwd/logcategories.doc; \
76 cd @top_srcdir@/src; ./xbt_log_extract_hierarchy >> $$pwd/logcategories.doc; \
77 echo "@}*/" >> $$pwd/logcategories.doc;
80 @for file in `find html/ -type d` ; do \
81 echo "test -z \"$(prefix)/doc/simgrid/$$file\" || $(mkdir_p) \"$(prefix)/doc/simgrid/$$file\"";\
82 test -z "$(prefix)/doc/simgrid/$$file" || $(mkdir_p) "$(prefix)/doc/simgrid/$$file";\
84 @for file in `find html/ -type f` ; do \
85 echo " $(INSTALL_DATA) '$$file' '$(prefix)/doc/simgrid/$$file'";\
86 $(INSTALL_DATA) $$file $(prefix)/doc/simgrid/$$file ;\
90 for file in `find html/ -type f` ; do \
91 echo " rm -f '$(prefix)/doc/simgrid/$$file'";\
92 rm -f $(prefix)/doc/simgrid/$$file ;\
97 @echo Check individual TOCs
98 @for n in gtut-tour-*.doc ; do \
99 sed -n '/Table of Contents/,/hr/p' $$n|grep ref > tmp.curtoc; \
101 grep -E '\\s?u?b?section' $$n | grep -v _toc| \
102 sed -e 's/\\section //' -e 's/\\subsection /subsection/' -e 's/ .*//' |\
103 sed -e 's/^/ - \\ref /' -e 's/- \\ref subsection/ - \\ref /' > tmp.realtoc; \
105 if ! diff -q tmp.curtoc tmp.realtoc >/dev/null; then \
106 echo Wrong toc for $$n. Should be ; \
110 @rm tmp.realtoc tmp.curtoc
111 @echo "Check main TOC"
112 @for n in gtut-tour-*doc; do \
113 grep @page $$n |sed -e 's/@page //' -e 's/ .*//' -e 's/^/ - \\ref /' >>tmp.realtoc;\
114 sed -n -e '/Table of Contents/,/hr/p' $$n|sed -e 's/^/ /'|\
115 grep -v toc|grep -v '<hr>'|grep [^[:blank:]] >>tmp.realtoc;\
117 @grep ' *- \\ref' gtut-tour.doc > tmp.curtoc
118 @if ! diff -b -u tmp.curtoc tmp.realtoc ; then \
119 echo "Wrong toc for gtut-tour.doc Right one is in tmp.realtoc"; \
127 include $(top_srcdir)/acmacro/dist-files.mk