Correction for bug #77355: Generation of PARs
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 26 Jan 2011 15:47:29 +0000 (15:47 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 26 Jan 2011 15:47:29 +0000 (15:47 +0000)
19 files changed:
ANALYSIS/Makefile
CORRFW/Makefile
EMCAL/Makefile
ESDCheck/Makefile
JETAN/Makefile
OADB/Makefile
PHOS/Makefile
PWG0/Makefile
PWG2/Makefile
PWG2/PROOF-INF.PWG2/BUILD.sh [deleted file]
PWG2/PROOF-INF.PWG2/SETUP.C [deleted file]
PWG3/Makefile
PWG3/PROOF-INF.PWG3/BUILD.sh [deleted file]
PWG3/PROOF-INF.PWG3/SETUP.C [deleted file]
PWG4/Makefile
STEER/Makefile
STEER/PROOF-INF.ALIRECO/SETUP.C [deleted file]
TTherminator/Makefile
cmake/ALICE_CMake.cmake

index 5d31f29acd0d790a0aed52ea3a262d45e0f295ce..3c32e7389fde5c4b8e55c261cb9bdcb3abca14a7 100644 (file)
@@ -31,7 +31,7 @@ endif
 # only if no par file was loaded before
 ifeq ($(ALICEINC),-I.)
   ifneq ($(ALICE_ROOT),)
-    ALICEINC += -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/ANALYSIS/Tender -I$(ALICE_ROOT)/TOF
+    ALICEINC += -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/ANALYSIS/Tender -I$(ALICE_ROOT)/TOF -I$(ALICE_ROOT)/TRD/Cal -I$(ALICE_ROOT)/VZERO -I$(ALICE_ROOT)/TPC -I$(ALICE_ROOT)/T0
   endif
 endif
 
@@ -44,9 +44,9 @@ endif
 
 CXXFLAGS += $(ALICEINC) -g
 
-SRCS     := $(wildcard *.cxx)
-HDRS     := $(SRCS:.cxx=.h)
-DHDR     := $(PACKAGE)LinkDef.h
+SRCS     = $(wildcard *.cxx)
+HDRS     = $(SRCS:.cxx=.h)
+DHDR     = $(PACKAGE)LinkDef.h
 
 DHDR_ANALYSIS := $(DHDR)
 HDRS_ANALYSIS := $(HDRS)
index 1fe993a398ea44502e3bb5314aaed0a843d5eeb6..df4b116ef17f1ceb8e74ab2c33ac8ac85aee8af8 100644 (file)
@@ -37,9 +37,9 @@ CXXFLAGS     += $(ALICEINC) -g
 
 PACKAGE = CORRFW
 
-SRCS     := $(wildcard *.cxx)
-HDRS     := $(SRCS:.cxx=.h)
-DHDR     := $(PACKAGE)LinkDef.h
+SRCS     = $(wildcard *.cxx)
+HDRS     = $(SRCS:.cxx=.h)
+DHDR     = $(PACKAGE)LinkDef.h
 
 DHDR_CORRFW := $(DHDR)
 HDRS_CORRFW := $(HDRS)
index 12f61cff4e2ac912dc0ff2befa6691ecaaef0754..0e6c24f3a11e83666f582d1dcca7666dbea9927a 100644 (file)
@@ -57,9 +57,9 @@ CXXFLAGS     += $(ALICEINC) -g
 F77FLAGS     += $(ALICEINC) -g -fPIC
 
 
-SRCS     := $(wildcard *.cxx */*.cxx)
-HDRS     := $(SRCS:.cxx=.h)
-DHDR     := $(PACKAGE)LinkDef.h
+SRCS     = $(wildcard *.cxx */*.cxx)
+HDRS     = $(SRCS:.cxx=.h)
+DHDR     = $(PACKAGE)LinkDef.h
 
 DHDR_EMCAL := $(DHDR)
 HDRS_EMCAL := $(HDRS)
index 7bc90c2aa35017c0e81da9bc2d67a1760a4d32bd..a6fe924ec62cf790f2388ab0525a340c8c6298f8 100644 (file)
@@ -10,7 +10,7 @@ ifneq ($(ANALYSIS_NEW_INCLUDE),)
   ALICEINC += -I../$(ESD_INCLUDE) -I../$(ANALYSIS_NEW_INCLUDE)
 else
   ifneq ($(ALICE_ROOT),)
-    ALICEINC += -I$(ALICE_ROOT)/include
+    ALICEINC += -I$(ALICE_ROOT)/include  -I$(ALICE_ROOT)/PMD  -I$(ALICE_ROOT)/ANALYSIS
   endif
 endif
 
@@ -22,8 +22,11 @@ endif
 CXXFLAGS     += $(ALICEINC) -g
 
 PACKAGE = AnalysisCheck
-include lib$(PACKAGE).pkg
 
+DHDR =
+HDRS =
+SRCS =
+FSRCS =
 DHDR_AnalysisCheck := $(DHDR)
 HDRS_AnalysisCheck := $(HDRS)
 SRCS_AnalysisCheck := $(SRCS) G__$(PACKAGE).cxx
index e471a896a80afcd68c2a7447ce342878d354a14c..aa9c3e6a616678d6ccb8bdbc0041ee4775489222 100644 (file)
@@ -2,9 +2,9 @@ PACKAGE = invalid-only-for-proof
 
 include $(ROOTSYS)/test/Makefile.arch
 
-SRCS     := $(wildcard *.cxx)
-HDRS     := $(SRCS:.cxx=.h)
-DHDR     := $(PACKAGE)LinkDef.h
+SRCS     = $(wildcard *.cxx)
+HDRS     = $(SRCS:.cxx=.h)
+DHDR     = $(PACKAGE)LinkDef.h
 
 
 ALICEINC      = -I.
@@ -21,7 +21,7 @@ ifneq ($(ESD_INCLUDE),)
    endif
  else
     ifneq ($(ALICE_ROOT),)
-       ALICEINC += -I$(ALICE_ROOT)/include
+       ALICEINC += -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/JETAN -I$(ALICE_ROOT)/JETAN/fastjet -I$(ALICE_ROOT)/ANALYSIS
      endif
 endif
 
index da8f76c85843255c178deafc6ff320d6ace5ae86..f6e8ec2198e1be4d39c59970f22d82edb35a3f8a 100644 (file)
@@ -2,9 +2,9 @@ PACKAGE = invalid-only-for-proof
 
 include $(ROOTSYS)/test/Makefile.arch
 
-SRCS     := $(wildcard *.cxx */*.cxx)
-HDRS     := $(SRCS:.cxx=.h)
-DHDR     := $(PACKAGE)LinkDef.h
+SRCS     = $(wildcard *.cxx */*.cxx)
+HDRS     = $(SRCS:.cxx=.h)
+DHDR     = $(PACKAGE)LinkDef.h
 
 
 ifndef PACKCXXFLAGS
index 926a122750c7013ebf51601f71af02d2c7b558e7..812f23538d9c47344236ccc9923112be27cf72d3 100644 (file)
@@ -2,9 +2,9 @@ PACKAGE = invalid-only-for-proof
 
 include $(ROOTSYS)/test/Makefile.arch
 
-SRCS     := $(wildcard *.cxx)
-HDRS     := $(SRCS:.cxx=.h)
-DHDR     := $(PACKAGE)LinkDef.h
+SRCS     = $(wildcard *.cxx)
+HDRS     = $(SRCS:.cxx=.h)
+DHDR     = $(PACKAGE)LinkDef.h
 
 ifndef PACKCXXFLAGS
    PACKCXXFLAGS = $(CXXFLAGS)
index de002ee32747b46c72825f39000e460766bb5920..07e1a82526d59ff189b49815aeb1748ff477dd43 100644 (file)
@@ -2,7 +2,8 @@
 
 include Makefile.arch
 
-default-target: libPWG0base.so libPWG0dep.so libPWG0selectors.so
+PACKAGE = PWG0base
+default-target: lib$(PACKAGE).so
 
 ALICEINC      = -I.
 
@@ -23,7 +24,7 @@ ifneq ($(ESD_INCLUDE),)
        endif
 else
   ifneq ($(ALICE_ROOT),)
-    ALICEINC += -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/PYTHIA6 -I$(ALICE_ROOT)/EVGEN -I$(ALICE_ROOT)/RAW -I$(ALICE_ROOT)/TPC
+    ALICEINC += -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/PYTHIA6 -I$(ALICE_ROOT)/EVGEN -I$(ALICE_ROOT)/RAW -I$(ALICE_ROOT)/TPC  -I$(ALICE_ROOT)/PWG0
 else
   endif
 endif
@@ -35,11 +36,9 @@ endif
 
 CXXFLAGS     += $(ALICEINC) -g
 
-PACKAGE = PWG0base
-
-SRCS     := $(wildcard *.cxx */*.cxx)
-HDRS     := $(SRCS:.cxx=.h)
-DHDR     := $(PACKAGE)LinkDef.h
+SRCS     = $(wildcard *.cxx */*.cxx)
+HDRS     = $(SRCS:.cxx=.h)
+DHDR     = $(PACKAGE)LinkDef.h
 
 DHDR_PWG0base := $(DHDR)
 HDRS_PWG0base := $(HDRS)
@@ -62,7 +61,7 @@ endif
 %.o:    %.cxx %.h
        $(CXX) $(CXXFLAGS) -c $< -o $@
 
-G__PWG0base.cxx G__PWG0base.h: $(HDRS_PWG0base) $(DHDR_PWG0base)
+G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS_PWG0base) $(DHDR_PWG0base)
        @echo "Generating dictionary ..."
        rootcint -f $@ -c $(ALICEINC) $^
 
@@ -103,56 +102,3 @@ test-%.par: %.par
        @cd par-tmp; tar xfz ../$<;     cd $(subst .par,,$<); PROOF-INF/BUILD.sh
        @rm -rf par-tmp
        @echo "INFO: Testing succeeded (already cleaned up)"
-
-## libPWG0dep part
-
-SRCS     := $(wildcard *.cxx  */*.cxx)
-HDRS     := $(SRCS:.cxx=.h)
-DHDR     := $(PACKAGE)LinkDef.h
-
-DHDR_PWG0dep := $(DHDR)
-HDRS_PWG0dep := $(HDRS)
-SRCS_PWG0dep := $(SRCS) G__PWG0dep.cxx
-OBJS_PWG0dep := $(SRCS_PWG0dep:.cxx=.o)
-
-libPWG0dep.so: $(OBJS_PWG0dep)
-       @echo "Linking" $@ ...
-       @/bin/rm -f $@
-ifeq ($(ARCH),macosx)
-       @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
-else
-       @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
-endif
-       @chmod a+x $@
-       @echo "done"
-
-G__PWG0dep.cxx G__PWG0dep.h: $(HDRS_PWG0dep) $(DHDR_PWG0dep)
-       @echo "Generating dictionary ..."
-       rootcint -f $@ -c $(ALICEINC) $^
-
-## libPWG0selectors part
-
-SRCS     := $(wildcard *.cxx  */*.cxx)
-HDRS     := $(SRCS:.cxx=.h)
-DHDR     := $(PACKAGE)LinkDef.h
-
-DHDR_PWG0selectors := $(DHDR)
-HDRS_PWG0selectors := $(HDRS)
-SRCS_PWG0selectors := $(SRCS) G__PWG0selectors.cxx
-OBJS_PWG0selectors := $(SRCS_PWG0selectors:.cxx=.o)
-
-libPWG0selectors.so: $(OBJS_PWG0selectors)
-       @echo "Linking" $@ ...
-       @/bin/rm -f $@
-ifeq ($(ARCH),macosx)
-       @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
-else
-       @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
-endif
-       @chmod a+x $@
-       @echo "done"
-
-G__PWG0selectors.cxx G__PWG0selectors.h: $(HDRS_PWG0selectors) $(DHDR_PWG0selectors)
-       @echo "Generating dictionary ..."
-       rootcint -f $@ -c $(ALICEINC) $^
-
index 4de8441aeaa9d884601c2668fb8fb943a146d127..4d4bd4ad6b21e9a6585604db2c3bdfe5eb8695b9 100644 (file)
@@ -17,7 +17,7 @@ ifneq ($(ESD_INCLUDE),)
    ALICEINC += -I../$(ANALYSISalice_INCLUDE)
  else
     ifneq ($(ALICE_ROOT),)
-       ALICEINC += -I$(ALICE_ROOT)/include
+       ALICEINC += -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/PWG2
      endif
 endif
 
@@ -31,10 +31,18 @@ endif
 
 ifneq ($(PWG2femtoscopy_INCLUDE),)
   ALICEINC += -I../$(PWG2femtoscopy_INCLUDE)
+ else
+    ifneq ($(ALICE_ROOT),)
+       ALICEINC += -I$(ALICE_ROOT)/PWG2/AOD
+     endif
 endif
 
 ifneq ($(PWG2femtoscopyUser_INCLUDE),)
   ALICEINC += -I../$(PWG2femtoscopyUser_INCLUDE)
+ else
+    ifneq ($(ALICE_ROOT),)
+       ALICEINC += -I$(ALICE_ROOT)/PWG2/AOD -I$(ALICE_ROOT)/PWG2/FEMTOSCOPY/AliFemto
+     endif
 endif
 
 ifneq ($(PWG2flowCommon_INCLUDE),)
@@ -43,10 +51,18 @@ endif
 
 ifneq ($(PWG2flowTasks_INCLUDE),)
   ALICEINC += -I../$(PWG2flowTasks_INCLUDE)
+ else
+    ifneq ($(ALICE_ROOT),)
+       ALICEINC += -I$(ALICE_ROOT)/PWG2/FLOW/AliFlowCommon
+     endif
 endif
 
 ifneq ($(PWG2resonances_INCLUDE),)
   ALICEINC += -I../$(PWG2resonances_INCLUDE)
+ else
+    ifneq ($(ALICE_ROOT),)
+       ALICEINC += -I$(ALICE_ROOT)/PWG2/RESONANCES
+     endif
 endif
 
 ifneq ($(PWG2unicor_INCLUDE),)
@@ -63,6 +79,10 @@ endif
 
 ifneq ($(PWG2forward_INCLUDE),)
   ALICEINC += -I../$(PWG2forward_INCLUDE)
+ else
+    ifneq ($(ALICE_ROOT),)
+       ALICEINC += -I$(ALICE_ROOT)/FMD
+     endif
 endif
 
 # only if no par file was loaded before
@@ -79,7 +99,7 @@ endif
 
 #ALICEINC += -IFEMTOSCOPY/AliFemto -IANALYSIS -IFEMTOSCOPY/AliFemtoUser
 
-include lib$(PACKAGE).pkg
+include lib$(PACKAGE).pkg
 
 ifneq ($(EINCLUDE),)
   ALICEINC += $(EINCLUDE:%=-I$(ALICE_ROOT)/%)
@@ -88,6 +108,10 @@ endif
 CXXFLAGS     += $(ALICEINC) -g
 F77FLAGS     += $(ALICEINC) -g -fPIC
 
+DHDR =
+HDRS =
+SRCS =
+FSRCS =
 
 DHDR_PWG2 := $(DHDR)
 HDRS_PWG2 := $(HDRS)
@@ -114,7 +138,10 @@ endif
 %.o:    %.F
        $(F77) $(F77FLAGS) -c $< -o $@
 
-G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS_PWG2) $(DHDR_PWG2)
+G__$(PACKAGE).h:G__$(PACKAGE).cxx
+       @if test -f $@ ; then : ; else rm -f $< ; $(MAKE) $@ ; fi
+
+G__$(PACKAGE).cxx: $(HDRS_PWG2) $(DHDR_PWG2)
        @echo "Generating dictionary ..."
        rootcint -f $@ -c $(CINTFLAGS) $(ALICEINC) $^
 
diff --git a/PWG2/PROOF-INF.PWG2/BUILD.sh b/PWG2/PROOF-INF.PWG2/BUILD.sh
deleted file mode 100755 (executable)
index 1048a26..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#! /bin/sh
-
-touch libPWG2ebye.pkg
-touch libPWG2flowCommon.pkg
-touch libPWG2flowTasks.pkg
-
-make libPWG2.so
diff --git a/PWG2/PROOF-INF.PWG2/SETUP.C b/PWG2/PROOF-INF.PWG2/SETUP.C
deleted file mode 100644 (file)
index 3537610..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-void SETUP() {
-  // Load some ROOT libraries
-  CheckLoadLibrary("libEG");
-  CheckLoadLibrary("libGeom");
-  
-  // Load the ESD library
-  CheckLoadLibrary("libESD");
-
-  // Load the PWG2 library
-  CheckLoadLibrary("libPWG2");
-
-  // Set the include paths
-  gROOT->ProcessLine(".include PWG2");
-
-  // Set our location, so that other packages can find us
-  gSystem->Setenv("PWG2_INCLUDE", "PWG2");
-}
-
-Int_t CheckLoadLibrary(const char* library) {
-  // checks if a library is already loaded, if not loads the library
-  
-  if (strlen(gSystem->GetLibraries(Form("%s.so", library), "", kFALSE)) > 0)
-    return 1;
-  
-  return gSystem->Load(library);
-}
index 44de5339e11431a015d1fcd36d056965dab04892..bcc45e6f2c13d7d588c5b1255f95732c3def7b32 100644 (file)
@@ -34,9 +34,9 @@ else
   endif
 endif
 
-SRCS     := $(wildcard $(subst PWG3,,$(PACKAGE))/*.cxx)
-HDRS     := $(SRCS:.cxx=.h)
-DHDR     := $(PACKAGE)LinkDef.h
+SRCS     = $(wildcard $(subst PWG3,,$(PACKAGE))/*.cxx)
+HDRS     = $(SRCS:.cxx=.h)
+DHDR     = $(PACKAGE)LinkDef.h
 CXXFLAGS     += $(ALICEINC) -g
 
 DHDR_PWG3 := $(DHDR)
diff --git a/PWG3/PROOF-INF.PWG3/BUILD.sh b/PWG3/PROOF-INF.PWG3/BUILD.sh
deleted file mode 100755 (executable)
index e6311b3..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#! /bin/sh
-
-make libPWG3base.so
-make libPWG3muon.so
-make libPWG3vertexingHF.so
-make libPWG3vertexingOld.so
\ No newline at end of file
diff --git a/PWG3/PROOF-INF.PWG3/SETUP.C b/PWG3/PROOF-INF.PWG3/SETUP.C
deleted file mode 100644 (file)
index df28eda..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-void SETUP()
-{
-    // Load some ROOT libraries
-    CheckLoadLibrary("libTree");
-    CheckLoadLibrary("libGeom");
-    CheckLoadLibrary("libVMC");
-
-    // Load the ESD library
-    CheckLoadLibrary("libANALYSIS");
-    CheckLoadLibrary("libSTEERBase");
-    CheckLoadLibrary("libESD");
-    CheckLoadLibrary("libAOD");
-    CheckLoadLibrary("libANALYSISalice");
-    CheckLoadLibrary("libPWG3");
-
-
-   // Set the include paths
-   gROOT->ProcessLine(".include PWG3");
-
-   // Set our location, so that other packages can find us
-   gSystem->Setenv("PWG3_INCLUDE", "PWG3");
-}
-
-Int_t CheckLoadLibrary(const char* library)
-{
-  // checks if a library is already loaded, if not loads the library
-
-  if (strlen(gSystem->GetLibraries(Form("%s.so", library), "", kFALSE)) > 0)
-    return 1;
-
-  return gSystem->Load(library);
-}
index 73247858c47cbec0b8581cc3b4cf297a44034972..f8e9c9a484ed0a6f0139d3b47835d36f90a25f16 100644 (file)
@@ -90,9 +90,9 @@ endif
 
 CXXFLAGS += $(ALICEINC) -g
 
-SRCS     := $(wildcard $(subst PWG4,,$(PACKAGE))/*.cxx)
-HDRS     := $(SRCS:.cxx=.h)
-DHDR     := $(PACKAGE)LinkDef.h
+SRCS     = $(wildcard $(subst PWG4,,$(PACKAGE))/*.cxx)
+HDRS     = $(SRCS:.cxx=.h)
+DHDR     = $(PACKAGE)LinkDef.h
 
 DHDR_PWG4 := $(DHDR)
 HDRS_PWG4 := $(HDRS)
index 69f27d64f106497445123d99d11ab41026320c6d..795548c6f2b3c3173a13717d09791eeaf499d611 100644 (file)
@@ -2,9 +2,9 @@ PACKAGE = invalid-only-for-proof
 
 include $(ROOTSYS)/test/Makefile.arch
 
-SRCS     := $(wildcard *.cxx)
-HDRS     := $(SRCS:.cxx=.h)
-DHDR     := $(PACKAGE)LinkDef.h
+SRCS     = $(wildcard *.cxx)
+HDRS     = $(SRCS:.cxx=.h)
+DHDR     = $(PACKAGE)LinkDef.h
 
 
 ifndef PACKCXXFLAGS
diff --git a/STEER/PROOF-INF.ALIRECO/SETUP.C b/STEER/PROOF-INF.ALIRECO/SETUP.C
deleted file mode 100644 (file)
index 7ce5bff..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-void SETUP()
-{
-  gSystem->Load("libProof.so");
-  gSystem->Load("libGui.so");
-
-  loadlibsrec();
-}
-
index 5a75d86c12fd95efa60594d50987f22b68f6a705..e13b0e477c06c77f766659b06bcdcdb56f7eaa4c 100644 (file)
@@ -19,8 +19,11 @@ else
 endif
 
 PACKAGE = TTherminator
-include lib$(PACKAGE).pkg
 
+DHDR =
+HDRS =
+SRCS =
+FSRCS =
 DHDR_TTherminator := $(DHDR)
 HDRS_TTherminator := $(HDRS)
 SRCS_TTherminator := $(SRCS) G__$(PACKAGE).cxx
index 1d5e78691de7dcacf280a8141b822a254b9d7a8f..d43d206e6320bbcbce5b689745b6d300c4472233 100644 (file)
@@ -593,7 +593,7 @@ macro(ALICE_BuildPAR)
     endforeach(file ${SRCS} ${HDRS} ${FSRCS} ${DHDR})
     
     add_custom_target(${PACKAGE}.par
-                      COMMAND sed -e 's/include .\(ROOTSYS\)\\/test\\/Makefile.arch/include Makefile.arch/\; s/PACKAGE = .*/PACKAGE = ${PACKAGE}/' < Makefile > ${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE}/Makefile
+                      COMMAND sed -e 's/include .\(ROOTSYS\)\\/test\\/Makefile.arch/include Makefile.arch/\; s/PACKAGE = .*/PACKAGE = ${PACKAGE}/\; s,SRCS *=.*,SRCS = ${SRCS},\;' < Makefile | sed -e 's,HDRS *=.*,HDRS = ${HDRS},\; s,FSRCS *=.*,FSRCS = ${FSRCS},\; s,DHDR *=.*,DHDR = ${DHDR},' > ${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE}/Makefile
                       COMMAND cp -pR ${ROOTSYS}/test/Makefile.arch ${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE}/Makefile.arch
                       COMMAND cp -pR PROOF-INF.${PACKAGE} ${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE}/PROOF-INF
 #                      COMMAND cp -pR lib${PACKAGE}.pkg ${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE}
@@ -604,6 +604,7 @@ macro(ALICE_BuildPAR)
                       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
 
 
+    add_dependencies(${PACKAGE}.par ${SRCS} ${FSRCS} ${HDRS} ${DHDR})
     add_dependencies(par-all ${PACKAGE}.par)
     add_dependencies(${MODULE}-par-all ${PACKAGE}.par)
 
@@ -615,6 +616,7 @@ macro(ALICE_BuildPAR)
                       COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green --bold "${PACKAGE}.par testing succeeded"
                       WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
 
+    add_dependencies(test-${PACKAGE}.par ${PACKAGE}.par)
     add_dependencies(test-par-all test-${PACKAGE}.par)
     add_dependencies(test-${MODULE}-par-all test-${PACKAGE}.par)