From 18881ab99e867337a25cd9e48f0dc52e8b0b5ecd Mon Sep 17 00:00:00 2001 From: Alex Barnes Date: Tue, 8 Dec 2015 11:03:14 -0500 Subject: [PATCH] Removed SConstruct, added SConscript for PSC_TW and PS_E_calib --- src/plugins/Calibration/PSC_TW/SConscript | 12 ++ src/plugins/Calibration/PSC_TW/SConstruct | 126 ------------------ src/plugins/Calibration/PS_E_calib/SConscript | 12 ++ src/plugins/Calibration/PS_E_calib/SConstruct | 126 ------------------ src/plugins/Calibration/SConscript | 2 +- 5 files changed, 25 insertions(+), 253 deletions(-) create mode 100644 src/plugins/Calibration/PSC_TW/SConscript delete mode 100644 src/plugins/Calibration/PSC_TW/SConstruct create mode 100644 src/plugins/Calibration/PS_E_calib/SConscript delete mode 100644 src/plugins/Calibration/PS_E_calib/SConstruct diff --git a/src/plugins/Calibration/PSC_TW/SConscript b/src/plugins/Calibration/PSC_TW/SConscript new file mode 100644 index 000000000..1c0a90264 --- /dev/null +++ b/src/plugins/Calibration/PSC_TW/SConscript @@ -0,0 +1,12 @@ + + +import sbms + +# get env object and clone it +Import('*') +env = env.Clone() + +sbms.AddDANA(env) +sbms.plugin(env) + + diff --git a/src/plugins/Calibration/PSC_TW/SConstruct b/src/plugins/Calibration/PSC_TW/SConstruct deleted file mode 100644 index c62f0d831..000000000 --- a/src/plugins/Calibration/PSC_TW/SConstruct +++ /dev/null @@ -1,126 +0,0 @@ - -# -# Jan. 31, 2014 David Lawrence -# -# This SConstruct file can be copied into a directory containing -# the source for a plugin and used to compile it. It will use and -# install into the directory specified by the HALLD_MY environment -# variable if defined. Otherwise, it will install in the HALLD_HOME -# directory. -# -# This file should not need modification. It will be copied in by -# the mkplugin or mkfactory_plugin scripts or you can just copy it -# by hand. -# -# To use this, just type "scons install" to build and install. -# Just type "scons" if you want to build, but not install it. -# -# > scons install -# -# Note that unlike the rest of the SBMS system, this does not -# use a separate build directory and builds everything in the -# source directory. This is due to technical details and will hopefully -# be fixed in the future. For now it means, that you must be -# diligent of building for multiple platforms using the same source. -# - -import os -import sys -import subprocess -import glob - -# Get HALLD_HOME environment variable, verifying it is set -halld_home = os.getenv('HALLD_HOME') -if(halld_home == None): - print 'HALLD_HOME environment variable not set!' - exit(-1) - -# Get HALLD_MY if it exists. Otherwise use HALLD_HOME -halld_my = os.getenv('HALLD_MY', halld_home) - -# Add SBMS directory to PYTHONPATH -sbmsdir = "%s/src/SBMS" % halld_home -sys.path.append(sbmsdir) - -import sbms - -# Get command-line options -SHOWBUILD = ARGUMENTS.get('SHOWBUILD', 0) - -# Get platform-specific name -osname = os.getenv('BMS_OSNAME', 'build') - -# Get architecture name -arch = subprocess.Popen(["uname"], stdout=subprocess.PIPE).communicate()[0].strip() - -# Setup initial environment -installdir = "%s/%s" %(halld_my, osname) -include = "%s/include" % (installdir) -bin = "%s/bin" % (installdir) -lib = "%s/lib" % (installdir) -plugins = "%s/plugins" % (installdir) -env = Environment( CPPPATH = [include], - LIBPATH = ["%s/%s/lib" %(halld_home, osname)], # n.b. add HALLD_HOME here and prepend HALLD_MY below - variant_dir = ".%s" % (osname)) - -# Only add HALLD_MY library search path if it already exists -# since we'll get a warning otherwise -if (os.path.exists(lib)): env.PrependUnique(lib) - -# These are SBMS-specific variables (i.e. not default scons ones) -env.Replace(INSTALLDIR = installdir, - OSNAME = osname, - INCDIR = include, - BINDIR = bin, - LIBDIR = lib, - PLUGINSDIR = plugins, - ALL_SOURCES = [], # used so we can add generated sources - SHOWBUILD = SHOWBUILD, - COMMAND_LINE_TARGETS = COMMAND_LINE_TARGETS) - -# Use terse output unless otherwise specified -if SHOWBUILD==0: - env.Replace( CCCOMSTR = "Compiling [$SOURCE]", - CXXCOMSTR = "Compiling [$SOURCE]", - FORTRANPPCOMSTR = "Compiling [$SOURCE]", - FORTRANCOMSTR = "Compiling [$SOURCE]", - SHCCCOMSTR = "Compiling [$SOURCE]", - SHCXXCOMSTR = "Compiling [$SOURCE]", - LINKCOMSTR = "Linking [$TARGET]", - SHLINKCOMSTR = "Linking [$TARGET]", - INSTALLSTR = "Installing [$TARGET]", - ARCOMSTR = "Archiving [$TARGET]", - RANLIBCOMSTR = "Ranlib [$TARGET]") - - -# Get compiler from environment variables (if set) -env.Replace( CXX = os.getenv('CXX', 'g++'), - CC = os.getenv('CC' , 'gcc'), - FC = os.getenv('FC' , 'gfortran') ) - -# Add local directory, directories from HALLD_MY and HALLD_HOME to include search path -#env.PrependUnique(CPPPATH = ['#']) -env.PrependUnique(CPPPATH = ['%s/src' % halld_my, '%s/src/libraries' % halld_my, '%s/src/libraries/include' % halld_my]) -env.PrependUnique(CPPPATH = ['%s/src' % halld_home, '%s/src/libraries' % halld_home, '%s/src/libraries/include' % halld_home]) - -env.PrependUnique(CPPPATH = ['%s/%s/include' % (halld_my,osname)]) -env.PrependUnique(CPPPATH = ['%s/%s/include' % (halld_home,osname)]) - -# Turn on debug symbols and warnings -env.PrependUnique( CFLAGS = ['-g', '-fPIC', '-Wall']) -env.PrependUnique( CXXFLAGS = ['-g', '-fPIC', '-Wall']) -env.PrependUnique(FORTRANFLAGS = ['-g', '-fPIC', '-Wall']) - -# Apply any platform/architecture specific settings -sbms.ApplyPlatformSpecificSettings(env, arch) -sbms.ApplyPlatformSpecificSettings(env, osname) - -# Make plugin from source in this directory -sbms.AddDANA(env) -sbms.AddROOT(env) -sbms.plugin(env) - -# Make install target -env.Alias('install', installdir) - - diff --git a/src/plugins/Calibration/PS_E_calib/SConscript b/src/plugins/Calibration/PS_E_calib/SConscript new file mode 100644 index 000000000..1c0a90264 --- /dev/null +++ b/src/plugins/Calibration/PS_E_calib/SConscript @@ -0,0 +1,12 @@ + + +import sbms + +# get env object and clone it +Import('*') +env = env.Clone() + +sbms.AddDANA(env) +sbms.plugin(env) + + diff --git a/src/plugins/Calibration/PS_E_calib/SConstruct b/src/plugins/Calibration/PS_E_calib/SConstruct deleted file mode 100644 index c62f0d831..000000000 --- a/src/plugins/Calibration/PS_E_calib/SConstruct +++ /dev/null @@ -1,126 +0,0 @@ - -# -# Jan. 31, 2014 David Lawrence -# -# This SConstruct file can be copied into a directory containing -# the source for a plugin and used to compile it. It will use and -# install into the directory specified by the HALLD_MY environment -# variable if defined. Otherwise, it will install in the HALLD_HOME -# directory. -# -# This file should not need modification. It will be copied in by -# the mkplugin or mkfactory_plugin scripts or you can just copy it -# by hand. -# -# To use this, just type "scons install" to build and install. -# Just type "scons" if you want to build, but not install it. -# -# > scons install -# -# Note that unlike the rest of the SBMS system, this does not -# use a separate build directory and builds everything in the -# source directory. This is due to technical details and will hopefully -# be fixed in the future. For now it means, that you must be -# diligent of building for multiple platforms using the same source. -# - -import os -import sys -import subprocess -import glob - -# Get HALLD_HOME environment variable, verifying it is set -halld_home = os.getenv('HALLD_HOME') -if(halld_home == None): - print 'HALLD_HOME environment variable not set!' - exit(-1) - -# Get HALLD_MY if it exists. Otherwise use HALLD_HOME -halld_my = os.getenv('HALLD_MY', halld_home) - -# Add SBMS directory to PYTHONPATH -sbmsdir = "%s/src/SBMS" % halld_home -sys.path.append(sbmsdir) - -import sbms - -# Get command-line options -SHOWBUILD = ARGUMENTS.get('SHOWBUILD', 0) - -# Get platform-specific name -osname = os.getenv('BMS_OSNAME', 'build') - -# Get architecture name -arch = subprocess.Popen(["uname"], stdout=subprocess.PIPE).communicate()[0].strip() - -# Setup initial environment -installdir = "%s/%s" %(halld_my, osname) -include = "%s/include" % (installdir) -bin = "%s/bin" % (installdir) -lib = "%s/lib" % (installdir) -plugins = "%s/plugins" % (installdir) -env = Environment( CPPPATH = [include], - LIBPATH = ["%s/%s/lib" %(halld_home, osname)], # n.b. add HALLD_HOME here and prepend HALLD_MY below - variant_dir = ".%s" % (osname)) - -# Only add HALLD_MY library search path if it already exists -# since we'll get a warning otherwise -if (os.path.exists(lib)): env.PrependUnique(lib) - -# These are SBMS-specific variables (i.e. not default scons ones) -env.Replace(INSTALLDIR = installdir, - OSNAME = osname, - INCDIR = include, - BINDIR = bin, - LIBDIR = lib, - PLUGINSDIR = plugins, - ALL_SOURCES = [], # used so we can add generated sources - SHOWBUILD = SHOWBUILD, - COMMAND_LINE_TARGETS = COMMAND_LINE_TARGETS) - -# Use terse output unless otherwise specified -if SHOWBUILD==0: - env.Replace( CCCOMSTR = "Compiling [$SOURCE]", - CXXCOMSTR = "Compiling [$SOURCE]", - FORTRANPPCOMSTR = "Compiling [$SOURCE]", - FORTRANCOMSTR = "Compiling [$SOURCE]", - SHCCCOMSTR = "Compiling [$SOURCE]", - SHCXXCOMSTR = "Compiling [$SOURCE]", - LINKCOMSTR = "Linking [$TARGET]", - SHLINKCOMSTR = "Linking [$TARGET]", - INSTALLSTR = "Installing [$TARGET]", - ARCOMSTR = "Archiving [$TARGET]", - RANLIBCOMSTR = "Ranlib [$TARGET]") - - -# Get compiler from environment variables (if set) -env.Replace( CXX = os.getenv('CXX', 'g++'), - CC = os.getenv('CC' , 'gcc'), - FC = os.getenv('FC' , 'gfortran') ) - -# Add local directory, directories from HALLD_MY and HALLD_HOME to include search path -#env.PrependUnique(CPPPATH = ['#']) -env.PrependUnique(CPPPATH = ['%s/src' % halld_my, '%s/src/libraries' % halld_my, '%s/src/libraries/include' % halld_my]) -env.PrependUnique(CPPPATH = ['%s/src' % halld_home, '%s/src/libraries' % halld_home, '%s/src/libraries/include' % halld_home]) - -env.PrependUnique(CPPPATH = ['%s/%s/include' % (halld_my,osname)]) -env.PrependUnique(CPPPATH = ['%s/%s/include' % (halld_home,osname)]) - -# Turn on debug symbols and warnings -env.PrependUnique( CFLAGS = ['-g', '-fPIC', '-Wall']) -env.PrependUnique( CXXFLAGS = ['-g', '-fPIC', '-Wall']) -env.PrependUnique(FORTRANFLAGS = ['-g', '-fPIC', '-Wall']) - -# Apply any platform/architecture specific settings -sbms.ApplyPlatformSpecificSettings(env, arch) -sbms.ApplyPlatformSpecificSettings(env, osname) - -# Make plugin from source in this directory -sbms.AddDANA(env) -sbms.AddROOT(env) -sbms.plugin(env) - -# Make install target -env.Alias('install', installdir) - - diff --git a/src/plugins/Calibration/SConscript b/src/plugins/Calibration/SConscript index 8b52b18c3..e0acfa363 100644 --- a/src/plugins/Calibration/SConscript +++ b/src/plugins/Calibration/SConscript @@ -4,6 +4,6 @@ import sbms Import('*') # update this when plugins are added -subdirs = ['BCAL_attenlength_gainratio','BCAL_gainmatrix','BCAL_TDC_Timing','HLDetectorTiming','TAGH_timewalk','CDC_TimeToDistance','PS_timing'] +subdirs = ['BCAL_attenlength_gainratio','BCAL_gainmatrix','BCAL_TDC_Timing','HLDetectorTiming','TAGH_timewalk','CDC_TimeToDistance','PS_timing','PSC_TW','PS_E_calib'] SConscript(dirs=subdirs, exports='env osname', duplicate=0)