]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/doc/Makefile.am
documentation
[u/mrichter/AliRoot.git] / HLT / doc / Makefile.am
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
30 EXTRA_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
36
37 DISTCLEANFILES          = doxy.log $(PACKAGE).tags
38 if HAVE_DOXYGEN
39 HTML                    = html/index.html
40 #PDF                    = latex/refman.pdf
41 TAGS                    = $(PACKAGE).tags
42 else 
43 HTML                    =
44 TAGS                    = 
45 endif
46
47 SECTION_FILTER  = Directory File
48 CLASS_FILTER    = structAliHLTRawBuffer \
49                   classAliHLTDataBuffer \
50                   structAliHLTDataSegment \
51                   TObject \
52                   structAliHLTComponentEnvironment
53
54 %.png:%.fig
55         fig2dev -Lpng $< 
56
57 all-local:$(HTML) $(PDF)
58
59
60 clean-local: 
61         rm -rf *~ html latex man
62
63 readme.c: @top_srcdir@/README
64         @cat $< | sed -e '/^=/s|=||g' -e '/^-/s|-||g'                     | \
65         sed -e '/^+/d'                                                    | \
66         sed -e '/^[0-9]. /s|^\([0-9]*\)\.|@section readme_\1 |'           | \
67         sed -e '/^[0-9]*.[0-9] /s|^\([0-9]*\)\.\([0-9]*\)|@subsection readme_\1_\2 |' | \
68         sed -e '/^  [-()\<a-zA-Z0-9.]/s|\([<>]\)|\\\1|g'                  | \
69         sed -e '/^  [-()\<a-zA-Z0-9.]/s|\(.*\)|<tt>  \1</tt><br>|'        | \
70         sed -e 's|\!\!\!\!|<b>|' -e 's|\!\!\!|</b>|'                      > $@_work
71         @echo '/** @file readme.c'                                        > $@
72         @echo '    @author Matthias Richter'                             >> $@
73         @echo '    @brief  autogenerated from README.'                   >> $@
74         @echo '    @see  @ref readme                  */'                >> $@
75         @echo '/** '                                                     >> $@
76         @echo '    @page readme README'                                  >> $@
77         @echo '    @section readme_toc TOC'                              >> $@
78         @(for i in `cat $@_work | sed -e /@section/!d | cut -d ' ' -f 2` ; do \
79           echo "- @ref $$i" ; \
80         done )                                                           >> $@
81         @echo                                                            >> $@
82         @cat $@_work                                                     >> $@
83         @echo '*/'                                                       >> $@
84         @rm $@_work
85
86 html/index.html $(PACKAGE).tags: doxygen.conf Makefile mainpage.c readme.c
87         $(DOXYGEN) $<  
88
89 tar-ball:$(HTML)
90         if test -f html/index.html ; then \
91           mv html $(PACKAGE) ;  \
92           tar -czvf ../$(PACKAGE)-$(VERSION)-doc.tar.gz $(PACKAGE) ; \
93           mv $(PACKAGE) html ; fi 
94
95 $(PDF:.pdf=.tex_): $(PDF:.pdf=.tex)
96         cat $< \
97         $(foreach i, $(SECTION_FILTER), \
98          | sed -e '/$i Documentation/,/section/ { /input/d}' \
99          | sed -e '/$i Documentation/ d' \
100         ) \
101         $(foreach i, $(CLASS_FILTER), \
102          | sed -e '/input{$i}/d' \
103         ) \
104         > $@
105         cp -a $@ $<
106
107 $(PDF): latex/Makefile $(PDF:.pdf=.tex_)
108         @(cd latex && $(MAKE))
109 #
110 # EOF
111 #