diff --git a/SConstruct b/SConstruct index ccb0a73a7..e081d9144 100644 --- a/SConstruct +++ b/SConstruct @@ -53,85 +53,58 @@ import Platform ##################################################################### - -def defineBuildTargets(env): - """ define the source file/dirs comprising each artifact to be built. - setup sub-environments with special build options if necessary. - We use a custom function to declare a whole tree of srcfiles. - """ - - # define Icons to render and install - vector_icon_dir = env.subst(env.path.srcIcon+'svg') - prerendered_icon_dir = env.subst(env.path.srcIcon+'prerendered') - icons = ( [env.IconRender(f) for f in scanSubtree(vector_icon_dir, ['*.svg'])] - + [env.IconResource(f) for f in scanSubtree(prerendered_icon_dir, ['*.png'])] - ) - - #define Configuration files to install - config = ( env.ConfigData(env.path.srcConf+'setup.ini', targetDir='$ORIGIN') - + env.ConfigData(env.path.srcConf+'dummy_lumiera.ini') - ) - - # call subdir SConscript(s) for independent components - SConscript(dirs=['src','src/tool','research','tests'], exports='env icons config') - - - -def definePostBuildTargets(env): - """ define further actions after the core build (e.g. Documentation). - define alias targets to trigger the installing. - """ - Import('lumiera plugins tools gui testsuite') - build = env.Alias('build', lumiera + plugins + tools +gui) - - # additional files to be cleaned when cleaning 'build' - env.Clean ('build', [ 'scache.conf', '.sconf_temp', '.sconsign.dblite', 'config.log' ]) - env.Clean ('build', [ 'src/pre.gch' ]) - - doxydoc = env.Doxygen('doc/devel/Doxyfile') - env.Alias ('doc', doxydoc) - env.Clean ('doc', doxydoc + ['doc/devel/,doxylog','doc/devel/warnings.txt']) - - env.Alias ('all', build + testsuite + doxydoc) - env.Default('build') - # SCons default target - - -def defineInstallTargets(env): - """ define additional artifacts to be installed into target locations. - @note: we use customised SCons builders defining install targets - for all executables automatically. see LumieraEnvironment.py - """ - Import('lumiera plugins tools gui testsuite') - - env.SymLink('$DESTDIR/bin/lumiera',env.path.installExe+'lumiera','../lib/lumiera/lumiera') -# env.Install(dir = '$DESTDIR/share/doc/lumiera$VERSION/devel', source=doxydoc) - - env.Alias('install', gui) - env.Alias('install', '$DESTDIR') - -##################################################################### - - - - - -### === MAIN === #################################################### - env = Setup.setupBasicEnvironment() if not (isCleanupOperation(env) or isHelpRequest()): env = Platform.configurePlatform(env) - -# the various things we build. -# Each entry actually is a SCons-Node list. -# Passing these entries to other builders defines dependencies. -# 'lumiera' : the App -# 'gui' : the GTK UI (plugin) -# 'plugins' : plugin shared lib -# 'tools' : small tool applications (e.g mpegtoc) -defineBuildTargets(env) -definePostBuildTargets(env) -defineInstallTargets(env) +##################################################################### + +# define Icons to render and install +vector_icon_dir = env.subst(env.path.srcIcon+'svg') +prerendered_icon_dir = env.subst(env.path.srcIcon+'prerendered') +icons = ( [env.IconRender(f) for f in scanSubtree(vector_icon_dir, ['*.svg'])] + + [env.IconResource(f) for f in scanSubtree(prerendered_icon_dir, ['*.png'])] + ) + +#define Configuration files to install +config = ( env.ConfigData(env.path.srcConf+'setup.ini', targetDir='$ORIGIN') + + env.ConfigData(env.path.srcConf+'dummy_lumiera.ini') + ) + +doxydoc = env.Doxygen('doc/devel/Doxyfile') +env.Alias ('doc', doxydoc) +env.Clean ('doc', doxydoc + ['doc/devel/,doxylog','doc/devel/warnings.txt']) +# env.Install(dir = '$DESTDIR/share/doc/lumiera$VERSION/devel', source=doxydoc) + + + +### === MAIN BUILD === ############################################## + +# call subdir SConscript(s) for to define the actual build targets +SConscript(dirs=['src','src/tool','research','tests'], exports='env icons config') + +# artifacts defined by the build targets +Import('lumiera plugins tools gui testsuite') + + + +# additional files to be cleaned when cleaning 'build' +env.Clean ('build', [ 'scache.conf', '.sconf_temp', '.sconsign.dblite', 'config.log' ]) +env.Clean ('build', [ 'src/pre.gch' ]) + + + +### === Alias Targets === ########################################### + +build = env.Alias('build', lumiera + plugins + tools +gui) + +env.Alias ('all', build + testsuite + doxydoc) +env.Default('build') +# SCons default target + +env.Alias('install', gui) +env.Alias('install', '$DESTDIR') + +##################################################################### diff --git a/src/SConscript b/src/SConscript index c0718205d..3127af3ec 100644 --- a/src/SConscript +++ b/src/SConscript @@ -9,6 +9,7 @@ from Buildhelper import scanSubtree Import('env icons config') +# define the source file/dirs comprising each artifact to be built. lLib = env.SharedLibrary('lumiera', srcSubtree('lib'), install=True) lApp = env.SharedLibrary('lumieracommon', srcSubtree('common'), install=True, LIBS=lLib) @@ -23,6 +24,11 @@ lumiera = ( env.Program('lumiera', ['lumiera/main.cpp'] + core, install=True) + config ) +# Install the lumiera application: +# symlink the executable into the bin dir +env.SymLink('$DESTDIR/bin/lumiera',env.path.installExe+'lumiera','../lib/lumiera/lumiera') + + # building Lumiera Plugins plugins = [] # currently none