# $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 \
pics/HLT-AliRoot-Integration_overview.eps \
pics/PubSub_WrapperComponent.png
-DISTCLEANFILES = doxy.log $(PACKAGE).tags
-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
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) \
+ $(MODULES:%=%.conf)
+
SECTION_FILTER = Directory File
CLASS_FILTER = structAliHLTRawBuffer \
classAliHLTDataBuffer \
%.png:%.fig
fig2dev -Lpng $<
-all-local:$(HTML) $(PDF)
+all-local: $(RUN_MODULES) $(HTML) $(PDF)
clean-local:
- rm -rf *~ html latex man 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' | \
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 '/** ' >> $@
@echo '*/' >> $@
@rm $@_work
-html/index.html $(PACKAGE).tags: doxygen.conf Makefile mainpage.c readme.c
+sample_readme.c: @top_srcdir@/SampleLib/README
+ @echo "/** @file $@" > $@
+ @echo ' @brief autogenerated from SampleLib/README.' >> $@
+ @echo '*/' >> $@
+ @echo '/** ' >> $@
+ @echo ' @page sample_readme Creating a new Library' >> $@
+ @echo '<pre>' >> $@
+ @cat $< | \
+ sed -e 's|<|\<|g' -e 's|>|\>|g' >> $@
+ @echo '</pre>' >> $@
+ @echo '*/' >> $@
+
+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
+ @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/%):
+ @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) ; \