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
84 lines
2.7 KiB
Python
84 lines
2.7 KiB
Python
#!/usr/bin/env python
|
|
from waflib.extras import autowaf as autowaf
|
|
import waflib.Utils as Utils
|
|
import os
|
|
import sys
|
|
|
|
top = '.'
|
|
out = 'build'
|
|
|
|
def options(opt):
|
|
autowaf.set_options(opt)
|
|
|
|
def configure(conf):
|
|
conf.load('misc')
|
|
conf.check_cc(
|
|
header_name='stdio.h readline/readline.h',
|
|
lib='readline',
|
|
uselib_store='READLINE',
|
|
define_name='HAVE_READLINE',
|
|
mandatory=False)
|
|
|
|
def build(bld):
|
|
VERSION = "%s.%s" % (bld.env['MAJOR'], bld.env['MINOR'])
|
|
if not bld.is_defined('HAVE_READLINE'):
|
|
return
|
|
|
|
# commandline luasession wrapper script
|
|
if bld.env['build_target'] != 'mingw':
|
|
obj = bld(features = 'subst')
|
|
obj.source = 'ardour-lua.sh.in'
|
|
obj.target = 'ardour' + str (bld.env['MAJOR']) + '-lua'
|
|
obj.chmod = Utils.O755
|
|
obj.install_path = bld.env['BINDIR']
|
|
obj.LIBDIR = os.path.normpath(bld.env['DLLDIR'])
|
|
obj.DATADIR = os.path.normpath(bld.env['DATADIR'])
|
|
obj.CONFDIR = os.path.normpath(bld.env['CONFDIR'])
|
|
|
|
# commandline luasession
|
|
obj = bld (features = 'cxx c cxxprogram')
|
|
obj.source = 'luasession.cc'
|
|
obj.target = 'luasession'
|
|
obj.includes = ['../libs']
|
|
obj.use = ['liblua',
|
|
'libpbd',
|
|
'libardour',
|
|
'libardour_cp',
|
|
'libtemporal',
|
|
'libmidipp',
|
|
]
|
|
obj.defines = [
|
|
'VERSIONSTRING="' + str(bld.env['VERSION']) + '"',
|
|
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
|
|
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
|
|
'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
|
|
'PACKAGE="' + "ARDOURUTILS" + '"',
|
|
]
|
|
|
|
obj.uselib = 'UUID FLAC FONTCONFIG GLIBMM GIOMM GTHREAD OGG CURL DL XML'
|
|
obj.uselib += ' AUDIOUNITS OSX LO '
|
|
obj.uselib += ' READLINE '
|
|
obj.uselib += ' FFTW3F LO TAGLIB LILV RUBBERBAND AUBIO LRDF ARCHIVE VAMPSDK VAMPHOSTSDK'
|
|
|
|
if bld.is_defined('HAVE_SUIL'):
|
|
obj.uselib += ' SUIL'
|
|
|
|
if bld.is_defined('HAVE_USB'):
|
|
obj.uselib += ' USB'
|
|
|
|
if sys.platform == 'darwin':
|
|
obj.uselib += ' AUDIOUNITS OSX'
|
|
obj.use += ' libappleutility'
|
|
|
|
if bld.env['build_target'] == 'mingw':
|
|
obj.linkflags = ['-mwindows']
|
|
|
|
if bld.is_defined('NEED_INTL'):
|
|
obj.linkflags = ' -lintl'
|
|
|
|
if bld.env['build_target'] == 'mingw':
|
|
obj.install_path = bld.env['BINDIR']
|
|
obj.target = 'ardour' + str (bld.env['MAJOR']) + '-lua'
|
|
else:
|
|
obj.install_path = bld.env['DLLDIR']
|