From: stevenknight Date: Thu, 7 Mar 2002 23:18:02 +0000 (+0000) Subject: Fix RANLIB tests for systems that don't have ranlib. (Charles Crain.) X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bc3686528fbb200f9694a42f6a26287a6bd3312b;p=scons.git Fix RANLIB tests for systems that don't have ranlib. (Charles Crain.) git-svn-id: http://scons.tigris.org/svn/scons/trunk@286 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/test/RANLIB.py b/test/RANLIB.py index 2e151cd0..d255b7ab 100644 --- a/test/RANLIB.py +++ b/test/RANLIB.py @@ -25,6 +25,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import os +import os.path import string import sys import TestSCons @@ -36,8 +37,17 @@ if sys.platform == 'win32': else: _exe = '' +ranlib = None +for dir in string.split(os.environ['PATH'], os.pathsep): + r = os.path.join(dir, 'ranlib' + _exe) + if os.path.exists(r): + ranlib = r + break + test = TestSCons.TestSCons() +test.no_result(not ranlib) + test.write("wrapper.py", """import os import string diff --git a/test/RANLIBFLAGS.py b/test/RANLIBFLAGS.py index 1855af22..5549e941 100644 --- a/test/RANLIBFLAGS.py +++ b/test/RANLIBFLAGS.py @@ -36,8 +36,17 @@ if sys.platform == 'win32': else: _exe = '' +ranlib = None +for dir in string.split(os.environ['PATH'], os.pathsep): + r = os.path.join(dir, 'ranlib' + _exe) + if os.path.exists(r): + ranlib = r + break + test = TestSCons.TestSCons() +test.no_result(not ranlib) + test.write("wrapper.py", """import os import string