summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildtools/wafsamba/wscript6
1 files changed, 6 insertions, 0 deletions
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index 4b388cc267..54802a7562 100644
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -275,6 +275,12 @@ def configure(conf):
def build(bld):
+ # give a more useful message if the source directory has moved
+ relpath = os_path_relpath(bld.curdir, bld.srcnode.abspath())
+ if relpath.find('../') != -1:
+ Logs.error('bld.curdir %s is not a child of %s' % (bld.curdir, bld.srcnode.abspath()))
+ raise Utils.WafError('''The top source directory has moved. Please run distclean and reconfigure''')
+
bld.CHECK_MAKEFLAGS()
bld.SETUP_BUILD_GROUPS()
bld.ENFORCE_GROUP_ORDERING()