Debug msg
[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
53e94895 24if BUILD_DOC
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
ec6160d5 56if EN_HLT_GLOBAL
57MODULES += global
58endif
59
ccef02e8 60# if EN_HLT_ITS
61# MODULES += ITS
62# endif
63
b22e91eb 64#PDF = latex/refman.pdf
b521659f 65TAGS = $(PACKAGE).tags
66else
67HTML =
68TAGS =
69endif
70
ae1c1854 71if MONOLITHIC_DOC
72RUN_MODULES =
73MAIN_MODULE = doxymono.conf readme.c sample_readme.c module_group.c
74MESSAGE = monolithic
75else
76RUN_MODULES = $(TAGS) $(MODULES)
77MAIN_MODULE = doxymain.conf
78MESSAGE = main
79endif
80
2efb85be 81DISTCLEANFILES = doxy.log $(PACKAGE).tags
82
83CLEANFILES = $(MODULES:%=$(PACKAGE).%.tags) \
84 $(MODULES:%=%.conf)
85
b22e91eb 86SECTION_FILTER = Directory File
87CLASS_FILTER = structAliHLTRawBuffer \
88 classAliHLTDataBuffer \
89 structAliHLTDataSegment \
90 TObject \
91 structAliHLTComponentEnvironment
92
b521659f 93%.png:%.fig
94 fig2dev -Lpng $<
95
ae1c1854 96all-local: $(RUN_MODULES) $(HTML) $(PDF)
b521659f 97
98
99clean-local:
ae1c1854 100 rm -rf *~ html latex man readme.c sample_readme.c module_group.c $(MAIN_MODULE) $(TAGS)
b521659f 101
9be2600f 102readme.c: @top_srcdir@/README
103 @cat $< | sed -e '/^=/s|=||g' -e '/^-/s|-||g' | \
104 sed -e '/^+/d' | \
105 sed -e '/^[0-9]. /s|^\([0-9]*\)\.|@section readme_\1 |' | \
106 sed -e '/^[0-9]*.[0-9] /s|^\([0-9]*\)\.\([0-9]*\)|@subsection readme_\1_\2 |' | \
107 sed -e '/^ [-()\<a-zA-Z0-9.]/s|\([<>]\)|\\\1|g' | \
108 sed -e '/^ [-()\<a-zA-Z0-9.]/s|\(.*\)|<tt> \1</tt><br>|' | \
109 sed -e 's|\!\!\!\!|<b>|' -e 's|\!\!\!|</b>|' > $@_work
ccef02e8 110 @echo "/** @file $@" > $@
9be2600f 111 @echo ' @brief autogenerated from README.' >> $@
112 @echo ' @see @ref readme */' >> $@
113 @echo '/** ' >> $@
114 @echo ' @page readme README' >> $@
115 @echo ' @section readme_toc TOC' >> $@
116 @(for i in `cat $@_work | sed -e /@section/!d | cut -d ' ' -f 2` ; do \
117 echo "- @ref $$i" ; \
118 done ) >> $@
119 @echo >> $@
120 @cat $@_work >> $@
121 @echo '*/' >> $@
122 @rm $@_work
123
7b969ef7 124sample_readme.c: @top_srcdir@/SampleLib/README
ccef02e8 125 @echo "/** @file $@" > $@
7b969ef7 126 @echo ' @brief autogenerated from SampleLib/README.' >> $@
127 @echo '*/' >> $@
128 @echo '/** ' >> $@
129 @echo ' @page sample_readme Creating a new Library' >> $@
130 @echo '<pre>' >> $@
131 @cat $< | \
132 sed -e 's|<|\&lt;|g' -e 's|>|\&gt;|g' >> $@
133 @echo '</pre>' >> $@
134 @echo '*/' >> $@
135
ccef02e8 136module_group.c: Makefile
137 @echo "/** @file $@" > $@
138 @echo ' @brief autogenerated from Makefile.' >> $@
139 @echo '*/' >> $@
140 @echo '/** @defgroup alihlt_modules HLT Detector Modules' >> $@
141 @echo >> $@
142 @echo 'Available detector modules:' >> $@
e99f29ed 143 @$(foreach m, $(MODULES), echo "- @ref alihlt_`echo $(m) | tr '[:upper:]' '[:lower:]' | sed -e 's|lib||'`" >> $@;)
ccef02e8 144 @echo '*/' >> $@
145
146doxymain.conf: doxygen.conf Makefile
147 @t="$(foreach m, $(MODULES), @PACKAGE@.$(m).tags=$(m))"; \
28c214e9 148 cat $< | sed -e "s|^\(TAGFILES[ ]*=\)|\1 $$t|" -e "/^WARN/s|=[ ]*NO|= YES|"> $@
ccef02e8 149
ae1c1854 150doxymono.conf: doxygen.conf Makefile
151 @t="$(foreach m, $(MODULES), @top_srcdir@/$(m))"; \
28c214e9 152 cat $< | sed -e "s|^\(INPUT[ ]*=\)|\1 $$t|" -e "/^WARN/s|=[ ]*NO|= YES|"> $@
ae1c1854 153
ccef02e8 154$(TAGS): doxygen.conf mainpage.c readme.c sample_readme.c module_group.c
155 @echo creating main tag file ...
156 $(DOXYGEN) $<
157
ae1c1854 158$(HTML): $(MAIN_MODULE)
159 @echo creating $(MESSAGE) documentation ...
b521659f 160 $(DOXYGEN) $<
b521659f 161
2efb85be 162%.conf: doxymodule.conf Makefile
ccef02e8 163 @e=`find $(top_srcdir)/$(@:.conf=) -name configure.ac -exec dirname {} \;`; \
164 e=`echo $$e | tr -d '\n'`; \
165 cat $< | sed -e "s|@DOXYMODULE@|$(@:.conf=)|" -e "s|^\(EXCLUDE[ ]*=\)|\1 $$e|" > $@
2efb85be 166
167html/%/index.html: %.conf
ccef02e8 168 @echo creating module ...
2efb85be 169 $(DOXYGEN) $<
170
171$(MODULES:%=html/%):
172 @mkdir -p $@
173
174$(MODULES): $(MODULES:%=html/%) $(MODULES:%=html/%/index.html)
175
176$(MODULES:%=clean-%):
177 rm -r html/$(patsubst clean-%,%,$(@))
178
b521659f 179tar-ball:$(HTML)
180 if test -f html/index.html ; then \
181 mv html $(PACKAGE) ; \
182 tar -czvf ../$(PACKAGE)-$(VERSION)-doc.tar.gz $(PACKAGE) ; \
183 mv $(PACKAGE) html ; fi
184
b22e91eb 185$(PDF:.pdf=.tex_): $(PDF:.pdf=.tex)
186 cat $< \
187 $(foreach i, $(SECTION_FILTER), \
188 | sed -e '/$i Documentation/,/section/ { /input/d}' \
189 | sed -e '/$i Documentation/ d' \
190 ) \
191 $(foreach i, $(CLASS_FILTER), \
192 | sed -e '/input{$i}/d' \
193 ) \
194 > $@
195 cp -a $@ $<
b521659f 196
b22e91eb 197$(PDF): latex/Makefile $(PDF:.pdf=.tex_)
198 @(cd latex && $(MAKE))
b521659f 199#
200# EOF
201#