diff options
author | David Robillard <d@drobilla.net> | 2018-09-16 12:28:58 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-09-16 13:47:48 +0200 |
commit | ba0c566fb126cfd5f28b9bc15a3a8f101619df2e (patch) | |
tree | 4928329d78316ac43ff6ac2ba38d849fde565dfd /wscript | |
parent | 65c3374ad2f1600c107c031b007b0f5532c6f2fe (diff) | |
download | sord-ba0c566fb126cfd5f28b9bc15a3a8f101619df2e.tar.gz sord-ba0c566fb126cfd5f28b9bc15a3a8f101619df2e.tar.bz2 sord-ba0c566fb126cfd5f28b9bc15a3a8f101619df2e.zip |
Clean up wscript
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 38 |
1 files changed, 18 insertions, 20 deletions
@@ -1,11 +1,11 @@ #!/usr/bin/env python + import glob import os -import subprocess import sys -import waflib.Logs as Logs -import waflib.Options as Options -import waflib.extras.autowaf as autowaf + +from waflib import Logs, Options +from waflib.extras import autowaf # Library and package version (UNIX style major, minor, micro) # major increment <=> incompatible changes @@ -25,14 +25,13 @@ def options(ctx): ctx.load('compiler_cxx') autowaf.set_options(ctx, test=True) opt = ctx.get_option_group('Configuration options') - opt.add_option('--no-utils', action='store_true', dest='no_utils', - help='do not build command line utilities') - opt.add_option('--static', action='store_true', dest='static', - help='build static library') - opt.add_option('--no-shared', action='store_true', dest='no_shared', - help='do not build shared library') - opt.add_option('--static-progs', action='store_true', dest='static_progs', - help='build programs as static binaries') + autowaf.add_flags( + opt, + {'no-utils': 'do not build command line utilities', + 'static': 'build static library', + 'no-shared': 'do not build shared library', + 'static-progs': 'build programs as static binaries'}) + opt.add_option('--dump', type='string', default='', dest='dump', help='dump debugging output (iter, search, write, all)') @@ -81,17 +80,16 @@ def configure(conf): if all or 'write' in dump: autowaf.define(conf, 'SORD_DEBUG_WRITE', 1) - autowaf.define(conf, 'SORD_VERSION', SORD_VERSION) autowaf.set_lib_env(conf, 'sord', SORD_VERSION) conf.write_config_header('sord_config.h', remove=False) - autowaf.display_summary(conf) - autowaf.display_msg(conf, 'Static library', bool(conf.env.BUILD_STATIC)) - autowaf.display_msg(conf, 'Shared library', bool(conf.env.BUILD_SHARED)) - autowaf.display_msg(conf, 'Utilities', bool(conf.env.BUILD_UTILS)) - autowaf.display_msg(conf, 'Unit tests', bool(conf.env.BUILD_TESTS)) - autowaf.display_msg(conf, 'Debug dumping', dump) - print('') + autowaf.display_summary( + conf, + {'Static library': bool(conf.env.BUILD_STATIC), + 'Shared library': bool(conf.env.BUILD_SHARED), + 'Utilities': bool(conf.env.BUILD_UTILS), + 'Unit tests': bool(conf.env.BUILD_TESTS), + 'Debug dumping': dump}) def build(bld): # C/C++ Headers |