From 7233bc625947bfae5ef9c81a53068323c2eeb20a Mon Sep 17 00:00:00 2001 From: richterm Date: Tue, 25 Mar 2008 12:38:48 +0000 Subject: [PATCH] - info removed from default logging level for AliRoot embedded processing - added --disable-all option to configure to disable all detector modules, individual modules can be enabled by --enable-det - build summary at the end of the configuration - make files only created for enabled modules - automatic tagging of hlt packages improved - corrected compilation flags in case of incomplete AliRoot installation --- HLT/BASE/AliHLTDataTypes.h | 2 +- HLT/Makefile.am | 25 ++++++-- HLT/acinclude.m4 | 15 ++++- HLT/configure.ac | 113 +++++++++++++++++++++++++++++-------- 4 files changed, 122 insertions(+), 33 deletions(-) diff --git a/HLT/BASE/AliHLTDataTypes.h b/HLT/BASE/AliHLTDataTypes.h index d428def8788..518661084c3 100644 --- a/HLT/BASE/AliHLTDataTypes.h +++ b/HLT/BASE/AliHLTDataTypes.h @@ -266,7 +266,7 @@ extern "C" { /** special value to enable all messages */ kHLTLogAll = 0x7f, /** the default logging filter */ - kHLTLogDefault = 0x7d + kHLTLogDefault = 0x79 }; ////////////////////////////////////////////////////////////////////////// diff --git a/HLT/Makefile.am b/HLT/Makefile.am index ee0e5a907e9..c6f38fded17 100644 --- a/HLT/Makefile.am +++ b/HLT/Makefile.am @@ -2,6 +2,12 @@ # Makefile template for the Alice HLT framework and components +if HAVE_ALIROOT +ALIROOT_DEP=sim \ + rec \ + shuttle +endif + if EN_HLT_SAMPLE SAMPLE_DIR=SampleLib endif @@ -39,9 +45,7 @@ ITS_DIR=ITS endif SUBDIRS = BASE \ - sim \ - rec \ - shuttle \ + $(ALIROOT_DEP) \ $(RCU_DIR) \ $(SAMPLE_DIR) \ $(TPC_DIR) \ @@ -71,7 +75,8 @@ EXTRA_DIST = libHLTbase.pkg \ libAliHLTITS.pkg \ exa/sample-component1.C \ exa/monitoring.C \ - hlt.conf + hlt.conf \ + .revision DIST_SUBDIRS = $(SUBDIRS) @@ -96,6 +101,18 @@ SampleLibPkg: Makefile $(top_srcdir)/SampleLib/* clean-local: (test ! -d SampleLibPkg || rm -rf SampleLibPkg) +svn-update: + @cd $(top_srcdir) ;\ + revision=`svn info 2> /dev/null | grep "Revision:" | cut -d ' ' -f 2 | tr -d '\n'` ;\ + last=`svn info 2> /dev/null | grep "Last Changed Rev:" | cut -d ' ' -f 4 | cut -d '/' -f 4 | tr -d '\n'` ;\ + if test "x$$revision" != "x" && test $$last -gt $$revision; then \ + echo "The SVN copy is not up-to-date (revision $$revision - last update $$last), please 'svn update'"; \ + exit -1; \ + fi + +.revision: svn-update + @cd $(top_srcdir) ;\ + svn info 2> /dev/null | grep "Revision:" | cut -d ' ' -f 2 | tr -d '\n' > $@ # # EOF # diff --git a/HLT/acinclude.m4 b/HLT/acinclude.m4 index a62246086ba..0b779359495 100644 --- a/HLT/acinclude.m4 +++ b/HLT/acinclude.m4 @@ -223,10 +223,19 @@ AC_ARG_ENABLE([$1], [ compile the $1 library ])], [if test "x$enableval" = "xno"; then enable_module=no + elif test "x$disable_all" = "xyes"; then + # do checks if library has been enabled after global disable + enable_module=yes else enable_module=force fi], - [enable_module=yes + [if test "x$disable_all" = "xyes"; then + enable_module=no...modules.disabled + else + enable_module=yes + fi # if test "x$disable_all" = "yes" + ]) + if test "x$enable_module" = "xyes"; then if test "x$have_aliroot" = "xno" ; then enable_module="no...requires.AliRoot" else @@ -271,8 +280,8 @@ AC_ARG_ENABLE([$1], LIBS="$save_LIBS" AC_LANG_POP(C++) - fi - ]) + fi # if test "x$have_aliroot" = "xno" + fi # if test "x$enable_module" = "xyes" ]) diff --git a/HLT/configure.ac b/HLT/configure.ac index 92dee0444fa..e054f5fd344 100644 --- a/HLT/configure.ac +++ b/HLT/configure.ac @@ -8,7 +8,15 @@ dnl ------------------------------------------------------------------ dnl Take either the AliRoot tag as version id or the current revision AC_INIT([Alice High Level Trigger] , - m4_esyscmd([url=`svn info | grep "URL:" | cut -d: -f3 | sed -e 's|[/]*HLT[/]*$||' | sed -e 's|^[/]*||g' | cut -d '/' -f 4`; rev=`cat configure.ac | sed -e '/^dnl \$Id:/!d'| cut -d ' ' -f4 | tr -d '\n'`; if test "x$url" != "x"; then echo -n $url; elif test "x$rev" != "x"; then echo -n $rev ; else echo -n invalid-version; fi]), + m4_esyscmd([url=`svn info 2> /dev/null | grep "URL:" | cut -d: -f3 | sed -e 's|[/]*HLT[/]*$||' | sed -e 's|^[/]*||g' | cut -d '/' -f 4`; \ + revision=`svn info 2> /dev/null | grep "Revision:" | cut -d ' ' -f 2 | cut -d '/' -f 4`; \ + if test "x$url" != "x"; then echo -n $url; \ + elif test "x$revision" != "x"; then echo -n $revision ; \ + elif test -e .revision && test x`cat .revision` != x; then \ + cat .revision; \ + else \ + echo -n invalid-version; \ + fi]), [Matthias.Richter@ift.uib.no], [alice-hlt]) @@ -97,6 +105,9 @@ ALIHLT_USEPACKAGE=ALIROOT AC_DEFINE(use_aliroot) AC_DEFINE(use_root) CPPFLAGS="$CPPFLAGS ${ROOTCFLAGS}" +save_CPPFLAGS=$CPPFLAGS +save_LDFLAGS=$LDFLAGS +save_LIBS=$LIBS dnl ------------------------------------------------------------------ dnl check for AliRoot features @@ -312,7 +323,7 @@ if test ! "x$have_aliroot" = "xno" ; then CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS -fi +fi # if test ! "x$have_aliroot" = "xno" AC_LANG_POP(C++) AC_SUBST([ALICE_ROOT]) @@ -447,6 +458,12 @@ AC_SUBST([HOMER_LIBDIR]) AC_SUBST([HOMER_BINDIR]) AC_SUBST([HOMER_LIBS]) +dnl ------------------------------------------------------------------ +AC_ARG_ENABLE(all, + [AC_HELP_STRING([--disable-all], + [disable all detector modules, individual modules can be switched on by --enable-det])], + [disable_all=yes],[]) + dnl ------------------------------------------------------------------ AC_MSG_CHECKING([whether to impose strict coding conventions]) AC_ARG_ENABLE(strict, @@ -862,13 +879,10 @@ dnl fi dnl AC_SUBST([HAVE_SRC_SUBDIR]) dnl ------------------------------------------------------------------ -dnl inatallation directory for libraries -dnl -if test "x$prefix" != "xNONE" && test $ALICE_ROOT = $prefix ; then -libdir=\${exec_prefix}/lib/tgt_$ALICE_TARGET -AC_MSG_NOTICE([libdir set to $libdir]) -fi -dnl ------------------------------------------------------------------ +AC_MSG_NOTICE([---------------------------------------------- ]) +AC_MSG_NOTICE([ build summary ]) +AC_MSG_NOTICE([---------------------------------------------- ]) + AC_CONFIG_FILES([Makefile BASE/Makefile BASE/setenv.sh @@ -877,26 +891,75 @@ AC_CONFIG_FILES([Makefile BASE/util/Makefile BASE/interface/Makefile BASE/test/Makefile - sim/Makefile - rec/Makefile - shuttle/Makefile - SampleLib/Makefile - TPCLib/Makefile - TPCLib/test/Makefile - TPCLib/mapping2array.cxx - TPCLib/OnlineDisplay/Makefile - RCU/Makefile - RCU/test/Makefile - PHOS/Makefile - TRD/Makefile - MUON/Makefile - trigger/Makefile - ITS/Makefile - comp/Makefile doc/Makefile doc/doxygen.conf doc/doxymodule.conf]) +dnl AliRoot and installation directory for libraries +dnl +AC_MSG_NOTICE([AliRoot: $have_aliroot]) +AM_CONDITIONAL(HAVE_ALIROOT, test "x$have_aliroot" != "xno" ) +if test "x$have_aliroot" != "xno"; then + AC_CONFIG_FILES([sim/Makefile + rec/Makefile + shuttle/Makefile + ]) +fi +if test "x$prefix" != "xNONE" && test $ALICE_ROOT = $prefix ; then +libdir=\${exec_prefix}/lib/tgt_$ALICE_TARGET +AC_MSG_NOTICE([libdir set to $libdir]) +fi + +AC_MSG_NOTICE([compile sample library: $enable_sample]) +if test "x$enable_sample" = "xyes"; then + AC_CONFIG_FILES([SampleLib/Makefile]) +fi + +AC_MSG_NOTICE([compile TPC library: $enable_tpc]) +if test "x$enable_tpc" = "xyes"; then + AC_CONFIG_FILES([TPCLib/Makefile + TPCLib/test/Makefile + TPCLib/mapping2array.cxx + TPCLib/OnlineDisplay/Makefile + ]) +fi + +AC_MSG_NOTICE([compile RCU library: $enable_rcu]) +if test "x$enable_rcu" = "xyes"; then + AC_CONFIG_FILES([RCU/Makefile + RCU/test/Makefile + ]) +fi + +AC_MSG_NOTICE([compile PHOS library: $enable_phos]) +if test "x$enable_phos" = "xyes"; then + AC_CONFIG_FILES([PHOS/Makefile]) +fi + +AC_MSG_NOTICE([compile TRD library: $enable_trd]) +if test "x$enable_trd" = "xyes"; then + AC_CONFIG_FILES([TRD/Makefile]) +fi + +AC_MSG_NOTICE([compile MUON library: $enable_muon]) +if test "x$enable_muon" = "xyes"; then + AC_CONFIG_FILES([MUON/Makefile]) +fi + +AC_MSG_NOTICE([compile ITS library: $enable_its]) +if test "x$enable_its" = "xyes"; then + AC_CONFIG_FILES([ITS/Makefile]) +fi + +AC_MSG_NOTICE([compile trigger library: $enable_trigger]) +if test "x$enable_trigger" = "xyes"; then + AC_CONFIG_FILES([trigger/Makefile]) +fi + +AC_MSG_NOTICE([compile comp library: $enable_comp]) +if test "x$enable_comp" = "xyes"; then + AC_CONFIG_FILES([comp/Makefile]) +fi AC_OUTPUT dnl -- 2.43.0