Patch from Tim Mayberry to fix substitution and install of
[ardour.git] / templates / wscript
1 #!/usr/bin/python
2
3 import os
4
5 top = '.'
6 out = 'build'
7
8 def configure(conf):
9     pass
10
11 def build(bld):
12
13     if bld.is_defined('COREAUDIO_SUPPORT'):
14         subst_dict = {'JACK_INPUT': 'coreaudio:Built-in Audio:in', 'JACK_OUTPUT': 'coreaudio:Built-in Audio:out'}
15     else:
16         subst_dict = {'JACK_INPUT': 'system:playback_','JACK_OUTPUT': 'system:capture_'}
17
18     templates = bld.path.ant_glob('*/*.template.in')
19     for t in templates:
20         dir_name = os.path.basename(t.srcpath()).replace('.template.in', '')
21         file_name = os.path.basename(t.srcpath()).replace('.in', '')
22         obj = bld(features = 'subst',
23                   name = 'template',
24                   source = [ t ],
25                   target = [ os.path.join(dir_name, file_name) ],
26                   install_path = os.path.join(bld.env['DATADIR'], 'ardour3', os.path.join('templates', dir_name)))
27         obj.__dict__.update(subst_dict)
28
29 def options(opt):
30     pass