From 1af2252bfff1f7e5e8ebd604b7a1f6eeb1f94acf Mon Sep 17 00:00:00 2001 From: Matt Fischer Date: Thu, 3 Sep 2015 15:50:43 -0500 Subject: [PATCH] More QNX build fixes This patch adds a missing case to the tests wscript, to handle the QNX platform. It also adds code to the setup for the various directory macros, to handle the case when the build is taking place on Windows, to ensure that the directory paths still come across in POSIX format. Change-Id: If8054284d390e40c97c8c585af2851e94275aad8 --- tests/wscript | 2 ++ wscript | 13 +++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/tests/wscript b/tests/wscript index 70d48f0f..da7e7b7e 100644 --- a/tests/wscript +++ b/tests/wscript @@ -20,6 +20,8 @@ def build(bld): prog.includes = ['..','../macosx', '../posix', '../common/jack', '../common'] if bld.env['IS_LINUX']: prog.includes = ['..','../linux', '../posix', '../common/jack', '../common'] + if bld.env['IS_QNX']: + prog.includes = ['..','../qnx', '../posix', '../common/jack', '../common'] if bld.env['IS_SUN']: prog.includes = ['..','../solaris', '../posix', '../common/jack', '../common'] prog.source = test_program_sources diff --git a/wscript b/wscript index 476c0c65..0479bdcd 100644 --- a/wscript +++ b/wscript @@ -525,6 +525,15 @@ def configure(conf): else: conf.env['BUILD_JACKD'] = True + path = os.path + if sys.platform == 'win32' and (conf.env['IS_QNX'] or conf.env['IS_LINUX']): + # If we are cross-compiling from Windows to a system with POSIX style filenames, + # we need to construct file paths using posixpath instead of os.path. Also, we + # need fix PREFIX, since Waf constructed it incorrectly + import posixpath + path = posixpath + conf.env['PREFIX'] = os.path.splitdrive(conf.env['PREFIX'])[1].replace('\\', '/') + conf.env['BINDIR'] = conf.env['PREFIX'] + '/bin' if Options.options.htmldir: @@ -581,9 +590,9 @@ def configure(conf): # don't define ADDON_DIR in config.h, use the default 'jack' defined in # windows/JackPlatformPlug_os.h else: - conf.env['ADDON_DIR'] = os.path.normpath(os.path.join(conf.env['LIBDIR'], 'jack')) + conf.env['ADDON_DIR'] = path.normpath(path.join(conf.env['LIBDIR'], 'jack')) conf.define('ADDON_DIR', conf.env['ADDON_DIR']) - conf.define('JACK_LOCATION', os.path.normpath(os.path.join(conf.env['PREFIX'], 'bin'))) + conf.define('JACK_LOCATION', path.normpath(path.join(conf.env['PREFIX'], 'bin'))) if not conf.env['IS_WINDOWS']: conf.define('USE_POSIX_SHM', 1)