7737c17d52
Done with ad hoc scripting hacks processing unused imports found by pyflakes: for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Logs.* but unused' | cut -d: -f1 | while read f; do sed -i 's/^import waflib.Logs as Logs,/import/g' $f; done for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Options.* but unused' | cut -d: -f1 | while read f; do sed -i 's/import waflib.Options as Options, /import /g' $f; done for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Options.* but unused' | cut -d: -f1 | while read f; do sed -i 's/^from waflib import Options,/from waflib import/g' $f; done for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep ' imported but unused$' | sed "s/^\([^:]*\):[0-9]*:[0-9]* '\(.*\)'.*/\1 \2/g" | while read f lib; do sed -i "/^import $lib$/d" $f; done for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Options.* but unused' | cut -d: -f1 | while read f; do sed -i '/from waflib import Options$/d' $f; done for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.TaskGen.* but unused' | cut -d: -f1 | while read f; do sed -i '/from waflib import TaskGen$/d' $f; done for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Task.Task.* but unused' | cut -d: -f1 | while read f; do sed -i '/^from waflib.Task import Task$/d' $f; done for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Tools.winres.* but unused' | cut -d: -f1 | while read f; do sed -i '/^from waflib.Tools import winres$/d' $f; done for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Utils.* but unused' | cut -d: -f1 | while read f; do sed -i '/^import waflib.Utils as Utils$/d' $f; done
44 lines
1.2 KiB
Python
44 lines
1.2 KiB
Python
#!/usr/bin/env python
|
|
import waflib.Utils as Utils
|
|
import os
|
|
|
|
# Mandatory variables
|
|
top = '.'
|
|
out = 'build'
|
|
|
|
def options(ctx):
|
|
pass
|
|
|
|
def configure(ctx):
|
|
pass
|
|
|
|
def build(bld):
|
|
obj = bld (features = 'cxx c cxxprogram')
|
|
obj.install_path = None
|
|
obj.source = [ 'bb.cc', 'gui.cc', 'misc.cc' ]
|
|
obj.target = 'bb'
|
|
obj.includes = ['.', '../libs']
|
|
obj.use = [ 'libardour', 'libevoral', ]
|
|
obj.uselib = 'JACK GTKMM XML'
|
|
|
|
wrapper_subst_dict = {
|
|
'INSTALL_PREFIX' : bld.env['PREFIX'],
|
|
'LIBDIR' : os.path.normpath(bld.env['DLLDIR']),
|
|
'DATADIR' : os.path.normpath(bld.env['DATADIR']),
|
|
'CONFDIR' : os.path.normpath(bld.env['CONFDIR']),
|
|
'LIBS' : 'build/libs',
|
|
'VERSION' : str (bld.env['VERSION']),
|
|
'EXECUTABLE' : 'build/tools/bb/bb'
|
|
}
|
|
|
|
def set_subst_dict(obj, dict):
|
|
for i in dict:
|
|
setattr(obj, i, dict[i])
|
|
|
|
obj = bld (features = 'subst')
|
|
obj.source = '../../gtk2_ardour/ardev_common.sh.in'
|
|
obj.target = 'bbdev_common_waf.sh'
|
|
obj.chmod = Utils.O755
|
|
obj.dict = wrapper_subst_dict
|
|
set_subst_dict(obj, wrapper_subst_dict)
|