build: check that the user is not using an old /usr/bin/waf
authorAndrew Tridgell <tridge@samba.org>
Wed, 14 Apr 2010 22:55:26 +0000 (08:55 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 14 Apr 2010 22:57:07 +0000 (08:57 +1000)
some systems have /usr/bin/waf installed, and its quite old

buildtools/wafsamba/wafsamba.py

index 386ed3c90f31e1c884f2515e5c44aaaf6e409283..de244e18fe539480cb6550310b5fe63d684c4e53 100644 (file)
@@ -1,7 +1,7 @@
 # a waf tool to add autoconf-like macros to the configure section
 # and for SAMBA_ macros for building libraries, binaries etc
 
-import Build, os, Options, Task, Utils, cc, TaskGen, fnmatch, re, shutil, Logs
+import Build, os, Options, Task, Utils, cc, TaskGen, fnmatch, re, shutil, Logs, Constants
 from Configure import conf
 from Logs import debug
 from samba_utils import SUBST_VARS_RECURSIVE
@@ -35,6 +35,16 @@ LIB_PATH="shared"
 
 os.putenv('PYTHONUNBUFFERED', '1')
 
+
+if Constants.HEXVERSION < 0x105016:
+    Logs.error('''
+Please use the version of waf that comes with Samba, not
+a system installed version. See http://wiki.samba.org/index.php/Waf
+for details
+''')
+    sys.exit(1)
+
+
 @conf
 def SAMBA_BUILD_ENV(conf):
     '''create the samba build environment'''