From 4206fc88ba9880688ea27b08beec6439f818d233 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 16 Dec 2010 04:04:45 +0000 Subject: Updates for waf 1.6. Note: this revision breaks documentation installation. git-svn-id: http://svn.drobilla.net/lad/trunk/raul@2719 a436a847-0d15-0410-975c-d299462d15a1 --- wscript | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'wscript') diff --git a/wscript b/wscript index 965c2f2..caf9326 100644 --- a/wscript +++ b/wscript @@ -29,10 +29,10 @@ APPNAME = 'raul' VERSION = RAUL_VERSION # Mandatory variables -srcdir = '.' -blddir = 'build' +top = '.' +out = 'build' -def set_options(opt): +def options(opt): autowaf.set_options(opt) opt.add_option('--test', action='store_true', default=False, dest='build_tests', help="Build unit tests") @@ -57,7 +57,7 @@ def configure(conf): if Options.options.log_debug: conf.define('LOG_DEBUG', 1) - conf.write_config_header('raul-config.h') + conf.write_config_header('raul-config.h', remove=False) # Boost headers autowaf.check_header(conf, 'boost/shared_ptr.hpp', mandatory=True) @@ -84,8 +84,8 @@ tests = ''' def build(bld): # Headers - bld.install_files('${INCLUDEDIR}/raul', 'raul/*.hpp') - bld.install_files('${INCLUDEDIR}/raul', 'raul/*.h') + bld.install_files('${INCLUDEDIR}/raul', bld.path.ant_glob('raul/*.hpp')) + bld.install_files('${INCLUDEDIR}/raul', bld.path.ant_glob('raul/*.h')) # Pkgconfig file autowaf.build_pc(bld, 'RAUL', RAUL_VERSION, 'GLIBMM GTHREAD') @@ -102,46 +102,46 @@ def build(bld): ''' # Library - obj = bld.new_task_gen('cxx', 'shlib') - obj.export_incdirs = ['.'] - obj.source = lib_source - obj.includes = ['.', './src'] - obj.name = 'libraul' - obj.target = 'raul' - obj.uselib = 'GLIBMM GTHREAD' - obj.install_path = '${LIBDIR}' - obj.vnum = RAUL_LIB_VERSION + obj = bld(features = 'cxx cxxshlib') + obj.export_includes = ['.'] + obj.source = lib_source + obj.includes = ['.', './src'] + obj.name = 'libraul' + obj.target = 'raul' + obj.uselib = 'GLIBMM GTHREAD' + obj.install_path = '${LIBDIR}' + obj.vnum = RAUL_LIB_VERSION if bld.env['BUILD_TESTS']: # Static library (for unit test code coverage) - obj = bld.new_task_gen('cxx', 'staticlib') + obj = bld(features = 'cxx cxxstaticlib') obj.source = lib_source obj.includes = ['.', './src'] obj.name = 'libraul_static' obj.target = 'raul_static' obj.uselib = 'GLIBMM GTHREAD' obj.install_path = '' - obj.cxxflags = [ '-fprofile-arcs', '-ftest-coverage' ] + obj.cxxflags = [ '-fprofile-arcs', '-ftest-coverage' ] # Unit tests for i in tests.split(): - obj = bld.new_task_gen('cxx', 'program') + obj = bld(features = 'cxx cxxprogram') obj.source = i + '.cpp' obj.includes = ['.', './src'] - obj.uselib_local = 'libraul_static' + obj.use = 'libraul_static' obj.uselib = 'GLIB GLIBMM' obj.libs = 'gcov' obj.target = i obj.install_path = '' - obj.cxxflags = [ '-fprofile-arcs', '-ftest-coverage' ] + obj.cxxflags = [ '-fprofile-arcs', '-ftest-coverage' ] # Documentation - autowaf.build_dox(bld, 'RAUL', RAUL_VERSION, srcdir, blddir) - bld.install_files('${HTMLDIR}', blddir + '/default/doc/html/*') + autowaf.build_dox(bld, 'RAUL', RAUL_VERSION, top, out) + #bld.install_files('${HTMLDIR}', bld.path.ant_glob(out + '/default/doc/html/*')) def test(ctx): autowaf.run_tests(ctx, APPNAME, tests.split()) -def shutdown(): +def shutdown(self): autowaf.shutdown() -- cgit v1.2.1