diff options
author | David Robillard <d@drobilla.net> | 2019-03-15 22:15:34 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-03-17 00:31:46 +0100 |
commit | 9fde01f46c499ee214d8c6b79abd876c7ff5cdc1 (patch) | |
tree | 0ac1a93324228968fca0bffcdcf6e00cba320513 /extras | |
parent | 6d3612fd46649c5eb00ec411376ca6b85718d424 (diff) | |
download | autowaf-9fde01f46c499ee214d8c6b79abd876c7ff5cdc1.tar.gz autowaf-9fde01f46c499ee214d8c6b79abd876c7ff5cdc1.tar.bz2 autowaf-9fde01f46c499ee214d8c6b79abd876c7ff5cdc1.zip |
Add custom configuration context
Diffstat (limited to 'extras')
-rw-r--r-- | extras/autowaf.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/extras/autowaf.py b/extras/autowaf.py index a7aa639..39bed3a 100644 --- a/extras/autowaf.py +++ b/extras/autowaf.py @@ -4,7 +4,7 @@ import subprocess import sys import time -from waflib import Build, Context, Logs, Options, Utils +from waflib import Configure, Build, Context, Logs, Options, Utils from waflib.TaskGen import feature, before, after global g_is_child @@ -102,6 +102,16 @@ def add_flags(opt, flags): opt.add_option('--' + name, action='store_true', dest=name.replace('-', '_'), help=desc) +class ConfigureContext(Configure.ConfigurationContext): + """configures the project""" + + def __init__(self, **kwargs): + super(ConfigureContext, self).__init__(**kwargs) + + def build_path(self, path='.'): + """Return `path` within the build directory""" + return str(self.path.get_bld().find_node(path)) + def get_check_func(conf, lang): if lang == 'c': return conf.check_cc |