]>
Commit | Line | Data |
---|---|---|
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 | 17 | EXTRA_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 | 24 | if HAVE_DOXYGEN |
b22e91eb | 25 | HTML = html/index.html |
2efb85be | 26 | MODULES = |
ccef02e8 | 27 | |
28 | if EN_HLT_TPC | |
29 | MODULES += TPCLib | |
30 | endif | |
31 | ||
32 | if EN_HLT_RCU | |
33 | MODULES += RCU | |
34 | endif | |
35 | ||
36 | if EN_HLT_PHOS | |
37 | MODULES += PHOS | |
38 | endif | |
39 | ||
40 | if EN_HLT_TRD | |
41 | MODULES += TRD | |
42 | endif | |
43 | ||
44 | if EN_HLT_MUON | |
45 | MODULES += MUON | |
46 | endif | |
47 | ||
48 | if EN_HLT_COMP | |
49 | MODULES += comp | |
50 | endif | |
51 | ||
52 | if EN_HLT_TRIGGER | |
53 | MODULES += trigger | |
54 | endif | |
55 | ||
ec6160d5 | 56 | if EN_HLT_GLOBAL |
57 | MODULES += global | |
58 | endif | |
59 | ||
ccef02e8 | 60 | # if EN_HLT_ITS |
61 | # MODULES += ITS | |
62 | # endif | |
63 | ||
b22e91eb | 64 | #PDF = latex/refman.pdf |
b521659f | 65 | TAGS = $(PACKAGE).tags |
66 | else | |
67 | HTML = | |
68 | TAGS = | |
69 | endif | |
70 | ||
ae1c1854 | 71 | if MONOLITHIC_DOC |
72 | RUN_MODULES = | |
73 | MAIN_MODULE = doxymono.conf readme.c sample_readme.c module_group.c | |
74 | MESSAGE = monolithic | |
75 | else | |
76 | RUN_MODULES = $(TAGS) $(MODULES) | |
77 | MAIN_MODULE = doxymain.conf | |
78 | MESSAGE = main | |
79 | endif | |
80 | ||
2efb85be | 81 | DISTCLEANFILES = doxy.log $(PACKAGE).tags |
82 | ||
83 | CLEANFILES = $(MODULES:%=$(PACKAGE).%.tags) \ | |
84 | $(MODULES:%=%.conf) | |
85 | ||
b22e91eb | 86 | SECTION_FILTER = Directory File |
87 | CLASS_FILTER = structAliHLTRawBuffer \ | |
88 | classAliHLTDataBuffer \ | |
89 | structAliHLTDataSegment \ | |
90 | TObject \ | |
91 | structAliHLTComponentEnvironment | |
92 | ||
b521659f | 93 | %.png:%.fig |
94 | fig2dev -Lpng $< | |
95 | ||
ae1c1854 | 96 | all-local: $(RUN_MODULES) $(HTML) $(PDF) |
b521659f | 97 | |
98 | ||
99 | clean-local: | |
ae1c1854 | 100 | rm -rf *~ html latex man readme.c sample_readme.c module_group.c $(MAIN_MODULE) $(TAGS) |
b521659f | 101 | |
9be2600f | 102 | readme.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 | 124 | sample_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|<|\<|g' -e 's|>|\>|g' >> $@ | |
133 | @echo '</pre>' >> $@ | |
134 | @echo '*/' >> $@ | |
135 | ||
ccef02e8 | 136 | module_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 | ||
146 | doxymain.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 | 150 | doxymono.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 | |
167 | html/%/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 | 179 | tar-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 | # |