Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make some room for the lesson 11 on explicit message wait, and for the recapping...
[simgrid.git] / doc / Makefile.am
1 DOCSOURCES = $(shell find @top_srcdir@/tools/gras  @top_srcdir@/src @top_srcdir@/include -name "*.[chl]") \
2  $(shell find @srcdir@ -name "*.doc")
3 FIGS=simgrid_modules.fig amok_bw_test.fig amok_bw_sat.fig
4 PNGS=$(patsubst %.fig,%.png,$(FIGS)) simgrid_logo.png simgrid_logo_small.png poster_thumbnail.png
5
6 EXTRA_DIST = html Doxyfile \
7  modules.doc FAQ.doc contrib.doc index.doc publis.doc footer.html \
8  $(foreach file,$(FIGS),fig/$(file)) $(PNGS)
9
10
11 CLEANFILES = .*.toc
12 DISTCLEANFILES = index-API.doc simgrid.tag
13 MAINTAINERCLEANFILES = html
14
15 if MAINTAINER_MODE
16 simgrid_modules.map: fig/simgrid_modules.fig
17         fig2dev -Lmap fig/simgrid_modules.fig | grep -e IMG -e MAP -e AREA | \
18         sed 's/imagemap/simgrid_modules/g' | sed 's/\.gif/.png/' | \
19         sed 's/<IMG /<IMG style="border:0px "/g' | sed 's/\.gif/.png/' \
20         > simgrid_modules.map
21
22 %.png: fig/%.fig
23         fig2dev -Lpng $^ > $@
24
25 html: Doxyfile ./logcategories.doc simgrid_modules.map $(PNGS) $(DOCSOURCES) \
26       html/gras.html html/amok.html html/msg.html html/simdag.html
27         : # Setting up
28         touch index-API.doc .FAQ.doc.toc .index.doc.toc .contrib.doc.toc
29         test -e html || mkdir html
30         cp $(foreach file,$(PNGS),@srcdir@/$(file)) html/
31         cp @srcdir@/Paje_MSG_screenshot_thn.jpg @srcdir@/Paje_MSG_screenshot.jpg html/
32         cp @srcdir@/simgrid.css html/
33         : # First pass
34         doxygen Doxyfile >/dev/null
35         @top_srcdir@/tools/doxygen/index_create.pl simgrid.tag index-API.doc
36         @top_srcdir@/tools/doxygen/toc_create.pl \
37            @srcdir@/FAQ.doc @srcdir@/index.doc @srcdir@/contrib.doc \
38            @srcdir@/gtut-introduction.doc
39         : # Second pass
40         doxygen Doxyfile >/dev/null
41         : # Post-processing
42         rm -f html/dir* 
43         @top_srcdir@/tools/doxygen/index_php.pl @srcdir@/index.php.in html/index.html index.php
44         @top_srcdir@/tools/doxygen/doxygen_postprocesser.pl
45
46 html/gras.html:
47         echo "<html><META HTTP-EQUIV='Refresh' content='0;URL=http://simgrid.gforge.inria.fr/doc/group__GRAS__API.html'>" >$@
48         echo "<center><h2><br><a href='http://simgrid.gforge.inria.fr/doc/group__GRAS__API.html'>Grid Reality And Simulation.</a></h2></center></html>" >>$@
49 html/amok.html:
50         echo "<html><META HTTP-EQUIV='Refresh' content='0;URL=http://simgrid.gforge.inria.fr/doc/group__AMOK__API.html'>" >$@
51         echo "<center><h2><br><a href='http://simgrid.gforge.inria.fr/doc/group__AMOK__API.html'>Advanced Metacomputing Overlay Kit.</a></h2></center></html>" >>$@
52 html/msg.html:
53         echo "<html><META HTTP-EQUIV='Refresh' content='0;URL=http://simgrid.gforge.inria.fr/doc/group__MSG__API.html'>" >$@
54         echo "<center><h2><br><a href='http://simgrid.gforge.inria.fr/doc/group__MSG__API.html'>Meta SimGrid.</a></h2></center></html>" >>$@
55 html/simdag.html:
56         echo "<html><META HTTP-EQUIV='Refresh' content='0;URL=http://simgrid.gforge.inria.fr/doc/group__SD__API.html'>" >$@
57         echo "<center><h2><br><a href='http://simgrid.gforge.inria.fr/doc/group__SD__API.html'>DAG Simulator.</a></h2></center></html>" >>$@
58
59 publish:
60         $(MAKE) -C .. sync-gforge
61 endif
62
63 ./logcategories.doc: $(DOCSOURCES)
64         pwd=`pwd`; rm $$pwd/logcategories.doc; set -e; \
65         echo "/* Generated file, do not edit */"          > $$pwd/logcategories.doc; \
66         echo "/** \addtogroup XBT_log_cats"              >> $$pwd/logcategories.doc; \
67         echo "    @{"                                    >> $$pwd/logcategories.doc; \
68         cd @top_srcdir@/src; ./xbt_log_extract_hierarchy >> $$pwd/logcategories.doc; \
69         echo "@}*/"                                      >> $$pwd/logcategories.doc;
70
71 install-data-local: 
72         @for file in `find html/ -type d` ; do \
73            echo "test -z \"$(prefix)/doc/simgrid/$$file\" || $(mkdir_p) \"$(prefix)/doc/simgrid/$$file\"";\
74            test -z "$(prefix)/doc/simgrid/$$file" || $(mkdir_p) "$(prefix)/doc/simgrid/$$file";\
75         done
76         @for file in `find html/ -type f` ; do \
77            echo " $(INSTALL_DATA) '$$file' '$(prefix)/doc/simgrid/$$file'";\
78            $(INSTALL_DATA) $$file $(prefix)/doc/simgrid/$$file ;\
79         done
80
81 uninstall-local:
82         for file in `find html/ -type f` ; do \
83            echo " rm -f '$(prefix)/doc/simgrid/$$file'";\
84            rm -f $(prefix)/doc/simgrid/$$file ;\
85         done
86
87
88 check-gtut-tocs:
89         @echo Check individual TOCs
90         @for n in gtut-tour-*.doc ; do \
91           sed -n '/Table of Contents/,/hr/p' $$n|grep ref > tmp.curtoc; \
92           \
93           grep -E '\\s?u?b?section' $$n | grep -v _toc| \
94              sed -e 's/\\section //' -e 's/\\subsection /subsection/' -e 's/ .*//' |\
95              sed -e 's/^/ - \\ref /' -e 's/- \\ref subsection/   - \\ref /' > tmp.realtoc; \
96           \
97           if ! diff -q tmp.curtoc tmp.realtoc >/dev/null; then \
98             echo Wrong toc for $$n. Should be ; \
99             cat tmp.realtoc; \
100           fi ; \
101         done
102         @rm tmp.realtoc tmp.curtoc
103         @echo "Check main TOC"
104         @for n in gtut-tour-*doc; do \
105           grep @page $$n |sed -e 's/@page //' -e 's/ .*//' -e 's/^/ - \\ref /' >>tmp.realtoc;\
106           sed -n -e '/Table of Contents/,/hr/p' $$n|sed -e 's/^/   /'|\
107              grep -v toc|grep -v '<hr>'|grep [^[:blank:]] >>tmp.realtoc;\
108         done
109         @grep ' *- \\ref' gtut-tour.doc > tmp.curtoc
110         @if ! diff -b -u tmp.curtoc tmp.realtoc ; then \
111           echo "Wrong toc for gtut-tour.doc Right one is in tmp.realtoc"; \
112         else \
113           rm tmp.realtoc; \
114         fi ;
115         @rm tmp.curtoc
116         
117
118 .PHONY: html
119
120 include $(top_srcdir)/acmacro/dist-files.mk