From 8dc8d31f4adf84f35bce34339e13e9d70c4b8a66 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 4 Apr 2010 11:40:05 +1000 Subject: s4-waf: fixed finding of buildtools and srcdir --- lib/replace/wscript | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/replace/wscript') diff --git a/lib/replace/wscript b/lib/replace/wscript index db6bc5c450..af70c47a24 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -5,16 +5,16 @@ VERSION = '1.2.1' blddir = 'bin' -import sys, os +import sys, os, Utils # find the buildtools directory -buildtools = 'buildtools ../../buildtools' -for d in buildtools.split(): - if os.path.exists(d): - srcdir = os.path.dirname(d) or '.' - break +buildtools = 'buildtools' +while not os.path.exists(buildtools) and len(buildtools.split('/')) < 5: + buildtools = '../' + buildtools +srcdir = os.path.dirname(buildtools) or '.' + +sys.path.insert(0, buildtools + "/wafsamba") -sys.path.insert(0, srcdir+"/buildtools/wafsamba") import wafsamba, samba_dist import Options, os, preproc -- cgit