From 4566ffe2283db16a46d2d0ff438647e7eb20ec7e Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 29 Oct 2003 11:18:47 +0000 Subject: [PATCH] Allow BoostBuild.py to find bjam both in parent directory (for releases) and in parent's parent directory (for CVS testing). [SVN r20540] --- v2/test/BoostBuild.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/v2/test/BoostBuild.py b/v2/test/BoostBuild.py index 81f8ceaf4..829eabdb9 100644 --- a/v2/test/BoostBuild.py +++ b/v2/test/BoostBuild.py @@ -102,13 +102,25 @@ class Tester(TestCmd.TestCmd): program_list = [] + # Find there jam_src is located. # try for the debug version if it's lying around - if os.path.exists( - os.path.join('../..', 'jam_src', jam_build_dir + '.debug') - ): - jam_build_dir += '.debug' + + dirs = [os.path.join('../../jam_src', jam_build_dir + '.debug'), + os.path.join('../../jam_src', jam_build_dir), + os.path.join('../jam_src', jam_build_dir + '.debug'), + os.path.join('../jam_src', jam_build_dir), + ] + + for d in dirs: + if os.path.exists(d): + jam_build_dir = d + break + else: + print "Cannot find built Boost.Jam" + exit(1) + - program_list.append(os.path.join('../..', 'jam_src', jam_build_dir, executable)) + program_list.append(os.path.join(jam_build_dir, executable)) program_list.append('-sBOOST_BUILD_PATH=' + boost_build_path) if verbosity: program_list += verbosity