13
0

parameterize install target directories based on --program-name configure option

This commit is contained in:
Paul Davis 2014-04-10 10:23:16 -04:00
parent aac77d08a3
commit 2974c87684
2 changed files with 34 additions and 31 deletions

View File

@ -384,7 +384,7 @@ def build(bld):
obj.includes = [ '../libs/fst', '.' ] obj.includes = [ '../libs/fst', '.' ]
obj.linkflags = ['-mwindows', '-Wl,--export-dynamic'] obj.linkflags = ['-mwindows', '-Wl,--export-dynamic']
obj.defines = ['_POSIX_SOURCE', 'USE_WS_PREFIX'] obj.defines = ['_POSIX_SOURCE', 'USE_WS_PREFIX']
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') obj.install_path = bld.env['DLLDIR']
# end of the wine executable # end of the wine executable
# now the shared library containing the GTK GUI for ardour # now the shared library containing the GTK GUI for ardour
@ -425,7 +425,7 @@ def build(bld):
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"', 'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"', 'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
] ]
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') obj.install_path = os.path.join(bld.env['DLLDIR'])
obj.uselib = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD GTK OGG CURL DL' obj.uselib = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD GTK OGG CURL DL'
obj.uselib += ' GTKMM CANVAS FFTW3F' obj.uselib += ' GTKMM CANVAS FFTW3F'
obj.uselib += ' AUDIOUNITS OSX GTKOSX LO ' obj.uselib += ' AUDIOUNITS OSX GTKOSX LO '
@ -479,11 +479,15 @@ def build(bld):
# Wrappers # Wrappers
print 'DLL = ' + bld.env['DLLDIR'], '\n'
print 'DATADIR = ' + bld.env['DATADIR'], '\n'
print 'CONF = ' + bld.env['CONFDIR'], '\n'
wrapper_subst_dict = { wrapper_subst_dict = {
'INSTALL_PREFIX' : bld.env['PREFIX'], 'INSTALL_PREFIX' : bld.env['PREFIX'],
'LIBDIR' : os.path.normpath(bld.env['LIBDIR']), 'LIBDIR' : os.path.normpath(bld.env['DLLDIR']),
'DATADIR' : os.path.normpath(bld.env['DATADIR']), 'DATADIR' : os.path.normpath(bld.env['DATADIR']),
'SYSCONFDIR' : os.path.normpath(bld.env['SYSCONFDIR']), 'SYSCONFDIR' : os.path.normpath(bld.env['CONFDIR']),
'LIBS' : 'build/libs', 'LIBS' : 'build/libs',
'VERSION' : bld.env['VERSION'], 'VERSION' : bld.env['VERSION'],
'EXECUTABLE' : 'build/gtk2_ardour/ardour-' + bld.env['VERSION'] 'EXECUTABLE' : 'build/gtk2_ardour/ardour-' + bld.env['VERSION']
@ -648,14 +652,14 @@ def build(bld):
# find and add all ##include dependencies as sources # find and add all ##include dependencies as sources
obj.source += _doPyp (bld.path.find_resource ('ardour3_ui_dark.rc.in').srcpath(), True) obj.source += _doPyp (bld.path.find_resource ('ardour3_ui_dark.rc.in').srcpath(), True)
obj.target = 'ardour3_ui_dark.rc' obj.target = 'ardour3_ui_dark.rc'
obj.install_path = '${SYSCONFDIR}/ardour3' obj.install_path = bld.env['CONFDIR']
obj = bld (rule = include_processor) obj = bld (rule = include_processor)
obj.source = [ 'ardour3_ui_light.rc.pre' ] obj.source = [ 'ardour3_ui_light.rc.pre' ]
# find and add all ##include dependencies as sources # find and add all ##include dependencies as sources
obj.source += _doPyp (bld.path.find_resource ('ardour3_ui_light.rc.in').srcpath(), True) obj.source += _doPyp (bld.path.find_resource ('ardour3_ui_light.rc.in').srcpath(), True)
obj.target = 'ardour3_ui_light.rc' obj.target = 'ardour3_ui_light.rc'
obj.install_path = '${SYSCONFDIR}/ardour3' obj.install_path = bld.env['CONFDIR']
# Menus # Menus
menus_argv = [] menus_argv = []
@ -675,19 +679,7 @@ def build(bld):
obj.dep_vars = ['GTKOSX'] obj.dep_vars = ['GTKOSX']
obj.stdin = program + '.menus.in' obj.stdin = program + '.menus.in'
obj.stdout = program + '.menus' obj.stdout = program + '.menus'
bld.install_files(os.path.join(bld.env['SYSCONFDIR'], 'ardour3'), bld.install_files (bld.env['CONFDIR'], program + '.menus')
program + '.menus')
obj = bld(features = 'command-output')
obj.command = 'cpp'
obj.command_is_external = True
obj.no_inputs = True
obj.argv = menus_argv
obj.dep_vars = ['GTKOSX']
obj.stdin = 'ardour.menus.in'
obj.stdout = 'ardour.menus'
bld.install_files(os.path.join(bld.env['SYSCONFDIR'], 'ardour3'),
'ardour.menus')
# Keybindings # Keybindings
@ -704,26 +696,24 @@ def build(bld):
source = b + '.bindings.in', source = b + '.bindings.in',
rule = a_rule rule = a_rule
) )
obj.install_path = os.path.join(bld.env['SYSCONFDIR'], 'ardour3') obj.install_path = os.path.join(bld.env['CONFDIR'])
# not modified at present # not modified at present
bld.install_files(os.path.join(bld.env['SYSCONFDIR'], 'ardour3'), bld.install_files(bld.env['CONFDIR'], 'step_editing.bindings')
'step_editing.bindings') bld.install_files(bld.env['CONFDIR'], 'mixer.bindings')
bld.install_files(os.path.join(bld.env['SYSCONFDIR'], 'ardour3'),
'mixer.bindings')
# Icons/Images # Icons/Images
bld.install_files('${DATADIR}/ardour3/icons', bld.path.ant_glob('icons/*.png')) bld.install_files(os.path.join (bld.env['DATADIR'], 'icons'), bld.path.ant_glob('icons/*.png'))
bld.install_files('${DATADIR}/ardour3/pixmaps', bld.path.ant_glob('pixmaps/*.xpm')) bld.install_files(os.path.join (bld.env['DATADIR'], 'pixmaps'), bld.path.ant_glob('pixmaps/*.xpm'))
bld.install_files('${DATADIR}/ardour3', 'splash.png') bld.install_files(bld.env['DATADIR'], 'splash.png')
bld.install_files('${DATADIR}/ardour3', 'small-splash.png') bld.install_files(bld.env['DATADIR'], 'small-splash.png')
bld.install_files('${DATADIR}/ardour3', 'ArdourMono.ttf') bld.install_files(bld.env['DATADIR'], 'ArdourMono.ttf')
# Default UI configuration # Default UI configuration
bld.install_files('${SYSCONFDIR}/ardour3', 'ardour3_ui_default.conf') bld.install_files(bld.env['CONFDIR'], 'ardour3_ui_default.conf')
# Default export stuff # Default export stuff
bld.install_files('${SYSCONFDIR}/ardour3/export', bld.path.ant_glob('export/*.format')) bld.install_files(os.path.join(bld.env['CONFDIR'],' export'), bld.path.ant_glob('export/*.format'))
# i18n # i18n
if bld.is_defined('ENABLE_NLS'): if bld.is_defined('ENABLE_NLS'):

13
wscript
View File

@ -864,6 +864,19 @@ def build(bld):
bld.path.find_dir ('libs/ardour/ardour') bld.path.find_dir ('libs/ardour/ardour')
bld.path.find_dir ('libs/pbd/pbd') bld.path.find_dir ('libs/pbd/pbd')
# set up target directories
lwrcase_dirname = 'ardour3'
if bld.is_defined ('TRX_BUILD'):
lwrcase_dirname = 'trx'
# configuration files go here
bld.env['CONFDIR'] = os.path.join(bld.env['SYSCONFDIR'], lwrcase_dirname)
# data files loaded at run time go here
bld.env['DATADIR'] = os.path.join(bld.env['DATADIR'], lwrcase_dirname)
# shared objects loaded at runtime go here
bld.env['DLLDIR'] = os.path.join(bld.env['LIBDIR'], lwrcase_dirname)
autowaf.set_recursive() autowaf.set_recursive()
if sys.platform == 'darwin': if sys.platform == 'darwin':