Logo AND Algorithmique Numérique Distribuée

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