diff --git a/Makefile b/Makefile index 137db6594ca00024e0d8a6bd00e087202885472e..98a5a8000556da343ea4d51993bdbc266cf8d40e 100644 --- a/Makefile +++ b/Makefile @@ -202,7 +202,10 @@ ifeq ($(BUILDUNURAN),yes) MODULES += math/unuran endif ifeq ($(BUILDCINTEX),yes) - MODULES += cint/cintex +MODULES += cint/cintex +endif +ifeq ($(BUILDCLING),yes) +MODULES += cint/cling endif ifeq ($(BUILDROOFIT),yes) MODULES += roofit/roofitcore roofit/roofit roofit/roostats @@ -461,9 +464,9 @@ STATICEXTRALIBS = $(PCRELDFLAGS) $(PCRELIB) \ COREL = $(BASEL1) $(BASEL2) $(BASEL3) $(CONTL) $(METAL) \ $(SYSTEML) $(CLIBL) $(METAUTILSL) $(EDITLINEL) COREO = $(BASEO) $(CONTO) $(METAO) $(SYSTEMO) $(ZIPO) $(CLIBO) \ - $(METAUTILSO) $(EDITLINEO) -COREDO = $(BASEDO) $(CONTDO) $(METADO) $(SYSTEMDO) $(CLIBDO) \ - $(METAUTILSDO) $(EDITLINEDO) + $(METAUTILSO) $(EDITLINEO) $(CLINGO) +COREDO = $(BASEDO) $(CONTDO) $(METADO) $(METACDO) $(SYSTEMDO) \ + $(CLIBDO) $(METAUTILSDO) $(EDITLINEDO) $(CLINGDO) CORELIB := $(LPATH)/libCore.$(SOEXT) COREMAP := $(CORELIB:.$(SOEXT)=.rootmap) @@ -563,7 +566,6 @@ skip: -include $(patsubst %,%/ModuleVars.mk,$(MODULES)) include $(patsubst %,%/Module.mk,$(MODULES)) --include cint/cling/Module.mk # irrelevant except for LLVM dev -include MyRules.mk # allow local rules ifeq ($(findstring $(MAKECMDGOALS),clean distclean maintainer-clean dist \ diff --git a/config/Makefile.in b/config/Makefile.in index 5e29bf329b5e66a5b3efaf02e9bca9194915c1c3..5400201c595afd6ff05c30df62eadbaa36867d06 100644 --- a/config/Makefile.in +++ b/config/Makefile.in @@ -278,6 +278,8 @@ GSLLIBDIR := @gsllibdir@ GSLLIBS := @gsllibs@ GSLVERSION := @gslversion@ +BUILDCLING := @buildcling@ + BUILDCINTEX := @buildcintex@ BUILDREFLEX := @buildreflex@ diff --git a/config/RConfigure.in b/config/RConfigure.in index a0ff1663cef3a43a1e5f6f4db2e9c31d4ffdfaab..eec8630a97c2b2b2462b2ae0b7c175914437a904 100644 --- a/config/RConfigure.in +++ b/config/RConfigure.in @@ -22,5 +22,6 @@ #@hasmathmore@ R__HAS_MATHMORE /**/ #@haspthread@ R__HAS_PTHREAD /**/ #@hasxft@ R__HAS_XFT /**/ +#@hascling@ R__HAS_CLING /**/ #endif diff --git a/configure b/configure index d63ef99e51f553340c5b3adedf27a0e4f4058547..2201b69d0d68f875b781815003e71329e5123281 100755 --- a/configure +++ b/configure @@ -48,6 +48,7 @@ options=" \ enable_chirp \ enable_cintex \ enable_clarens \ + enable_cling \ enable_editline \ enable_dcache \ enable_exceptions \ @@ -106,6 +107,7 @@ for c in $options ; do eval ${c}="yes" ; done for c in $deprecated_options ; do eval ${c}="yes" ; done for c in $options ; do eval ${c}_explicit="" ; done +enable_cling= enable_afs=no enable_gdml=no enable_globus=no @@ -4817,6 +4819,22 @@ fi check_explicit "$enable_genvector" "$enable_genvector_explicit" \ "Explicitly required GenVector dependencies not fulfilled" +###################################################################### +# +### echo %%% Cling - LLVM/clang based interpreter prototype +# +if test ! "x$enable_cling" = "xno"; then + if test -d cint/cling; then + message "Checking whether to build cling" + enable_cling="yes" + hascling="define" + result "yes" + fi +else + enable_cling="" + hascling="undef" +fi + ###################################################################### # ### echo %%% Cintex Library - Contributed library @@ -5507,6 +5525,7 @@ sed -e "s|@aclocaldir@|$aclocaldir|" \ -e "s|@zliblib@|$zliblib|" \ -e "s|@zliblibdir@|$zliblibdir|" \ -e "s|@buildcintex@|$enable_cintex|" \ + -e "s|@buildcling@|$enable_cling|" \ -e "s|@buildreflex@|$enable_reflex|" \ -e "s|@buildroofit@|$enable_roofit|" \ -e "s|@buildminuit2@|$enable_minuit2|" \ @@ -5735,6 +5754,7 @@ sed \ -e "s|@hasmathmore@|$hasmathmore|" \ -e "s|@haspthread@|$haspthread|" \ -e "s|@hasxft@|$hasxft|" \ + -e "s|@hascling@|$hascling|" \ < RConfigure.tmp > RConfigure-out.tmp rm -f RConfigure.tmp diff --git a/core/base/inc/TROOT.h b/core/base/inc/TROOT.h index 80a2d099dcb151787cebafd6c21cb99900ffca68..23ac5336132494025fd1870814ff4db1071fc1a6 100644 --- a/core/base/inc/TROOT.h +++ b/core/base/inc/TROOT.h @@ -57,6 +57,7 @@ R__EXTERN TVirtualMutex *gROOTMutex; class TROOT : public TDirectory { friend class TCint; +friend class TCling; private: Int_t fLineIsProcessing; //To synchronize multi-threads diff --git a/core/base/src/TROOT.cxx b/core/base/src/TROOT.cxx index fb6fbf18074a745bf156e2c50edc64afd4686309..f6f1f3bfa24f0a8a3040c0fe26d5ff27cb4e31c5 100644 --- a/core/base/src/TROOT.cxx +++ b/core/base/src/TROOT.cxx @@ -104,7 +104,11 @@ #include "TMap.h" #include "TObjString.h" #include "TVirtualMutex.h" -#include "TCint.h" +#ifdef R__HAS_CLING +# include "TCling.h" +#else +# include "TCint.h" +#endif #include <string> namespace std {} using namespace std; diff --git a/core/meta/Module.mk b/core/meta/Module.mk index 62e1b13d6cda3787010f1a1288ff5d88e009d955..50519b7d5d6ea5d2907d7d6f15d770f5e1768f78 100644 --- a/core/meta/Module.mk +++ b/core/meta/Module.mk @@ -18,13 +18,25 @@ METADS := $(MODDIRS)/G__Meta.cxx METADO := $(METADS:.cxx=.o) METADH := $(METADS:.cxx=.h) -METAH := $(filter-out $(MODDIRI)/LinkDef%,$(wildcard $(MODDIRI)/*.h)) -METAH := $(METAH) +ifneq ($(BUILDCLING),yes) +METACL := $(MODDIRI)/LinkDef_TCint.h +METACDS := $(MODDIRS)/G__TCint.cxx +METACH := $(MODDIRI)/TCint.h +else +METACL := +METACDS := +endif +METACDO := $(METACDS:.cxx=.o) +METACDH := $(METACDS:.cxx=.h) + +METAH := $(filter-out $(MODDIRI)/TCint.h,$(filter-out $(MODDIRI)/LinkDef%,$(wildcard $(MODDIRI)/*.h))) METAS := $(filter-out $(MODDIRS)/G__%,$(wildcard $(MODDIRS)/*.cxx)) -METAS := $(METAS) +ifeq ($(BUILDCLING),yes) +METAS := $(filter-out $(MODDIRS)/TCint.cxx,$(METAS)) +endif METAO := $(METAS:.cxx=.o) -METADEP := $(METAO:.o=.d) $(METADO:.o=.d) +METADEP := $(METAO:.o=.d) $(METADO:.o=.d) $(METACDO:.o=.d) # used in the main Makefile ALLHDRS += $(patsubst $(MODDIRI)/%.h,include/%.h,$(METAH)) @@ -42,14 +54,18 @@ $(METADS): $(METAH) $(METAL) $(ROOTCINTTMPDEP) @echo "Generating dictionary $@..." $(ROOTCINTTMP) -f $@ -c -DG__API $(METAH) $(METAL) -all-$(MODNAME): $(METAO) $(METADO) +$(METACDS): $(METACH) $(METACL) $(ROOTCINTTMPDEP) + @echo "Generating dictionary $@..." + $(ROOTCINTTMP) -f $@ -c -DG__API $(METACH) $(METACL) + +all-$(MODNAME): $(METAO) $(METADO) $(METACDO) clean-$(MODNAME): - @rm -f $(METAO) $(METADO) + @rm -f $(METAO) $(METADO) $(METACDO) clean:: clean-$(MODNAME) distclean-$(MODNAME): clean-$(MODNAME) - @rm -f $(METADEP) $(METADS) $(METADH) + @rm -f $(METADEP) $(METADS) $(METADH) $(METACDS) $(METACDH) distclean:: distclean-$(MODNAME) diff --git a/core/meta/inc/LinkDef.h b/core/meta/inc/LinkDef.h index d8e7cc94235e15c5b32f0c4bacc32b98956ecde6..641ace690e3c3df2aa3d2522a5f1c825ae2d9304 100644 --- a/core/meta/inc/LinkDef.h +++ b/core/meta/inc/LinkDef.h @@ -17,7 +17,6 @@ #pragma link C++ enum EProperty; -#pragma link C++ class TCint; #pragma link C++ class TBaseClass; #pragma link C++ class TClass; #pragma link C++ class TClassStreamer+; diff --git a/core/meta/inc/LinkDef_TCint.h b/core/meta/inc/LinkDef_TCint.h new file mode 100644 index 0000000000000000000000000000000000000000..e792d34602482873be0bc4e9a717f0b1d5d86573 --- /dev/null +++ b/core/meta/inc/LinkDef_TCint.h @@ -0,0 +1,17 @@ +/* @(#)root/meta:$Id$ */ + +/************************************************************************* + * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * + * All rights reserved. * + * * + * For the licensing terms see $ROOTSYS/LICENSE. * + * For the list of contributors see $ROOTSYS/README/CREDITS. * + *************************************************************************/ + +#ifdef __CINT__ + +#pragma link C++ nestedtypedefs; +#pragma link C++ nestedclasses; + +#pragma link C++ class TCint; +#endif