]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/doc/Makefile.am
Fix loading of TPC clusters; SEGV occured with events generated with today's HEAD.
[u/mrichter/AliRoot.git] / HLT / doc / Makefile.am
index d04396e69f3c0c0fa1a3978e58d2d83a696a544f..831b1184025b090f77066ba5d95c04d8c52b9b24 100644 (file)
@@ -34,9 +34,9 @@ EXTRA_DIST            = mainpage.c \
                          pics/HLT-AliRoot-Integration_overview.eps \
                          pics/PubSub_WrapperComponent.png
 
-DISTCLEANFILES         = doxy.log $(PACKAGE).tags
 if HAVE_DOXYGEN
 HTML                   = html/index.html
+MODULES                        = 
 #PDF                   = latex/refman.pdf
 TAGS                   = $(PACKAGE).tags
 else 
@@ -44,6 +44,11 @@ HTML                 =
 TAGS                   = 
 endif
 
+DISTCLEANFILES         = doxy.log $(PACKAGE).tags
+
+CLEANFILES             = $(MODULES:%=$(PACKAGE).%.tags) \
+                         $(MODULES:%=%.conf)
+
 SECTION_FILTER = Directory File
 CLASS_FILTER   = structAliHLTRawBuffer \
                  classAliHLTDataBuffer \
@@ -54,15 +59,52 @@ CLASS_FILTER        = structAliHLTRawBuffer \
 %.png:%.fig
        fig2dev -Lpng $< 
 
-all-local:$(HTML) $(PDF)
+all-local:$(HTML) $(PDF) $(MODULES)
 
 
 clean-local: 
-       rm -rf *~ html latex man
+       rm -rf *~ html latex man readme.c
+
+readme.c: @top_srcdir@/README
+       @cat $< | sed -e '/^=/s|=||g' -e '/^-/s|-||g'                     | \
+       sed -e '/^+/d'                                                    | \
+       sed -e '/^[0-9]. /s|^\([0-9]*\)\.|@section readme_\1 |'           | \
+       sed -e '/^[0-9]*.[0-9] /s|^\([0-9]*\)\.\([0-9]*\)|@subsection readme_\1_\2 |' | \
+       sed -e '/^  [-()\<a-zA-Z0-9.]/s|\([<>]\)|\\\1|g'                  | \
+       sed -e '/^  [-()\<a-zA-Z0-9.]/s|\(.*\)|<tt>  \1</tt><br>|'        | \
+       sed -e 's|\!\!\!\!|<b>|' -e 's|\!\!\!|</b>|'                      > $@_work
+       @echo '/** @file readme.c'                                        > $@
+       @echo '    @author Matthias Richter'                             >> $@
+       @echo '    @brief  autogenerated from README.'                   >> $@
+       @echo '    @see  @ref readme                  */'                >> $@
+       @echo '/** '                                                     >> $@
+       @echo '    @page readme README'                                  >> $@
+       @echo '    @section readme_toc TOC'                              >> $@
+       @(for i in `cat $@_work | sed -e /@section/!d | cut -d ' ' -f 2` ; do \
+         echo "- @ref $$i" ; \
+       done )                                                           >> $@
+       @echo                                                            >> $@
+       @cat $@_work                                                     >> $@
+       @echo '*/'                                                       >> $@
+       @rm $@_work
 
-html/index.html $(PACKAGE).tags: doxygen.conf Makefile mainpage.c      
+$(HTML) $(PACKAGE).tags: doxygen.conf Makefile mainpage.c readme.c
        $(DOXYGEN) $<  
 
+%.conf: doxymodule.conf Makefile
+       cat $< | sed -e "s|@DOXYMODULE@|$(@:.conf=)|" > $@
+
+html/%/index.html: %.conf
+       $(DOXYGEN) $<
+
+$(MODULES:%=html/%):
+       @mkdir -p $@
+
+$(MODULES): $(MODULES:%=html/%) $(MODULES:%=html/%/index.html)
+
+$(MODULES:%=clean-%):
+       rm -r html/$(patsubst clean-%,%,$(@))
+
 tar-ball:$(HTML)
        if test -f html/index.html ; then \
          mv html $(PACKAGE) ;  \