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
64 #PDF = latex/refman.pdf
65 TAGS = $(PACKAGE).tags
73 MAIN_MODULE = doxymono.conf readme.c sample_readme.c module_group.c
76 RUN_MODULES = $(TAGS) $(MODULES)
77 MAIN_MODULE = doxymain.conf
81 DISTCLEANFILES = doxy.log $(PACKAGE).tags
83 CLEANFILES = $(MODULES:%=$(PACKAGE).%.tags) \
86 SECTION_FILTER = Directory File
87 CLASS_FILTER = structAliHLTRawBuffer \
88 classAliHLTDataBuffer \
89 structAliHLTDataSegment \
91 structAliHLTComponentEnvironment
96 all-local: $(RUN_MODULES) $(HTML) $(PDF)
100 rm -rf *~ html latex man readme.c sample_readme.c module_group.c $(MAIN_MODULE) $(TAGS)
102 readme.c: @top_srcdir@/README
103 @cat $< | sed -e '/^=/s|=||g' -e '/^-/s|-||g' | \
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
110 @echo "/** @file $@" > $@
111 @echo ' @brief autogenerated from README.' >> $@
112 @echo ' @see @ref readme */' >> $@
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" ; \
124 sample_readme.c: @top_srcdir@/SampleLib/README
125 @echo "/** @file $@" > $@
126 @echo ' @brief autogenerated from SampleLib/README.' >> $@
129 @echo ' @page sample_readme Creating a new Library' >> $@
132 sed -e 's|<|\<|g' -e 's|>|\>|g' >> $@
136 module_group.c: Makefile
137 @echo "/** @file $@" > $@
138 @echo ' @brief autogenerated from Makefile.' >> $@
140 @echo '/** @defgroup alihlt_modules HLT Detector Modules' >> $@
142 @echo 'Available detector modules:' >> $@
143 @$(foreach m, $(MODULES), echo "- @ref alihlt_`echo $(m) | tr '[:upper:]' '[:lower:]' | sed -e 's|lib||'`" >> $@;)
146 doxymain.conf: doxygen.conf Makefile
147 @t="$(foreach m, $(MODULES), @PACKAGE@.$(m).tags=$(m))"; \
148 cat $< | sed -e "s|^\(TAGFILES[ ]*=\)|\1 $$t|" -e "/^WARN/s|=[ ]*NO|= YES|"> $@
150 doxymono.conf: doxygen.conf Makefile
151 @t="$(foreach m, $(MODULES), @top_srcdir@/$(m))"; \
152 cat $< | sed -e "s|^\(INPUT[ ]*=\)|\1 $$t|" -e "/^WARN/s|=[ ]*NO|= YES|"> $@
154 $(TAGS): doxygen.conf mainpage.c readme.c sample_readme.c module_group.c
155 @echo creating main tag file ...
158 $(HTML): $(MAIN_MODULE)
159 @echo creating $(MESSAGE) documentation ...
162 %.conf: doxymodule.conf Makefile
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|" > $@
167 html/%/index.html: %.conf
168 @echo creating module ...
174 $(MODULES): $(MODULES:%=html/%) $(MODULES:%=html/%/index.html)
176 $(MODULES:%=clean-%):
177 rm -r html/$(patsubst clean-%,%,$(@))
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
185 $(PDF:.pdf=.tex_): $(PDF:.pdf=.tex)
187 $(foreach i, $(SECTION_FILTER), \
188 | sed -e '/$i Documentation/,/section/ { /input/d}' \
189 | sed -e '/$i Documentation/ d' \
191 $(foreach i, $(CLASS_FILTER), \
192 | sed -e '/input{$i}/d' \
197 $(PDF): latex/Makefile $(PDF:.pdf=.tex_)
198 @(cd latex && $(MAKE))