summaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-08-08 21:09:03 +0000
committerDavid Robillard <d@drobilla.net>2012-08-08 21:09:03 +0000
commit0d819fcb26237e3872ee01f485d3fb542522a7f8 (patch)
treeee9b092b1ea8c3b4bd5eb6dd6a131843f14c860d /wscript
parent7ea8f3d5ce71aa93f2f29a9df941d9a31856674b (diff)
downloadsratom-0d819fcb26237e3872ee01f485d3fb542522a7f8.tar.gz
sratom-0d819fcb26237e3872ee01f485d3fb542522a7f8.tar.bz2
sratom-0d819fcb26237e3872ee01f485d3fb542522a7f8.zip
Clean up wscript files.
git-svn-id: http://svn.drobilla.net/lad/trunk/sratom@4624 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'wscript')
-rw-r--r--wscript22
1 files changed, 11 insertions, 11 deletions
diff --git a/wscript b/wscript
index 07481d5..5f0b4c2 100644
--- a/wscript
+++ b/wscript
@@ -27,9 +27,9 @@ out = 'build'
def options(opt):
opt.load('compiler_c')
autowaf.set_options(opt)
- opt.add_option('--test', action='store_true', default=False, dest='build_tests',
+ opt.add_option('--test', action='store_true', dest='build_tests',
help="Build unit tests")
- opt.add_option('--static', action='store_true', default=False, dest='static',
+ opt.add_option('--static', action='store_true', dest='static',
help="Build static library")
def configure(conf):
@@ -37,16 +37,16 @@ def configure(conf):
autowaf.configure(conf)
autowaf.display_header('Sratom Configuration')
- if conf.env['MSVC_COMPILER']:
+ if conf.env.MSVC_COMPILER:
conf.env.append_unique('CFLAGS', ['-TP', '-MD'])
else:
conf.env.append_unique('CFLAGS', '-std=c99')
- conf.env['BUILD_TESTS'] = Options.options.build_tests
- conf.env['BUILD_STATIC'] = Options.options.static
+ conf.env.BUILD_TESTS = Options.options.build_tests
+ conf.env.BUILD_STATIC = Options.options.static
# Check for gcov library (for test coverage)
- if conf.env['BUILD_TESTS']:
+ if conf.env.BUILD_TESTS:
conf.check_cc(lib='gcov',
define_name='HAVE_GCOV',
mandatory=False)
@@ -60,7 +60,7 @@ def configure(conf):
autowaf.define(conf, 'SRATOM_VERSION', SRATOM_VERSION)
conf.write_config_header('sratom_config.h', remove=False)
- autowaf.display_msg(conf, "Unit tests", str(conf.env['BUILD_TESTS']))
+ autowaf.display_msg(conf, "Unit tests", str(conf.env.BUILD_TESTS))
print('')
lib_source = [ 'src/sratom.c' ]
@@ -78,7 +78,7 @@ def build(bld):
libflags = [ '-fvisibility=hidden' ]
libs = [ 'm' ]
defines = []
- if bld.env['MSVC_COMPILER']:
+ if bld.env.MSVC_COMPILER:
libflags = []
libs = []
defines = ['snprintf=_snprintf']
@@ -98,7 +98,7 @@ def build(bld):
autowaf.use_lib(bld, obj, 'SERD SORD LV2')
# Static library
- if bld.env['BUILD_STATIC']:
+ if bld.env.BUILD_STATIC:
obj = bld(features = 'c cstlib',
export_includes = ['.'],
source = lib_source,
@@ -111,7 +111,7 @@ def build(bld):
defines = defines + ['SRATOM_INTERNAL'])
autowaf.use_lib(bld, obj, 'SERD SORD LV2')
- if bld.env['BUILD_TESTS']:
+ if bld.env.BUILD_TESTS:
test_libs = libs
test_cflags = ['']
if bld.is_defined('HAVE_GCOV'):
@@ -145,7 +145,7 @@ def build(bld):
autowaf.build_dox(bld, 'SRATOM', SRATOM_VERSION, top, out)
bld.add_post_fun(autowaf.run_ldconfig)
- if bld.env['DOCS']:
+ if bld.env.DOCS:
bld.add_post_fun(fix_docs)
def test(ctx):