]>
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 | ||
56 | # if EN_HLT_ITS | |
57 | # MODULES += ITS | |
58 | # endif | |
59 | ||
b22e91eb | 60 | #PDF = latex/refman.pdf |
b521659f | 61 | TAGS = $(PACKAGE).tags |
62 | else | |
63 | HTML = | |
64 | TAGS = | |
65 | endif | |
66 | ||
2efb85be | 67 | DISTCLEANFILES = doxy.log $(PACKAGE).tags |
68 | ||
69 | CLEANFILES = $(MODULES:%=$(PACKAGE).%.tags) \ | |
70 | $(MODULES:%=%.conf) | |
71 | ||
b22e91eb | 72 | SECTION_FILTER = Directory File |
73 | CLASS_FILTER = structAliHLTRawBuffer \ | |
74 | classAliHLTDataBuffer \ | |
75 | structAliHLTDataSegment \ | |
76 | TObject \ | |
77 | structAliHLTComponentEnvironment | |
78 | ||
b521659f | 79 | %.png:%.fig |
80 | fig2dev -Lpng $< | |
81 | ||
ccef02e8 | 82 | all-local: $(TAGS) $(MODULES) $(HTML) $(PDF) |
b521659f | 83 | |
84 | ||
85 | clean-local: | |
ccef02e8 | 86 | rm -rf *~ html latex man readme.c sample_readme.c module_group.c |
b521659f | 87 | |
9be2600f | 88 | readme.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 | 110 | sample_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|<|\<|g' -e 's|>|\>|g' >> $@ | |
119 | @echo '</pre>' >> $@ | |
120 | @echo '*/' >> $@ | |
121 | ||
ccef02e8 | 122 | module_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:' >> $@ | |
129 | $(foreach m, $(MODULES), echo "- @ref alihlt_`echo $(m) | tr '[:upper:]' '[:lower:]' | sed -e 's|lib||'`" >> $@;) | |
130 | @echo '*/' >> $@ | |
131 | ||
132 | doxymain.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 | ||
140 | $(HTML): doxymain.conf $(TAGS) | |
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 | |
149 | html/%/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 | 161 | tar-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 | # |