2 # Makefile template for the Alice HLT documentation
4 #**************************************************************************
5 #* This file is property of and copyright by the ALICE HLT Project *
6 #* ALICE Experiment at CERN, All rights reserved. *
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 #**************************************************************************
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
25 HTML = html/index.html
60 #PDF = latex/refman.pdf
61 TAGS = $(PACKAGE).tags
69 MAIN_MODULE = doxymono.conf readme.c sample_readme.c module_group.c
72 RUN_MODULES = $(TAGS) $(MODULES)
73 MAIN_MODULE = doxymain.conf
77 DISTCLEANFILES = doxy.log $(PACKAGE).tags
79 CLEANFILES = $(MODULES:%=$(PACKAGE).%.tags) \
82 SECTION_FILTER = Directory File
83 CLASS_FILTER = structAliHLTRawBuffer \
84 classAliHLTDataBuffer \
85 structAliHLTDataSegment \
87 structAliHLTComponentEnvironment
92 all-local: $(RUN_MODULES) $(HTML) $(PDF)
96 rm -rf *~ html latex man readme.c sample_readme.c module_group.c $(MAIN_MODULE) $(TAGS)
98 readme.c: @top_srcdir@/README
99 @cat $< | sed -e '/^=/s|=||g' -e '/^-/s|-||g' | \
101 sed -e '/^[0-9]. /s|^\([0-9]*\)\.|@section readme_\1 |' | \
102 sed -e '/^[0-9]*.[0-9] /s|^\([0-9]*\)\.\([0-9]*\)|@subsection readme_\1_\2 |' | \
103 sed -e '/^ [-()\<a-zA-Z0-9.]/s|\([<>]\)|\\\1|g' | \
104 sed -e '/^ [-()\<a-zA-Z0-9.]/s|\(.*\)|<tt> \1</tt><br>|' | \
105 sed -e 's|\!\!\!\!|<b>|' -e 's|\!\!\!|</b>|' > $@_work
106 @echo "/** @file $@" > $@
107 @echo ' @brief autogenerated from README.' >> $@
108 @echo ' @see @ref readme */' >> $@
110 @echo ' @page readme README' >> $@
111 @echo ' @section readme_toc TOC' >> $@
112 @(for i in `cat $@_work | sed -e /@section/!d | cut -d ' ' -f 2` ; do \
113 echo "- @ref $$i" ; \
120 sample_readme.c: @top_srcdir@/SampleLib/README
121 @echo "/** @file $@" > $@
122 @echo ' @brief autogenerated from SampleLib/README.' >> $@
125 @echo ' @page sample_readme Creating a new Library' >> $@
128 sed -e 's|<|\<|g' -e 's|>|\>|g' >> $@
132 module_group.c: Makefile
133 @echo "/** @file $@" > $@
134 @echo ' @brief autogenerated from Makefile.' >> $@
136 @echo '/** @defgroup alihlt_modules HLT Detector Modules' >> $@
138 @echo 'Available detector modules:' >> $@
139 @$(foreach m, $(MODULES), echo "- @ref alihlt_`echo $(m) | tr '[:upper:]' '[:lower:]' | sed -e 's|lib||'`" >> $@;)
142 doxymain.conf: doxygen.conf Makefile
143 @t="$(foreach m, $(MODULES), @PACKAGE@.$(m).tags=$(m))"; \
144 cat $< | sed -e "s|^\(TAGFILES[ ]*=\)|\1 $$t|" -e "/^WARN/s|NO|YES|"> $@
146 doxymono.conf: doxygen.conf Makefile
147 @t="$(foreach m, $(MODULES), @top_srcdir@/$(m))"; \
148 cat $< | sed -e "s|^\(INPUT[ ]*=\)|\1 $$t|" -e "/^WARN/s|NO|YES|"> $@
150 $(TAGS): doxygen.conf mainpage.c readme.c sample_readme.c module_group.c
151 @echo creating main tag file ...
154 $(HTML): $(MAIN_MODULE)
155 @echo creating $(MESSAGE) documentation ...
158 %.conf: doxymodule.conf Makefile
159 @e=`find $(top_srcdir)/$(@:.conf=) -name configure.ac -exec dirname {} \;`; \
160 e=`echo $$e | tr -d '\n'`; \
161 cat $< | sed -e "s|@DOXYMODULE@|$(@:.conf=)|" -e "s|^\(EXCLUDE[ ]*=\)|\1 $$e|" > $@
163 html/%/index.html: %.conf
164 @echo creating module ...
170 $(MODULES): $(MODULES:%=html/%) $(MODULES:%=html/%/index.html)
172 $(MODULES:%=clean-%):
173 rm -r html/$(patsubst clean-%,%,$(@))
176 if test -f html/index.html ; then \
177 mv html $(PACKAGE) ; \
178 tar -czvf ../$(PACKAGE)-$(VERSION)-doc.tar.gz $(PACKAGE) ; \
179 mv $(PACKAGE) html ; fi
181 $(PDF:.pdf=.tex_): $(PDF:.pdf=.tex)
183 $(foreach i, $(SECTION_FILTER), \
184 | sed -e '/$i Documentation/,/section/ { /input/d}' \
185 | sed -e '/$i Documentation/ d' \
187 $(foreach i, $(CLASS_FILTER), \
188 | sed -e '/input{$i}/d' \
193 $(PDF): latex/Makefile $(PDF:.pdf=.tex_)
194 @(cd latex && $(MAKE))