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
67 DISTCLEANFILES = doxy.log $(PACKAGE).tags
69 CLEANFILES = $(MODULES:%=$(PACKAGE).%.tags) \
72 SECTION_FILTER = Directory File
73 CLASS_FILTER = structAliHLTRawBuffer \
74 classAliHLTDataBuffer \
75 structAliHLTDataSegment \
77 structAliHLTComponentEnvironment
82 all-local: $(TAGS) $(MODULES) $(HTML) $(PDF)
86 rm -rf *~ html latex man readme.c sample_readme.c module_group.c
88 readme.c: @top_srcdir@/README
89 @cat $< | sed -e '/^=/s|=||g' -e '/^-/s|-||g' | \
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
96 @echo "/** @file $@" > $@
97 @echo ' @brief autogenerated from README.' >> $@
98 @echo ' @see @ref readme */' >> $@
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" ; \
110 sample_readme.c: @top_srcdir@/SampleLib/README
111 @echo "/** @file $@" > $@
112 @echo ' @brief autogenerated from SampleLib/README.' >> $@
115 @echo ' @page sample_readme Creating a new Library' >> $@
118 sed -e 's|<|\<|g' -e 's|>|\>|g' >> $@
122 module_group.c: Makefile
123 @echo "/** @file $@" > $@
124 @echo ' @brief autogenerated from Makefile.' >> $@
126 @echo '/** @defgroup alihlt_modules HLT Detector Modules' >> $@
128 @echo 'Available detector modules:' >> $@
129 $(foreach m, $(MODULES), echo "- @ref alihlt_`echo $(m) | tr '[:upper:]' '[:lower:]' | sed -e 's|lib||'`" >> $@;)
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|"> $@
136 $(TAGS): doxygen.conf mainpage.c readme.c sample_readme.c module_group.c
137 @echo creating main tag file ...
140 $(HTML): doxymain.conf $(TAGS)
141 @echo creating main documentation ...
144 %.conf: doxymodule.conf Makefile
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|" > $@
149 html/%/index.html: %.conf
150 @echo creating module ...
156 $(MODULES): $(MODULES:%=html/%) $(MODULES:%=html/%/index.html)
158 $(MODULES:%=clean-%):
159 rm -r html/$(patsubst clean-%,%,$(@))
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
167 $(PDF:.pdf=.tex_): $(PDF:.pdf=.tex)
169 $(foreach i, $(SECTION_FILTER), \
170 | sed -e '/$i Documentation/,/section/ { /input/d}' \
171 | sed -e '/$i Documentation/ d' \
173 $(foreach i, $(CLASS_FILTER), \
174 | sed -e '/input{$i}/d' \
179 $(PDF): latex/Makefile $(PDF:.pdf=.tex_)
180 @(cd latex && $(MAKE))