]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/doc/Makefile.am
Test for Coverity
[u/mrichter/AliRoot.git] / HLT / doc / Makefile.am
index 94b88b0703d7ab8ab2a73b50705e910d7b5d9dd7..80d0e59337d48749770f809b3fc5b96c0db92a15 100644 (file)
@@ -1,31 +1,18 @@
 # $Id$
 # Makefile template for the Alice HLT documentation
 #
-#***********************************************************************
-#
-# Alice HLT project
-# Copyright (c) 2005
-#
-# This file is property of and copyright by the Experimental Nuclear 
-# Physics Group, Dep. of Physics and Technology
-# University of Bergen, Norway, 2004
-# This file has been written by Matthias Richter,
-# Matthias.Richter@ift.uib.no
-#
-# Permission to use, copy, modify and distribute this software and its  
-# documentation strictly for non-commercial purposes is hereby granted  
-# without fee, provided that the above copyright notice appears in all  
-# copies and that both the copyright notice and this permission notice  
-# appear in the supporting documentation. The authors make no claims    
-# about the suitability of this software for any purpose. It is         
-# provided "as is" without express or implied warranty.                 
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free
-# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
-# MA 02111-1307  USA  
-#
-#***********************************************************************/
+#**************************************************************************
+#* This file is property of and copyright by the ALICE HLT Project        * 
+#* ALICE Experiment at CERN, All rights reserved.                         *
+#*                                                                        *
+#* Permission to use, copy, modify and distribute this software and its   *
+#* documentation strictly for non-commercial purposes is hereby granted   *
+#* without fee, provided that the above copyright notice appears in all   *
+#* copies and that both the copyright notice and this permission notice   *
+#* appear in the supporting documentation. The authors make no claims     *
+#* about the suitability of this software for any purpose. It is          *
+#* provided "as is" without express or implied warranty.                  *
+#**************************************************************************
 
 EXTRA_DIST             = mainpage.c \
                          pics/HLT-AliRoot-Integration_overview.png \
@@ -34,9 +21,46 @@ EXTRA_DIST           = mainpage.c \
                          pics/HLT-AliRoot-Integration_overview.eps \
                          pics/PubSub_WrapperComponent.png
 
-if HAVE_DOXYGEN
+if BUILD_DOC
 HTML                   = html/index.html
 MODULES                        = 
+
+if EN_HLT_TPC
+MODULES                        += TPCLib
+endif
+
+if EN_HLT_RCU
+MODULES                        += RCU
+endif
+
+if EN_HLT_PHOS
+MODULES                        += PHOS
+endif
+
+if EN_HLT_TRD
+MODULES                        += TRD
+endif
+
+if EN_HLT_MUON
+MODULES                        += MUON
+endif
+
+if EN_HLT_COMP
+MODULES                        += comp
+endif
+
+if EN_HLT_TRIGGER
+MODULES                        += trigger
+endif
+
+if EN_HLT_GLOBAL
+MODULES                        += global
+endif
+
+# if EN_HLT_ITS
+# MODULES                      += ITS
+# endif
+
 #PDF                   = latex/refman.pdf
 TAGS                   = $(PACKAGE).tags
 else 
@@ -44,6 +68,16 @@ HTML                 =
 TAGS                   = 
 endif
 
+if MONOLITHIC_DOC
+RUN_MODULES            =
+MAIN_MODULE            = doxymono.conf readme.c sample_readme.c module_group.c
+MESSAGE                        = monolithic
+else
+RUN_MODULES            = $(TAGS) $(MODULES)
+MAIN_MODULE            = doxymain.conf
+MESSAGE                        = main
+endif
+
 DISTCLEANFILES         = doxy.log $(PACKAGE).tags
 
 CLEANFILES             = $(MODULES:%=$(PACKAGE).%.tags) \
@@ -59,11 +93,11 @@ CLASS_FILTER        = structAliHLTRawBuffer \
 %.png:%.fig
        fig2dev -Lpng $< 
 
-all-local:$(HTML) $(PDF) $(MODULES)
+all-local: $(RUN_MODULES) $(HTML) $(PDF)
 
 
 clean-local: 
-       rm -rf *~ html latex man readme.c sample_readme.c
+       rm -rf *~ html latex man readme.c sample_readme.c module_group.c $(MAIN_MODULE) $(TAGS)
 
 readme.c: @top_srcdir@/README
        @cat $< | sed -e '/^=/s|=||g' -e '/^-/s|-||g'                     | \
@@ -73,8 +107,7 @@ readme.c: @top_srcdir@/README
        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 "/** @file $@"                                              > $@
        @echo '    @brief  autogenerated from README.'                   >> $@
        @echo '    @see  @ref readme                  */'                >> $@
        @echo '/** '                                                     >> $@
@@ -89,8 +122,7 @@ readme.c: @top_srcdir@/README
        @rm $@_work
 
 sample_readme.c: @top_srcdir@/SampleLib/README
-       @echo '/** @file sample_readme.c'                                 > $@
-       @echo '    @author Matthias Richter'                             >> $@
+       @echo "/** @file $@"                                              > $@
        @echo '    @brief  autogenerated from SampleLib/README.'         >> $@
        @echo '*/'                                                       >> $@
        @echo '/** '                                                     >> $@
@@ -101,13 +133,39 @@ sample_readme.c: @top_srcdir@/SampleLib/README
        @echo '</pre>'                                                   >> $@
        @echo '*/'                                                       >> $@
 
-$(HTML) $(PACKAGE).tags: doxygen.conf Makefile mainpage.c readme.c sample_readme.c
+module_group.c: Makefile
+       @echo "/** @file $@"                                              > $@
+       @echo '    @brief  autogenerated from Makefile.'                 >> $@
+       @echo '*/'                                                       >> $@
+       @echo '/** @defgroup alihlt_modules HLT Detector Modules'        >> $@
+       @echo                                                            >> $@
+       @echo 'Available detector modules:'                              >> $@
+       @$(foreach m, $(MODULES), echo "- @ref alihlt_`echo $(m) | tr '[:upper:]' '[:lower:]' | sed -e 's|lib||'`" >> $@;)
+       @echo '*/'                                                       >> $@
+
+doxymain.conf: doxygen.conf Makefile
+       @t="$(foreach m, $(MODULES), @PACKAGE@.$(m).tags=$(m))"; \
+       cat $< | sed -e "s|^\(TAGFILES[ ]*=\)|\1 $$t|" -e "/^WARN/s|=[ ]*NO|= YES|"> $@
+
+doxymono.conf: doxygen.conf Makefile
+       @t="$(foreach m, $(MODULES), @top_srcdir@/$(m))"; \
+       cat $< | sed -e "s|^\(INPUT[ ]*=\)|\1 $$t|" -e "/^WARN/s|=[ ]*NO|= YES|"> $@
+
+$(TAGS): doxygen.conf mainpage.c readme.c sample_readme.c module_group.c
+       @echo creating main tag file ...
+       $(DOXYGEN) $<  
+
+$(HTML): $(MAIN_MODULE)
+       @echo creating $(MESSAGE) documentation ...
        $(DOXYGEN) $<  
 
 %.conf: doxymodule.conf Makefile
-       cat $< | sed -e "s|@DOXYMODULE@|$(@:.conf=)|" > $@
+       @e=`find $(top_srcdir)/$(@:.conf=) -name configure.ac -exec dirname {} \;`; \
+       e=`echo $$e | tr -d '\n'`; \
+       cat $< | sed -e "s|@DOXYMODULE@|$(@:.conf=)|" -e "s|^\(EXCLUDE[ ]*=\)|\1 $$e|" > $@
 
 html/%/index.html: %.conf
+       @echo creating module ...
        $(DOXYGEN) $<
 
 $(MODULES:%=html/%):