Updated geometry. Includes latest fixes in SPD
[u/mrichter/AliRoot.git] / HLT / doc / Makefile.am
CommitLineData
b521659f 1# $Id$
2# Makefile template for the Alice HLT documentation
3#
ccef02e8 4#**************************************************************************
5#* This file is property of and copyright by the ALICE HLT Project *
6#* ALICE Experiment at CERN, All rights reserved. *
7#* *
8#* Permission to use, copy, modify and distribute this software and its *
9#* documentation strictly for non-commercial purposes is hereby granted *
10#* without fee, provided that the above copyright notice appears in all *
11#* copies and that both the copyright notice and this permission notice *
12#* appear in the supporting documentation. The authors make no claims *
13#* about the suitability of this software for any purpose. It is *
14#* provided "as is" without express or implied warranty. *
15#**************************************************************************
b521659f 16
85869391 17EXTRA_DIST = mainpage.c \
18 pics/HLT-AliRoot-Integration_overview.png \
19 pics/HLT-AliRoot-Integration_overview.eps \
20 pics/HLT-AliRoot-Integration_overview.png \
21 pics/HLT-AliRoot-Integration_overview.eps \
22 pics/PubSub_WrapperComponent.png
b521659f 23
b521659f 24if HAVE_DOXYGEN
b22e91eb 25HTML = html/index.html
2efb85be 26MODULES =
ccef02e8 27
28if EN_HLT_TPC
29MODULES += TPCLib
30endif
31
32if EN_HLT_RCU
33MODULES += RCU
34endif
35
36if EN_HLT_PHOS
37MODULES += PHOS
38endif
39
40if EN_HLT_TRD
41MODULES += TRD
42endif
43
44if EN_HLT_MUON
45MODULES += MUON
46endif
47
48if EN_HLT_COMP
49MODULES += comp
50endif
51
52if EN_HLT_TRIGGER
53MODULES += trigger
54endif
55
56# if EN_HLT_ITS
57# MODULES += ITS
58# endif
59
b22e91eb 60#PDF = latex/refman.pdf
b521659f 61TAGS = $(PACKAGE).tags
62else
63HTML =
64TAGS =
65endif
66
2efb85be 67DISTCLEANFILES = doxy.log $(PACKAGE).tags
68
69CLEANFILES = $(MODULES:%=$(PACKAGE).%.tags) \
70 $(MODULES:%=%.conf)
71
b22e91eb 72SECTION_FILTER = Directory File
73CLASS_FILTER = structAliHLTRawBuffer \
74 classAliHLTDataBuffer \
75 structAliHLTDataSegment \
76 TObject \
77 structAliHLTComponentEnvironment
78
b521659f 79%.png:%.fig
80 fig2dev -Lpng $<
81
ccef02e8 82all-local: $(TAGS) $(MODULES) $(HTML) $(PDF)
b521659f 83
84
85clean-local:
833b3167 86 rm -rf *~ html latex man readme.c sample_readme.c module_group.c doxymain.conf
b521659f 87
9be2600f 88readme.c: @top_srcdir@/README
89 @cat $< | sed -e '/^=/s|=||g' -e '/^-/s|-||g' | \
90 sed -e '/^+/d' | \
91 sed -e '/^[0-9]. /s|^\([0-9]*\)\.|@section readme_\1 |' | \
92 sed -e '/^[0-9]*.[0-9] /s|^\([0-9]*\)\.\([0-9]*\)|@subsection readme_\1_\2 |' | \
93 sed -e '/^ [-()\<a-zA-Z0-9.]/s|\([<>]\)|\\\1|g' | \
94 sed -e '/^ [-()\<a-zA-Z0-9.]/s|\(.*\)|<tt> \1</tt><br>|' | \
95 sed -e 's|\!\!\!\!|<b>|' -e 's|\!\!\!|</b>|' > $@_work
ccef02e8 96 @echo "/** @file $@" > $@
9be2600f 97 @echo ' @brief autogenerated from README.' >> $@
98 @echo ' @see @ref readme */' >> $@
99 @echo '/** ' >> $@
100 @echo ' @page readme README' >> $@
101 @echo ' @section readme_toc TOC' >> $@
102 @(for i in `cat $@_work | sed -e /@section/!d | cut -d ' ' -f 2` ; do \
103 echo "- @ref $$i" ; \
104 done ) >> $@
105 @echo >> $@
106 @cat $@_work >> $@
107 @echo '*/' >> $@
108 @rm $@_work
109
7b969ef7 110sample_readme.c: @top_srcdir@/SampleLib/README
ccef02e8 111 @echo "/** @file $@" > $@
7b969ef7 112 @echo ' @brief autogenerated from SampleLib/README.' >> $@
113 @echo '*/' >> $@
114 @echo '/** ' >> $@
115 @echo ' @page sample_readme Creating a new Library' >> $@
116 @echo '<pre>' >> $@
117 @cat $< | \
118 sed -e 's|<|\&lt;|g' -e 's|>|\&gt;|g' >> $@
119 @echo '</pre>' >> $@
120 @echo '*/' >> $@
121
ccef02e8 122module_group.c: Makefile
123 @echo "/** @file $@" > $@
124 @echo ' @brief autogenerated from Makefile.' >> $@
125 @echo '*/' >> $@
126 @echo '/** @defgroup alihlt_modules HLT Detector Modules' >> $@
127 @echo >> $@
128 @echo 'Available detector modules:' >> $@
e99f29ed 129 @$(foreach m, $(MODULES), echo "- @ref alihlt_`echo $(m) | tr '[:upper:]' '[:lower:]' | sed -e 's|lib||'`" >> $@;)
ccef02e8 130 @echo '*/' >> $@
131
132doxymain.conf: doxygen.conf Makefile
133 @t="$(foreach m, $(MODULES), @PACKAGE@.$(m).tags=$(m))"; \
134 cat $< | sed -e "s|^\(TAGFILES[ ]*=\)|\1 $$t|" -e "/^WARN/s|NO|YES|"> $@
135
136$(TAGS): doxygen.conf mainpage.c readme.c sample_readme.c module_group.c
137 @echo creating main tag file ...
138 $(DOXYGEN) $<
139
e99f29ed 140$(HTML): doxymain.conf
ccef02e8 141 @echo creating main documentation ...
b521659f 142 $(DOXYGEN) $<
b521659f 143
2efb85be 144%.conf: doxymodule.conf Makefile
ccef02e8 145 @e=`find $(top_srcdir)/$(@:.conf=) -name configure.ac -exec dirname {} \;`; \
146 e=`echo $$e | tr -d '\n'`; \
147 cat $< | sed -e "s|@DOXYMODULE@|$(@:.conf=)|" -e "s|^\(EXCLUDE[ ]*=\)|\1 $$e|" > $@
2efb85be 148
149html/%/index.html: %.conf
ccef02e8 150 @echo creating module ...
2efb85be 151 $(DOXYGEN) $<
152
153$(MODULES:%=html/%):
154 @mkdir -p $@
155
156$(MODULES): $(MODULES:%=html/%) $(MODULES:%=html/%/index.html)
157
158$(MODULES:%=clean-%):
159 rm -r html/$(patsubst clean-%,%,$(@))
160
b521659f 161tar-ball:$(HTML)
162 if test -f html/index.html ; then \
163 mv html $(PACKAGE) ; \
164 tar -czvf ../$(PACKAGE)-$(VERSION)-doc.tar.gz $(PACKAGE) ; \
165 mv $(PACKAGE) html ; fi
166
b22e91eb 167$(PDF:.pdf=.tex_): $(PDF:.pdf=.tex)
168 cat $< \
169 $(foreach i, $(SECTION_FILTER), \
170 | sed -e '/$i Documentation/,/section/ { /input/d}' \
171 | sed -e '/$i Documentation/ d' \
172 ) \
173 $(foreach i, $(CLASS_FILTER), \
174 | sed -e '/input{$i}/d' \
175 ) \
176 > $@
177 cp -a $@ $<
b521659f 178
b22e91eb 179$(PDF): latex/Makefile $(PDF:.pdf=.tex_)
180 @(cd latex && $(MAKE))
b521659f 181#
182# EOF
183#