Fixes for #90303: Fix PROOF-INF/SETUP.C to create PAR files for AliRoot trunk
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 Mar 2012 13:15:36 +0000 (13:15 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 Mar 2012 13:15:36 +0000 (13:15 +0000)
20 files changed:
ANALYSIS/Makefile
ANALYSIS/PROOF-INF.ANALYSIS/BUILD.sh
ANALYSIS/PROOF-INF.ANALYSIS/SETUP.C
ANALYSIS/PROOF-INF.ANALYSISalice/BUILD.sh
ANALYSIS/PROOF-INF.ANALYSISalice/SETUP.C
OADB/Makefile
OADB/PROOF-INF.OADB/BUILD.sh
OADB/PROOF-INF.OADB/SETUP.C
PWGUD/Makefile
PWGUD/PROOF-INF.PWGUDbase/BUILD.sh
PWGUD/PROOF-INF.PWGUDbase/SETUP.C
STEER/Makefile
STEER/PROOF-INF.AOD/BUILD.sh
STEER/PROOF-INF.AOD/SETUP.C
STEER/PROOF-INF.CDB/BUILD.sh
STEER/PROOF-INF.CDB/SETUP.C
STEER/PROOF-INF.ESD/BUILD.sh
STEER/PROOF-INF.ESD/SETUP.C
STEER/PROOF-INF.STEERBase/BUILD.sh
STEER/PROOF-INF.STEERBase/SETUP.C

index 6b774da..e98f20f 100644 (file)
@@ -39,6 +39,16 @@ endif
   endif
 #endif
 
+ifeq ($(PLATFORM),macosx)
+ROOTLIBDIR     := $(shell $(RC) --libdir)
+ifeq ($(PACKAGE),ANALYSIS)
+   PACKLDFLAGS = $(STEERBase_LIBS) $(ESD_LIBS) $(AOD_LIBS) -L$(ROOTLIBDIR)
+endif
+ifeq ($(PACKAGE),ANALYSISalice) 
+   PACKLDFLAGS = $(STEERBase_LIBS) $(ESD_LIBS) $(AOD_LIBS) $(ANALYSIS_LIBS) $(OADB_LIBS) -L$(ROOTLIBDIR) -lXMLIO -lEG -lTreePlayer
+endif
+endif
+
 CHECKXML      := $(shell root-config --has-xml)
 
 ifeq ($(CHECKXML),yes)
@@ -63,7 +73,11 @@ PARFILE       = $(PACKAGE).par
 lib$(PACKAGE).so: $(OBJS_ANALYSIS)
        @echo "Linking" $@ ...
        @/bin/rm -f $@
-       $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS)
+ifeq ($(PLATFORM),macosx)
+       $(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@ $(PACKLDFLAGS) $(EXPLLINKLIBS)
+else
+       $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(PACKLDFLAGS) $(EXPLLINKLIBS)
+endif
        @chmod a+x $@
        @echo "done"
 
index fc9490a..cd822e4 100755 (executable)
@@ -1,3 +1,14 @@
 #! /bin/sh
 
-make 
+if [ "" = "clean" ]; then
+   make clean
+   exit 0
+fi
+
+make
+rc=$?
+echo "rc=$?"
+if [ $? != "0" ] ; then
+   exit 1
+fi
+exit 0
index ba68165..4627f32 100644 (file)
@@ -9,5 +9,7 @@ void SETUP()
    // Set our location, so that other packages can find us
    gSystem->Setenv("ANALYSIS_INCLUDE", "ANALYSIS");
 
-
+   // Set our lib coordinates, so that other packages can link to us
+   TString lib = TString::Format("-L%s -lANALYSIS", gSystem->WorkingDirectory());
+   gSystem->Setenv("ANALYSIS_LIBS", lib.Data());
 }
index fc9490a..cd822e4 100755 (executable)
@@ -1,3 +1,14 @@
 #! /bin/sh
 
-make 
+if [ "" = "clean" ]; then
+   make clean
+   exit 0
+fi
+
+make
+rc=$?
+echo "rc=$?"
+if [ $? != "0" ] ; then
+   exit 1
+fi
+exit 0
index cb51c67..d1621f6 100644 (file)
@@ -8,4 +8,8 @@ void SETUP()
 
    // Set our location, so that other packages can find us
    gSystem->Setenv("ANALYSISalice_INCLUDE", "ANALYSISalice");
+
+   // Set our lib coordinates, so that other packages can link to us
+   TString lib = TString::Format("-L%s -lANALYSISalice", gSystem->WorkingDirectory());
+   gSystem->Setenv("ANALYSISalice_LIBS", lib.Data());
 }
index cd1c4e1..66ad06b 100644 (file)
@@ -34,6 +34,13 @@ endif
 
 
 
+ifeq ($(PLATFORM),macosx)
+ROOTLIBDIR     := $(shell $(RC) --libdir)
+ifeq ($(PACKAGE),OADB)
+   PACKLDFLAGS = $(STEERBase_LIBS) $(ESD_LIBS) $(AOD_LIBS) $(ANALYSIS_LIBS) -L$(ROOTLIBDIR)  -lVMC -lMinuit -lEG -lGeom
+endif
+endif
+
 
 CXXFLAGS += $(ALICEINC) -g
 
@@ -43,7 +50,11 @@ OBJS          = $(SRCS:.cxx=.o)
 lib$(PACKAGE).so: $(OBJS)
        @echo "Linking" $@ ...
        @/bin/rm -f $@
-       $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS)
+ifeq ($(PLATFORM),macosx)
+       $(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@ $(PACKLDFLAGS) $(EXPLLINKLIBS)
+else
+       $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(PACKLDFLAGS) $(EXPLLINKLIBS)
+endif
        @chmod a+x $@
        @echo "done"
 
index 8b5aaa7..be46a2d 100755 (executable)
@@ -1,2 +1,15 @@
 #! /bin/sh
+
+if [ "" = "clean" ]; then
+   make clean
+   exit 0
+fi
+
 make
+rc=$?
+echo "rc=$?"
+if [ $? != "0" ] ; then
+   exit 1
+fi
+exit 0
+
index 6943384..5deb790 100644 (file)
@@ -14,6 +14,10 @@ Int_t SETUP()
   if (!oadbPath || oadbPath[0] == '\0')
     gSystem->Setenv("OADB_PATH", "OADB");
 
+  // Set our lib coordinates, so that other packages can link to us
+  TString lib = TString::Format("-L%s -lOADB", gSystem->WorkingDirectory());
+  gSystem->Setenv("OADB_LIBS", lib.Data());
+
   // We're happy
   return 0;
 
index fb3dd35..e3a9d4c 100644 (file)
@@ -14,10 +14,24 @@ endif
 ALICEINC = -I.
 ALICEINC += -I./$(PACKAGE)/
 
+ifneq ($(STEERBase_INCLUDE),)
+   ALICEINC += -I../$(STEERBase_INCLUDE) 
+endif
+ifneq ($(ESD_INCLUDE),)
+   ALICEINC += -I../$(ESD_INCLUDE) 
+endif
+ifneq ($(AOD_INCLUDE),)
+   ALICEINC += -I../$(AOD_INCLUDE) 
+endif
+ifneq ($(ANALYSIS_INCLUDE),)
+   ALICEINC += -I../$(ANALYSIS_INCLUDE) 
+endif
+ifneq ($(ANALYSISalice_INCLUDE),)
+   ALICEINC += -I../$(ANALYSISalice_INCLUDE) 
+endif
 ifneq ($(PWGUDbase_INCLUDE),)
    ALICEINC += -I../$(PWGUDbase_INCLUDE) 
 endif
-
 ifneq ($(PWGUDdep_INCLUDE),)
    ALICEINC += -I../$(PWGUDdep_INCLUDE) 
 endif
@@ -29,8 +43,12 @@ endif
   endif
 #endif
 
-
-
+ifeq ($(PLATFORM),macosx)
+ROOTLIBDIR     := $(shell $(RC) --libdir)
+ifeq ($(PACKAGE),PWGUDbase) 
+   PACKLDFLAGS = $(STEERBase_LIBS) $(ESD_LIBS) $(AOD_LIBS) $(ANALYSIS_LIBS) $(OADB_LIBS) $(ANALYSISalice_LIBS) -L$(ROOTLIBDIR) -lEG
+endif
+endif
 
 CXXFLAGS += $(ALICEINC) -g
 
@@ -40,7 +58,11 @@ OBJS          = $(SRCS:.cxx=.o)
 lib$(PACKAGE).so: $(OBJS)
        @echo "Linking" $@ ...
        @/bin/rm -f $@
-       $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS)
+ifeq ($(PLATFORM),macosx)
+       $(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@ $(PACKLDFLAGS) $(EXPLLINKLIBS)
+else
+       $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(PACKLDFLAGS) $(EXPLLINKLIBS)
+endif
        @chmod a+x $@
        @echo "done"
 
index c2c7870..31fcaf2 100755 (executable)
@@ -4,4 +4,15 @@
 # touch libPWGUDselectors.pkg
 # touch libPWGUDdep.pkg
 
+if [ "" = "clean" ]; then
+   make clean
+   exit 0
+fi
+
 make libPWGUDbase.so
+rc=$?
+echo "rc=$?"
+if [ $? != "0" ] ; then
+   exit 1
+fi
+exit 0
index 44d1926..0a0bacc 100644 (file)
@@ -15,6 +15,9 @@ void SETUP()
 
    // Set our location, so that other packages can find us
    gSystem->Setenv("PWGUDbase_INCLUDE", "PWGUDbase/base");
+
+   TString lib = TString::Format("-L%s -lPWGUDbase", gSystem->WorkingDirectory());
+   gSystem->Setenv("PWGUDbase_LIBS", lib.Data());
 }
 
 Int_t CheckLoadLibrary(const char* library)
index 0739bca..932d746 100644 (file)
@@ -33,7 +33,21 @@ endif
   endif
 #endif
 
-
+ifeq ($(PLATFORM),macosx)
+ROOTLIBDIR     := $(shell $(RC) --libdir)
+ifeq ($(PACKAGE),STEERBase)
+   PACKLDFLAGS = -L$(ROOTLIBDIR)  -lVMC -lMinuit -lEG -lGeom
+endif
+ifeq ($(PACKAGE),ESD)
+   PACKLDFLAGS = $(STEERBase_LIBS) -L$(ROOTLIBDIR) -lVMC -lEG -lGeom
+endif
+ifeq ($(PACKAGE),AOD)
+   PACKLDFLAGS = $(STEERBase_LIBS) -L$(ROOTLIBDIR) -lEG -lGeom
+endif
+ifeq ($(PACKAGE),CDB)
+   PACKLDFLAGS = $(STEERBase_LIBS) -L$(ROOTLIBDIR) -lMinuit -lTree -lXMLParser
+endif
+endif
 
 
 CXXFLAGS += $(ALICEINC) -g
@@ -44,7 +58,11 @@ OBJS          = $(SRCS:.cxx=.o)
 lib$(PACKAGE).so: $(OBJS)
        @echo "Linking" $@ ...
        @/bin/rm -f $@
-       $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS)
+ifeq ($(PLATFORM),macosx)
+       $(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@ $(PACKLDFLAGS) $(EXPLLINKLIBS)
+else
+       $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(PACKLDFLAGS) $(EXPLLINKLIBS)
+endif
        @chmod a+x $@
        @echo "done"
 
index fc9490a..cd822e4 100755 (executable)
@@ -1,3 +1,14 @@
 #! /bin/sh
 
-make 
+if [ "" = "clean" ]; then
+   make clean
+   exit 0
+fi
+
+make
+rc=$?
+echo "rc=$?"
+if [ $? != "0" ] ; then
+   exit 1
+fi
+exit 0
index ba16206..00f6922 100644 (file)
@@ -10,6 +10,8 @@ void SETUP()
    gSystem->Load("libSTEERBase");
 
    // Load the AOD library
+   TString dypath = TString::Format("%s:%s", gSystem->WorkingDirectory(), gSystem->GetDynamicPath());
+   gSystem->SetDynamicPath(dypath);
    gSystem->Load("libAOD");
 
    // Set the include paths
@@ -17,4 +19,9 @@ void SETUP()
 
    // Set our location, so that other packages can find us
    gSystem->Setenv("AOD_INCLUDE", "AOD/AOD");
+
+   // Set our lib coordinates, so that other packages can link to us
+   TString lib = TString::Format("-L%s -lAOD", gSystem->WorkingDirectory());
+   gSystem->Setenv("AOD_LIBS", lib.Data());
 }
+
index fc9490a..cd822e4 100755 (executable)
@@ -1,3 +1,14 @@
 #! /bin/sh
 
-make 
+if [ "" = "clean" ]; then
+   make clean
+   exit 0
+fi
+
+make
+rc=$?
+echo "rc=$?"
+if [ $? != "0" ] ; then
+   exit 1
+fi
+exit 0
index e055836..d334ca9 100644 (file)
@@ -10,6 +10,8 @@ void SETUP()
    gSystem->Load("libSTEERBase");
 
    // Load the CDB library
+   TString dypath = TString::Format("%s:%s", gSystem->WorkingDirectory(), gSystem->GetDynamicPath());
+   gSystem->SetDynamicPath(dypath);
    gSystem->Load("libCDB");
 
    // Set the include paths
@@ -17,4 +19,8 @@ void SETUP()
 
    // Set our location, so that other packages can find us
    gSystem->Setenv("CDB_INCLUDE", "CDB/CDB");
+
+   // Set our lib coordinates, so that other packages can link to us
+   TString lib = TString::Format("-L%s -lCDB", gSystem->WorkingDirectory());
+   gSystem->Setenv("CDB_LIBS", lib.Data());
 }
index fc9490a..cd822e4 100755 (executable)
@@ -1,3 +1,14 @@
 #! /bin/sh
 
-make 
+if [ "" = "clean" ]; then
+   make clean
+   exit 0
+fi
+
+make
+rc=$?
+echo "rc=$?"
+if [ $? != "0" ] ; then
+   exit 1
+fi
+exit 0
index c16101b..8ebe6b3 100644 (file)
@@ -10,6 +10,8 @@ void SETUP()
    gSystem->Load("libSTEERBase");
 
    // Load the ESD library
+   TString dypath = TString::Format("%s:%s", gSystem->WorkingDirectory(), gSystem->GetDynamicPath());
+   gSystem->SetDynamicPath(dypath);
    gSystem->Load("libESD");
 
    // Set the include paths
@@ -17,4 +19,9 @@ void SETUP()
 
    // Set our location, so that other packages can find us
    gSystem->Setenv("ESD_INCLUDE", "ESD/ESD");
+
+   // Set our lib coordinates, so that other packages can link to us
+   TString lib = TString::Format("-L%s -lESD", gSystem->WorkingDirectory());
+   gSystem->Setenv("ESD_LIBS", lib.Data());
 }
+
index fc9490a..cd822e4 100755 (executable)
@@ -1,3 +1,14 @@
 #! /bin/sh
 
-make 
+if [ "" = "clean" ]; then
+   make clean
+   exit 0
+fi
+
+make
+rc=$?
+echo "rc=$?"
+if [ $? != "0" ] ; then
+   exit 1
+fi
+exit 0
index dfffb03..5554b01 100644 (file)
@@ -8,8 +8,7 @@ void SETUP()
    gSystem->Load("libMinuit");
 
    // Load the STEERBase library
-   TString dypath = gSystem->GetDynamicPath();
-   dypath.Prepend(".:");
+   TString dypath = TString::Format("%s:%s", gSystem->WorkingDirectory(), gSystem->GetDynamicPath());
    gSystem->SetDynamicPath(dypath);
    gSystem->Load("libSTEERBase");
 
@@ -18,4 +17,8 @@ void SETUP()
 
    // Set our location, so that other packages can find us
    gSystem->Setenv("STEERBase_INCLUDE", "STEERBase/STEERBase");
+
+   // Set our lib coordinates, so that other packages can link to us
+   TString lib = TString::Format("-L%s -lSTEERBase", gSystem->WorkingDirectory());
+   gSystem->Setenv("STEERBase_LIBS", lib.Data());
 }