2011-01-01 11:59:38 -05:00
|
|
|
#!/usr/bin/python
|
|
|
|
|
|
|
|
import os
|
|
|
|
|
2011-09-29 15:17:54 -04:00
|
|
|
top = '.'
|
|
|
|
out = 'build'
|
2011-01-01 11:59:38 -05:00
|
|
|
|
2011-01-01 12:13:32 -05:00
|
|
|
def configure(conf):
|
|
|
|
pass
|
|
|
|
|
2011-01-01 11:59:38 -05:00
|
|
|
def build(bld):
|
2011-04-22 18:15:21 -04:00
|
|
|
|
2011-01-01 11:59:38 -05:00
|
|
|
subst_dict = {}
|
2011-10-18 11:08:42 -04:00
|
|
|
if bld.is_defined('COREAUDIO_SUPPORT'):
|
2011-01-01 11:59:38 -05:00
|
|
|
subst_dict['%JACK_INPUT%'] = 'coreaudio:Built-in Audio:in'
|
|
|
|
subst_dict['%JACK_OUTPUT%'] = 'coreaudio:Built-in Audio:out'
|
|
|
|
else:
|
|
|
|
subst_dict['%JACK_INPUT%'] = 'alsa_pcm:playback_'
|
|
|
|
subst_dict['%JACK_OUTPUT%'] = 'alsa_pcm:capture_'
|
|
|
|
|
2011-09-29 15:17:54 -04:00
|
|
|
templates = bld.path.ant_glob('*.template.in')
|
2011-01-01 11:59:38 -05:00
|
|
|
for t in templates:
|
2011-09-29 15:17:54 -04:00
|
|
|
obj = bld(features = 'subst')
|
2011-12-20 19:55:57 -05:00
|
|
|
obj.name = 'template'
|
2011-09-29 15:17:54 -04:00
|
|
|
obj.source = [ t ]
|
2011-12-11 15:38:42 -05:00
|
|
|
dir_name = os.path.basename(t.srcpath()).replace('.template.in', '')
|
|
|
|
file_name = os.path.basename(t.srcpath()).replace('.in', '')
|
|
|
|
obj.target = [ os.path.join(dir_name, file_name) ]
|
2011-01-01 11:59:38 -05:00
|
|
|
obj.dict = subst_dict
|
2011-12-11 15:38:42 -05:00
|
|
|
obj.install_path = os.path.join(bld.env['DATADIR'], 'ardour3', os.path.join('templates', dir_name))
|
2011-01-01 11:59:38 -05:00
|
|
|
|
2011-09-29 15:17:54 -04:00
|
|
|
def options(opt):
|
2011-01-01 11:59:38 -05:00
|
|
|
pass
|