Possibility to create ESD par file (Jan)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 31 May 2006 19:45:34 +0000 (19:45 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 31 May 2006 19:45:34 +0000 (19:45 +0000)
STEER/Makefile [new file with mode: 0644]
STEER/PROOF-INF.ESD/BUILD.sh [new file with mode: 0755]
STEER/PROOF-INF.ESD/SETUP.C [new file with mode: 0644]
build/module.tpl

diff --git a/STEER/Makefile b/STEER/Makefile
new file mode 100644 (file)
index 0000000..698abb5
--- /dev/null
@@ -0,0 +1,30 @@
+PACKAGE = invalid-only-for-proof
+
+include $(ROOTSYS)/test/Makefile.arch
+include lib$(PACKAGE).pkg
+
+SRCS         += dict.cxx
+OBJS          = $(SRCS:.cxx=.o)
+
+lib$(PACKAGE).so: $(OBJS)
+       @echo "Linking" $@ ...
+       @/bin/rm -f $@
+ifeq ($(PLATFORM),macosx)
+       @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
+else
+       @$(LD) $(SOFLAGS) $(LDFLAGS) $(OBJS) -o $@
+endif
+       @chmod a+x $@
+       @echo "done"
+
+%.o:    %.cxx %.h
+       $(CXX) $(CXXFLAGS) -c $< -o $@
+
+clean:
+       @rm -f $(OBJS) core *~ *.so dict.*
+
+dict.cxx dict.h: $(HDRS) $(DHDR)
+       @echo "Generating dictionary ..."
+       @[ -f dict ] || rm -f $@
+       rootcint -f $@ -c $(ALICEINC) $^
+
diff --git a/STEER/PROOF-INF.ESD/BUILD.sh b/STEER/PROOF-INF.ESD/BUILD.sh
new file mode 100755 (executable)
index 0000000..fc9490a
--- /dev/null
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+make 
diff --git a/STEER/PROOF-INF.ESD/SETUP.C b/STEER/PROOF-INF.ESD/SETUP.C
new file mode 100644 (file)
index 0000000..e48344a
--- /dev/null
@@ -0,0 +1,16 @@
+void SETUP()
+{
+   // Load some ROOT libraries
+   gSystem->Load("libEG");
+   gSystem->Load("libGeom");
+
+   // Load the ESD library
+   gSystem->Load("libESD");
+
+   // Set the Inlucde paths
+   gSystem->SetIncludePath("-I$ROOTSYS/include -IESD");
+   gROOT->ProcessLine(".include ESD");
+
+   // Set our location, so that other packages can find us
+   gSystem->Setenv("ESD_INCLUDE", "ESD");
+}
index 2e0e1ac..d93e165 100644 (file)
@@ -91,7 +91,7 @@ endif
 #                         else use all headers
 
 ifndef CINTHDRS
-@PACKAGE@CINTHDRS:=$(@PACKAGE@H) 
+@PACKAGE@CINTHDRS:=$(@PACKAGE@H)
 else
 @PACKAGE@CINTHDRS:=$(CINTHDRS)
 endif
@@ -251,11 +251,11 @@ endif
 
 $(@PACKAGE@DS): $(@PACKAGE@CINTHDRS) $(@PACKAGE@DH) @MODULE@/module.mk @MODULE@/tgt_$(ALICE_TARGET)/@PACKAGE@_srcslist
 ifndef ALIQUIET
-        @echo "***** Creating $@ *****";       
+        @echo "***** Creating $@ *****";
 endif
         @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
         @\rm -f $(patsubst %.cxx,%.d, $@)
-        $(MUTE)rootcint -f $@ -c $(@PACKAGE@DEFINE) $(CINTFLAGS) $(@PACKAGE@INC) $(@PACKAGE@CINTHDRS) $(@PACKAGE@DH) 
+        $(MUTE)rootcint -f $@ -c $(@PACKAGE@DEFINE) $(CINTFLAGS) $(@PACKAGE@INC) $(@PACKAGE@CINTHDRS) $(@PACKAGE@DH)
 
 $(@PACKAGE@DO): $(@PACKAGE@DS) 
 ifndef ALIQUIET
@@ -376,3 +376,37 @@ check-@MODULE@: $(@PACKAGE@CHECKS)
 
 PACKREVENG += $(@PACKAGE@PREPROC)
 
+# targets to create .par archives (jgrosseo)
+@PACKAGE@.par: $(patsubst %,@MODULE@/@PACKAGE@/%,$(filter-out dict.%, $(HDRS) $(SRCS) $(DHDR) $(PKGFILE) Makefile Makefile.arch lib@PACKAGE@.pkg PROOF-INF))
+       @echo "Creating archive" $@ ...
+       @cd @MODULE@; tar cfzh ../$@ @PACKAGE@
+       @rm -rf @MODULE@/@PACKAGE@
+       @echo "done"
+
+@MODULE@/@PACKAGE@/Makefile: @MODULE@/Makefile
+       @echo Copying $< to $@ with transformations
+       @[ -d $(dir $@) ] || mkdir -p $(dir $@)
+       @sed 's/include \$$(ROOTSYS)\/test\/Makefile.arch/include Makefile.arch/' < $^ > $@
+       @sed 's/PACKAGE = .*/PACKAGE = @PACKAGE@/' < $^ > $@
+
+@MODULE@/@PACKAGE@/Makefile.arch: $(ROOTSYS)/test/Makefile.arch
+       @echo Copying $< to $@
+       @[ -d $(dir $@) ] || mkdir -p $(dir $@)
+       @cp $^ $@
+
+@MODULE@/@PACKAGE@/PROOF-INF: @MODULE@/PROOF-INF.@PACKAGE@
+       @echo Copying $< to $@
+       @[ -d $(dir $@) ] || mkdir -p $(dir $@)
+       @cp -r $^ $@
+
+@MODULE@/@PACKAGE@/%: @MODULE@/%
+       @echo Copying $< to $@
+       @[ -d $(dir $@) ] || mkdir -p $(dir $@)
+       @cp $< $@
+
+test-@PACKAGE@.par: @PACKAGE@.par
+       @echo "INFO: The file $< is now tested, in case of an error check in par-tmp/@PACKAGE@."
+       @mkdir -p par-tmp
+       @cd par-tmp; tar xfz ../$<;     cd $(subst .par,,$<); PROOF-INF/BUILD.sh
+       @rm -rf par-tmp/@PACKAGE@
+       @echo "INFO: Testing succeeded (already cleaned up)"