Source

Datenwerk / SConstruct

#

env = Environment()
# make sure our own build chain uses local tools
env.PrependENVPath('PATH', '#python/utils')
# ensure our build chain usees our latest build
env.PrependENVPath('LD_LIBRARY_PATH', env.subst('#build/$variant_dir/datenwerk'))
# fix for issue #1: build of tests fails when python module is not in path
env.PrependENVPath('PYTHONPATH', '#python')

sources = env.SConscript(dirs=['src'],
    variant_dir='build/$variant_dir', duplicate=0, exports=['env'])

tests = env.SConscript(dirs=['tests'],
    variant_dir='build/$variant_dir/tests', duplicate=0, exports=['env'])

all = sources + tests

env.SConscript(dirs=['python'], exports=['env'])

env.SConscript(dirs=['include'], exports=['env'])

################################################################################
# targets
################################################################################

env.Alias('sources', sources)
env.Alias('tests', tests)
env.Alias('all', all)

env.Default('all')