summaryrefslogtreecommitdiff
path: root/indra/cmake/run_build_test.py
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2010-10-08 10:47:25 -0400
committerOz Linden <oz@lindenlab.com>2010-10-08 10:47:25 -0400
commitbb74487c859acccb8f88002630606419761136e4 (patch)
treeeadeabd044a9fa06c789b957d9b2c823c47617dd /indra/cmake/run_build_test.py
parent970ce1e1626c205302c4085610819571c1ce79f4 (diff)
parentd25a30e55b7e6a20173c3a53891489adc5610d72 (diff)
Merge fixes for VWR-23047, VWR-20911, and SNOW-748
Diffstat (limited to 'indra/cmake/run_build_test.py')
-rw-r--r--indra/cmake/run_build_test.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/cmake/run_build_test.py b/indra/cmake/run_build_test.py
index 104585c195..e377aeef48 100644
--- a/indra/cmake/run_build_test.py
+++ b/indra/cmake/run_build_test.py
@@ -82,10 +82,24 @@ def main(command, libpath=[], vars={}):
dirs = os.environ.get(var, "").split(os.pathsep)
# Append the sequence in libpath
print "%s += %r" % (var, libpath)
- dirs.extend(libpath)
+ for dir in libpath:
+ # append system paths at the end
+ if dir in ('/lib', '/usr/lib'):
+ dirs.append(dir)
+ # prepend non-system paths
+ else:
+ dirs.insert(0, dir)
+
+ # Filter out some useless pieces
+ clean_dirs = []
+ for dir in dirs:
+ if dir and dir not in ('', '.'):
+ clean_dirs.append(dir)
+
# Now rebuild the path string. This way we use a minimum of separators
# -- and we avoid adding a pointless separator when libpath is empty.
- os.environ[var] = os.pathsep.join(dirs)
+ os.environ[var] = os.pathsep.join(clean_dirs)
+ print "%s = %r" % (var, os.environ[var])
# Now handle arbitrary environment variables. The tricky part is ensuring
# that all the keys and values we try to pass are actually strings.
if vars: