From e1bd9401d562732c0d89c401515d08208afab48c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 6 May 2015 13:15:09 -0400 Subject: [PATCH] add clean and nice check for Tracks builds --- libs/gtkmm2ext/wscript | 2 +- libs/panners/wscript | 4 ++-- wscript | 8 ++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/libs/gtkmm2ext/wscript b/libs/gtkmm2ext/wscript index 9d7eee0f96..3706014c0d 100644 --- a/libs/gtkmm2ext/wscript +++ b/libs/gtkmm2ext/wscript @@ -86,7 +86,7 @@ def configure(conf): def build(bld): sources = gtkmm2ext_sources - if bld.env['PROGRAM_NAME'] == 'TracksLive': + if bld.is_tracks_build(): sources += [ 'waves_fastmeter.cc' ] else: sources += [ 'fastmeter.cc' ] diff --git a/libs/panners/wscript b/libs/panners/wscript index 927b7ad0f9..3d66662146 100644 --- a/libs/panners/wscript +++ b/libs/panners/wscript @@ -20,7 +20,7 @@ def configure(conf): autowaf.set_recursive() autowaf.configure(conf) - if conf.env['PROGRAM_NAME'] == 'TracksLive': + if bld.is_tracks_build(): panners = [ '1in2out', 'vbap', 'stereobalance' ] else: panners = [ '2in2out', '1in2out', 'vbap', 'stereobalance' ] @@ -29,7 +29,7 @@ def configure(conf): sub_config_and_use(conf, i) def build(bld): - if bld.env['PROGRAM_NAME'] == 'TracksLive': + if bld.is_tracks_build(): panners = [ '1in2out', 'vbap', 'stereobalance' ] else: panners = [ '2in2out', '1in2out', 'vbap', 'stereobalance' ] diff --git a/wscript b/wscript index fe80117e2e..7b2ec9dbfb 100644 --- a/wscript +++ b/wscript @@ -26,6 +26,10 @@ class i18n_mo(BuildContext): cmd = 'i18n_mo' fun = 'i18n_mo' +def is_tracks_build(self, *k, **kw): + return self.env['PROGRAM_NAME'] == 'Tracks Live' + +BuildContext.is_tracks_build = is_tracks_build compiler_flags_dictionaries= { 'gcc' : { @@ -557,6 +561,7 @@ int main() { return 0; }''', compiler_flags.append ('-DPROGRAM_NAME="' + Options.options.program_name + '"') compiler_flags.append ('-DPROGRAM_VERSION="' + PROGRAM_VERSION + '"') + conf.env['PROGRAM_NAME'] = Options.options.program_name if opt.debug: @@ -576,6 +581,9 @@ int main() { return 0; }''', conf.env.append_value('CXXFLAGS', cxx_flags) conf.env.append_value('LINKFLAGS', linker_flags) +def is_tracks_build (conf): + return conf.env['PROGRAM_NAME'] == 'Tracks Live' + #---------------------------------------------------------------- # Waf stages