s3-waf: make version and build directory conditional
authorAndrew Tridgell <tridge@samba.org>
Mon, 21 Feb 2011 00:10:35 +0000 (11:10 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 22 Feb 2011 01:51:09 +0000 (02:51 +0100)
we don't need these when doing a toplevel build

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source3/wscript_build

index c7bc36182175baf835e4f80f089b697fee0590e6..94bebb7490631128e2ab83e718bfe18dc41719fd 100644 (file)
@@ -686,12 +686,13 @@ t.env.BUILDDIR = bld.path.abspath()
 
 bld.SETUP_BUILD_GROUPS()
 
-samba_version.load_version(bld.env)
-
-bld.SAMBA_MKVERSION('include/version.h')
+if not bld.env.toplevel_build:
+    # when using a toplevel build, these are already supplied
+    samba_version.load_version(bld.env)
+    bld.SAMBA_MKVERSION('include/version.h')
+    bld.RECURSE('../lib/replace')
+    bld.RECURSE('build')
 
-bld.RECURSE('../lib/replace')
-bld.RECURSE('build')
 
 ######################## SUBSYSTEMS #################################