Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Delete double negation for option.
[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) all.bib
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       publis_core_bib.html publis_extern_bib.html publis_intra_bib.html publis_count.html 
36         : # Setting up
37         touch index-API.doc .FAQ.doc.toc .index.doc.toc .contrib.doc.toc .history.doc.toc
38         test -e html || mkdir html
39         cp $(foreach file,$(PNGS),@srcdir@/$(file)) html/
40         cp @srcdir@/webcruft/Paje_MSG_screenshot_thn.jpg @srcdir@/webcruft/Paje_MSG_screenshot.jpg html/
41         cp @srcdir@/simgrid.css html/
42         : # First pass
43         $(DOXYGEN) Doxyfile >/dev/null
44         @top_srcdir@/tools/doxygen/index_create.pl simgrid.tag index-API.doc
45         @top_srcdir@/tools/doxygen/toc_create.pl \
46            @srcdir@/FAQ.doc @srcdir@/index.doc @srcdir@/contrib.doc \
47            @srcdir@/gtut-introduction.doc @srcdir@/history.doc
48         : # Second pass
49         $(DOXYGEN) Doxyfile >/dev/null
50         : # Post-processing
51         rm -f html/dir* 
52         @top_srcdir@/tools/doxygen/index_php.pl @srcdir@/index.php.in html/index.html index.php
53         @top_srcdir@/tools/doxygen/doxygen_postprocesser.pl
54
55 html/gras.html:
56         mkdir -p html
57         echo "<html><META HTTP-EQUIV='Refresh' content='0;URL=http://simgrid.gforge.inria.fr/doc/group__GRAS__API.html'>" > $@
58         echo "<center><h2><br><a href='http://simgrid.gforge.inria.fr/doc/group__GRAS__API.html'>Grid Reality And Simulation.</a></h2></center></html>" >> $@
59 html/amok.html:
60         echo "<html><META HTTP-EQUIV='Refresh' content='0;URL=http://simgrid.gforge.inria.fr/doc/group__AMOK__API.html'>" > $@
61         echo "<center><h2><br><a href='http://simgrid.gforge.inria.fr/doc/group__AMOK__API.html'>Advanced Metacomputing Overlay Kit.</a></h2></center></html>" >> $@
62 html/msg.html:
63         echo "<html><META HTTP-EQUIV='Refresh' content='0;URL=http://simgrid.gforge.inria.fr/doc/group__MSG__API.html'>" > $@
64         echo "<center><h2><br><a href='http://simgrid.gforge.inria.fr/doc/group__MSG__API.html'>Meta SimGrid.</a></h2></center></html>" >> $@
65 html/simdag.html:
66         echo "<html><META HTTP-EQUIV='Refresh' content='0;URL=http://simgrid.gforge.inria.fr/doc/group__SD__API.html'>" > $@
67         echo "<center><h2><br><a href='http://simgrid.gforge.inria.fr/doc/group__SD__API.html'>DAG Simulator.</a></h2></center></html>" >> $@
68
69 if HAVE_BIBTEX2HTML
70
71 publis_count.html: all.bib
72         @top_srcdir@/tools/doxygen/bibtex2html_table_count.pl < $^ > $@
73
74 publis_core.bib: all.bib 
75         $(BIBTOOL) -- 'select.by.string={category "core"}' -- 'preserve.key.case={on}' -- 'preserve.keys={on}' $< > $@
76
77 publis_extern.bib: all.bib 
78         $(BIBTOOL) -- 'select.by.string={category "extern"}' -- 'preserve.key.case={on}' -- 'preserve.keys={on}' $< > $@
79
80 publis_intra.bib: all.bib 
81         $(BIBTOOL) -- 'select.by.string={category "intra"}' -- 'preserve.key.case={on}' -- 'preserve.keys={on}' $< > $@
82
83 %_bib.latin1.html: %.bib
84         $(BIBTEX2HTML) -single-output -nv -force -sort year -copy-icons $^ | @top_srcdir@/tools/doxygen/bibtex2html_postprocessor.pl > $@
85
86 %_bib.html: %_bib.latin1.html
87         $(ICONV) --from-code latin1 --to-code utf8 $^ --output $@
88 endif
89
90 publish:
91         $(MAKE) -C .. sync-gforge
92 endif
93 endif
94
95 ./logcategories.doc: $(DOCSOURCES)
96         pwd=`pwd`; rm -f $$pwd/logcategories.doc; set -e; \
97         echo "/* Generated file, do not edit */"          > $$pwd/logcategories.doc; \
98         echo "/** \addtogroup XBT_log_cats"              >> $$pwd/logcategories.doc; \
99         echo "    @{"                                    >> $$pwd/logcategories.doc; \
100         cd @top_srcdir@/src; ../tools/doxygen/xbt_log_extract_hierarchy.pl >> $$pwd/logcategories.doc; \
101         echo "@}*/"                                      >> $$pwd/logcategories.doc;
102
103 install-data-local: 
104         @for file in `find html/ -type d` ; do \
105            echo "test -z \"$(prefix)/doc/simgrid/$$file\" || $(mkdir_p) \"$(prefix)/doc/simgrid/$$file\"";\
106            test -z "$(DESTDIR)/$(prefix)/doc/simgrid/$$file" || $(mkdir_p) "$(DESTDIR)/$(prefix)/doc/simgrid/$$file";\
107         done
108         @for file in `find html/ -type f` ; do \
109            echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)/$(prefix)/doc/simgrid/$$file'";\
110            $(INSTALL_DATA) $$file $(DESTDIR)/$(prefix)/doc/simgrid/$$file ;\
111         done
112
113 uninstall-local:
114         for file in `find html/ -type f` ; do \
115            echo " rm -f '$(prefix)/doc/simgrid/$$file'";\
116            rm -f $(prefix)/doc/simgrid/$$file ;\
117         done
118
119
120 check-gtut-tocs:
121         @echo Check individual TOCs
122         @for n in gtut-tour-*.doc ; do \
123           sed -n '/Table of Contents/,/hr/p' $$n|grep ref > tmp.curtoc; \
124           \
125           grep -E '\\s?u?b?section' $$n | grep -v _toc| \
126              sed -e 's/\\section //' -e 's/\\subsection /subsection/' -e 's/ .*//' |\
127              sed -e 's/^/ - \\ref /' -e 's/- \\ref subsection/   - \\ref /' > tmp.realtoc; \
128           \
129           if ! diff -q tmp.curtoc tmp.realtoc >/dev/null; then \
130             echo Wrong toc for $$n. Should be ; \
131             cat tmp.realtoc; \
132           fi ; \
133         done
134         @rm tmp.realtoc tmp.curtoc
135         @echo "Check main TOC"
136         @for n in gtut-tour-*doc; do \
137           grep @page $$n |sed -e 's/@page //' -e 's/ .*//' -e 's/^/ - \\ref /' >>tmp.realtoc;\
138           sed -n -e '/Table of Contents/,/hr/p' $$n|sed -e 's/^/   /'|\
139              grep -v toc|grep -v '<hr>'|grep [^[:blank:]] >>tmp.realtoc;\
140         done
141         @grep ' *- \\ref' gtut-tour.doc > tmp.curtoc
142         @if ! diff -b -u tmp.curtoc tmp.realtoc ; then \
143           echo "Wrong toc for gtut-tour.doc Right one is in tmp.realtoc"; \
144         else \
145           rm tmp.realtoc; \
146         fi ;
147         @rm tmp.curtoc
148
149 .PHONY: html html/
150
151 include $(top_srcdir)/acmacro/dist-files.mk