summaryrefslogtreecommitdiff
path: root/source3/wscript
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-02-21 12:14:38 +1100
committerAndrew Tridgell <tridge@samba.org>2011-02-22 02:51:09 +0100
commit76e3af95c3efe1fe93e4aaf4555eae9e518dd70a (patch)
treee3aa78ea81a0fc683c7446f8704875a63535ea50 /source3/wscript
parentff8762e7fe006c7c79e0976b4cd331ef187f6481 (diff)
downloadsamba-76e3af95c3efe1fe93e4aaf4555eae9e518dd70a.tar.gz
samba-76e3af95c3efe1fe93e4aaf4555eae9e518dd70a.tar.bz2
samba-76e3af95c3efe1fe93e4aaf4555eae9e518dd70a.zip
s3-waf: make pieces of the source3 waf wscript depends on toplevel_build
this will allow the toplevel build to use source3/wscript for configure options Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/wscript')
-rw-r--r--source3/wscript77
1 files changed, 40 insertions, 37 deletions
diff --git a/source3/wscript b/source3/wscript
index 9e5a8dec41..7567ea4c50 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -9,21 +9,23 @@ VERSION=None
import sys, os
from optparse import SUPPRESS_HELP
sys.path.insert(0, srcdir+"/buildtools/wafsamba")
-import wafsamba, Options
+sys.path.insert(0, "source3")
+import wafsamba, Options, Logs, Utils
import build.charset
import samba_utils, samba_version
import samba3
def set_options(opt):
- opt.BUILTIN_DEFAULT('NONE')
- opt.PRIVATE_EXTENSION_DEFAULT('s3')
- opt.RECURSE('../lib/replace')
- opt.RECURSE('build')
- opt.RECURSE('selftest')
- opt.RECURSE('../lib/nss_wrapper')
- opt.RECURSE('../lib/socket_wrapper')
- opt.RECURSE('../lib/tevent')
- opt.RECURSE('../lib/tdb')
+ if not os.getenv('TOPLEVEL_BUILD'):
+ opt.BUILTIN_DEFAULT('NONE')
+ opt.PRIVATE_EXTENSION_DEFAULT('s3')
+ opt.RECURSE('../lib/replace')
+ opt.RECURSE('build')
+ opt.RECURSE('selftest')
+ opt.RECURSE('../lib/nss_wrapper')
+ opt.RECURSE('../lib/socket_wrapper')
+ opt.RECURSE('../lib/tevent')
+ opt.RECURSE('../lib/tdb')
opt.add_option('--with-static-modules',
help=("Comma-separated list of names of modules to statically link in"),
@@ -61,40 +63,41 @@ def set_options(opt):
def configure(conf):
from samba_utils import TO_LIST
- version = samba_version.load_version(env=conf.env)
-
- conf.DEFINE('CONFIG_H_IS_FROM_SAMBA', 1)
- conf.DEFINE('_SAMBA_BUILD_', version.MAJOR, add_to_cflags=True)
- conf.DEFINE('HAVE_CONFIG_H', 1, add_to_cflags=True)
+ if not conf.env.toplevel_build:
+ version = samba_version.load_version(env=conf.env)
+ conf.DEFINE('CONFIG_H_IS_FROM_SAMBA', 1)
+ conf.DEFINE('_SAMBA_BUILD_', version.MAJOR, add_to_cflags=True)
+ conf.DEFINE('HAVE_CONFIG_H', 1, add_to_cflags=True)
if Options.options.developer:
conf.ADD_CFLAGS('-DDEVELOPER -DDEBUG_PASSWORD')
- conf.env['developer'] = True
+ conf.env.developer = True
if Options.options.with_swat:
conf.env['build_swat'] = True
- conf.RECURSE('../lib/replace')
- conf.RECURSE('build')
- conf.RECURSE('../lib/tdb')
- conf.RECURSE('../lib/talloc')
- conf.RECURSE('../lib/tevent')
- conf.RECURSE('../lib/popt')
- conf.RECURSE('../lib/nss_wrapper')
- conf.RECURSE('../lib/socket_wrapper')
- conf.RECURSE('../lib/zlib')
- conf.RECURSE('../libcli/smbreadline')
- conf.RECURSE('../lib/util')
-
- conf.ADD_EXTRA_INCLUDES('''#source3 #source3/include #lib/replace''')
- if not conf.env.USING_SYSTEM_TDB:
- conf.ADD_EXTRA_INCLUDES('#lib/tdb/include')
- if not conf.env.USING_SYSTEM_TEVENT:
- conf.ADD_EXTRA_INCLUDES('#lib/tevent')
- if not conf.env.USING_SYSTEM_TALLOC:
- conf.ADD_EXTRA_INCLUDES('#lib/talloc')
- if not conf.env.USING_SYSTEM_POPT:
- conf.ADD_EXTRA_INCLUDES('#lib/popt')
+ if not conf.env.toplevel_build:
+ conf.RECURSE('../lib/replace')
+ conf.RECURSE('build')
+ conf.RECURSE('../lib/tdb')
+ conf.RECURSE('../lib/talloc')
+ conf.RECURSE('../lib/tevent')
+ conf.RECURSE('../lib/popt')
+ conf.RECURSE('../lib/nss_wrapper')
+ conf.RECURSE('../lib/socket_wrapper')
+ conf.RECURSE('../lib/zlib')
+ conf.RECURSE('../libcli/smbreadline')
+ conf.RECURSE('../lib/util')
+
+ conf.ADD_EXTRA_INCLUDES('''#source3 #source3/include #lib/replace''')
+ if not conf.env.USING_SYSTEM_TDB:
+ conf.ADD_EXTRA_INCLUDES('#lib/tdb/include')
+ if not conf.env.USING_SYSTEM_TEVENT:
+ conf.ADD_EXTRA_INCLUDES('#lib/tevent')
+ if not conf.env.USING_SYSTEM_TALLOC:
+ conf.ADD_EXTRA_INCLUDES('#lib/talloc')
+ if not conf.env.USING_SYSTEM_POPT:
+ conf.ADD_EXTRA_INCLUDES('#lib/popt')
conf.ADD_LDFLAGS("-Wl,--export-dynamic", testflags=True)