minors
[u/mrichter/AliRoot.git] / HLT / doc / Makefile.am
CommitLineData
b521659f 1# $Id$
2# Makefile template for the Alice HLT documentation
3#
4#***********************************************************************
5#
6# Alice HLT project
7# Copyright (c) 2005
8#
9# This file is property of and copyright by the Experimental Nuclear
10# Physics Group, Dep. of Physics and Technology
11# University of Bergen, Norway, 2004
12# This file has been written by Matthias Richter,
13# Matthias.Richter@ift.uib.no
14#
15# Permission to use, copy, modify and distribute this software and its
16# documentation strictly for non-commercial purposes is hereby granted
17# without fee, provided that the above copyright notice appears in all
18# copies and that both the copyright notice and this permission notice
19# appear in the supporting documentation. The authors make no claims
20# about the suitability of this software for any purpose. It is
21# provided "as is" without express or implied warranty.
22#
23# You should have received a copy of the GNU Lesser General Public
24# License along with this library; if not, write to the Free
25# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
26# MA 02111-1307 USA
27#
28#***********************************************************************/
29
85869391 30EXTRA_DIST = mainpage.c \
31 pics/HLT-AliRoot-Integration_overview.png \
32 pics/HLT-AliRoot-Integration_overview.eps \
33 pics/HLT-AliRoot-Integration_overview.png \
34 pics/HLT-AliRoot-Integration_overview.eps \
35 pics/PubSub_WrapperComponent.png
b521659f 36
b521659f 37if HAVE_DOXYGEN
b22e91eb 38HTML = html/index.html
2efb85be 39MODULES =
b22e91eb 40#PDF = latex/refman.pdf
b521659f 41TAGS = $(PACKAGE).tags
42else
43HTML =
44TAGS =
45endif
46
2efb85be 47DISTCLEANFILES = doxy.log $(PACKAGE).tags
48
49CLEANFILES = $(MODULES:%=$(PACKAGE).%.tags) \
50 $(MODULES:%=%.conf)
51
b22e91eb 52SECTION_FILTER = Directory File
53CLASS_FILTER = structAliHLTRawBuffer \
54 classAliHLTDataBuffer \
55 structAliHLTDataSegment \
56 TObject \
57 structAliHLTComponentEnvironment
58
b521659f 59%.png:%.fig
60 fig2dev -Lpng $<
61
2efb85be 62all-local:$(HTML) $(PDF) $(MODULES)
b521659f 63
64
65clean-local:
c018a1bd 66 rm -rf *~ html latex man readme.c
b521659f 67
9be2600f 68readme.c: @top_srcdir@/README
69 @cat $< | sed -e '/^=/s|=||g' -e '/^-/s|-||g' | \
70 sed -e '/^+/d' | \
71 sed -e '/^[0-9]. /s|^\([0-9]*\)\.|@section readme_\1 |' | \
72 sed -e '/^[0-9]*.[0-9] /s|^\([0-9]*\)\.\([0-9]*\)|@subsection readme_\1_\2 |' | \
73 sed -e '/^ [-()\<a-zA-Z0-9.]/s|\([<>]\)|\\\1|g' | \
74 sed -e '/^ [-()\<a-zA-Z0-9.]/s|\(.*\)|<tt> \1</tt><br>|' | \
75 sed -e 's|\!\!\!\!|<b>|' -e 's|\!\!\!|</b>|' > $@_work
76 @echo '/** @file readme.c' > $@
77 @echo ' @author Matthias Richter' >> $@
78 @echo ' @brief autogenerated from README.' >> $@
79 @echo ' @see @ref readme */' >> $@
80 @echo '/** ' >> $@
81 @echo ' @page readme README' >> $@
82 @echo ' @section readme_toc TOC' >> $@
83 @(for i in `cat $@_work | sed -e /@section/!d | cut -d ' ' -f 2` ; do \
84 echo "- @ref $$i" ; \
85 done ) >> $@
86 @echo >> $@
87 @cat $@_work >> $@
88 @echo '*/' >> $@
89 @rm $@_work
90
2efb85be 91$(HTML) $(PACKAGE).tags: doxygen.conf Makefile mainpage.c readme.c
b521659f 92 $(DOXYGEN) $<
b521659f 93
2efb85be 94%.conf: doxymodule.conf Makefile
95 cat $< | sed -e "s|@DOXYMODULE@|$(@:.conf=)|" > $@
96
97html/%/index.html: %.conf
98 $(DOXYGEN) $<
99
100$(MODULES:%=html/%):
101 @mkdir -p $@
102
103$(MODULES): $(MODULES:%=html/%) $(MODULES:%=html/%/index.html)
104
105$(MODULES:%=clean-%):
106 rm -r html/$(patsubst clean-%,%,$(@))
107
b521659f 108tar-ball:$(HTML)
109 if test -f html/index.html ; then \
110 mv html $(PACKAGE) ; \
111 tar -czvf ../$(PACKAGE)-$(VERSION)-doc.tar.gz $(PACKAGE) ; \
112 mv $(PACKAGE) html ; fi
113
b22e91eb 114$(PDF:.pdf=.tex_): $(PDF:.pdf=.tex)
115 cat $< \
116 $(foreach i, $(SECTION_FILTER), \
117 | sed -e '/$i Documentation/,/section/ { /input/d}' \
118 | sed -e '/$i Documentation/ d' \
119 ) \
120 $(foreach i, $(CLASS_FILTER), \
121 | sed -e '/input{$i}/d' \
122 ) \
123 > $@
124 cp -a $@ $<
b521659f 125
b22e91eb 126$(PDF): latex/Makefile $(PDF:.pdf=.tex_)
127 @(cd latex && $(MAKE))
b521659f 128#
129# EOF
130#