Possibility to include ARVersion.h witihin the user code (avoid the gmake circular...
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 20 May 2009 09:01:57 +0000 (09:01 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 20 May 2009 09:01:57 +0000 (09:01 +0000)
Makefile
STEER/AliDCSGenDB.cxx

index 1f05acf..57bfaa9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -178,8 +178,7 @@ LIBS := $(ROOTCLIBS) $(ROOTPLIBS) $(SYSLIBS)
 ARVERSIONFILE := $(EXPORTDIR)/ARVersion.h
 SVNREV        := $(strip $(shell svn info | grep "Last Changed Rev:" | \
                                 cut -d: -f2 ))
-SVNBRANCH     := w$(subst //alisoft.cern.ch/AliRoot/,,\
-                   $(shell svn info | grep "URL:" | cut -d: -f3 ))
+SVNBRANCH     := $(subst //alisoft.cern.ch/AliRoot/,,$(shell svn info | grep "URL:" | cut -d: -f3 ))
 
 #-------------------------------------------------------------------------------
 # default target
@@ -187,12 +186,10 @@ SVNBRANCH     := w$(subst //alisoft.cern.ch/AliRoot/,,\
 default: $(ARVERSIONFILE)
        $(MUTE)$(MAKE) aliroot
 
-FORCE:
-
 #-------------------------------------------------------------------------------
 # Write header file with aliroot svn version and url
 
-$(ARVERSIONFILE): FORCE $(EXPORTDIR)
+$(ARVERSIONFILE): $(ALICE_ROOT)/.svn/entries $(EXPORTDIR)
        $(MUTE)rm -f $(ARVERSIONFILE)
        @echo "***** Making $(ARVERSIONFILE) *****"
        @echo "#ifndef ALIROOT_ARVersion" >> $@
index c83783f..7f9219b 100644 (file)
@@ -37,6 +37,7 @@
 
 #include "AliDCSGenDB.h"
 #include "AliLog.h"
+#include "ARVersion.h"
 
 const Int_t kBeamPeriod=2;
 
@@ -170,7 +171,7 @@ AliCDBMetaData* AliDCSGenDB::CreateMetaObject(const char* objectClassName)
   md1->SetObjectClassName(objectClassName);
   md1->SetResponsible("Haavard Helstrup");
   md1->SetBeamPeriod(kBeamPeriod);
-  md1->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
+  md1->SetAliRootVersion(ALIROOT_SVN_BRANCH);
 
   return md1;
 }