summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-04-23 08:24:34 +1000
committerAndrew Tridgell <tridge@samba.org>2010-04-23 08:25:01 +1000
commit93c86fe6155bea76818b569bbc883cecc7130dd1 (patch)
tree4d58d5fa281448e014ed9e85ad253d42000bc4ea
parenta36c7b8b74c209b010e763487a750472d9c2e0a1 (diff)
downloadsamba-93c86fe6155bea76818b569bbc883cecc7130dd1.tar.gz
samba-93c86fe6155bea76818b569bbc883cecc7130dd1.tar.bz2
samba-93c86fe6155bea76818b569bbc883cecc7130dd1.zip
build: give a more useful error when the source dir has moved
you need a distclean if you mv the source directory
-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()