diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-09-01 12:45:38 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-10-07 17:42:03 +1100 |
commit | 055f017b3693af95864f6595cf4ead041c389c52 (patch) | |
tree | 9e59e56dc7dc3345722bf678027db66a75eb1062 | |
parent | 83f0dc44a70ed7e49bcee3718ff17b2063b2a01e (diff) | |
download | samba-055f017b3693af95864f6595cf4ead041c389c52.tar.gz samba-055f017b3693af95864f6595cf4ead041c389c52.tar.bz2 samba-055f017b3693af95864f6595cf4ead041c389c52.zip |
build: Reduce build systems to just top level waf and autoconf
The s3-waf build system is a key component of the top level build, but
with this commit is is no longer available directly. This reduces the
number of build system combinations in master as we prepare for the
Samba 4.0 release.
Andrew Bartlett
-rw-r--r-- | buildtools/wafsamba/samba3.py | 2 | ||||
-rw-r--r-- | buildtools/wafsamba/samba_autoconf.py | 3 | ||||
-rwxr-xr-x | dynconfig/wscript | 2 | ||||
-rwxr-xr-x | lib/util/wscript_build | 13 | ||||
-rw-r--r-- | libcli/nbt/wscript_build | 31 | ||||
-rw-r--r-- | libcli/security/wscript_build | 11 | ||||
-rwxr-xr-x | source3/autogen-waf.sh | 27 | ||||
-rw-r--r-- | source3/passdb/wscript_build | 13 | ||||
-rw-r--r-- | source3/selftest/wscript | 203 | ||||
-rw-r--r-- | source3/wscript | 98 | ||||
-rwxr-xr-x | source3/wscript_build | 86 | ||||
-rwxr-xr-x | wscript | 3 | ||||
-rw-r--r-- | wscript_build | 4 |
13 files changed, 49 insertions, 447 deletions
diff --git a/buildtools/wafsamba/samba3.py b/buildtools/wafsamba/samba3.py index b2a3655d13..1426029839 100644 --- a/buildtools/wafsamba/samba3.py +++ b/buildtools/wafsamba/samba3.py @@ -52,7 +52,7 @@ def s3_fix_kwargs(bld, kwargs): # the extra_includes list is relative to the source3 directory extra_includes = [ '.', 'include', 'lib', '../lib/tdb_compat' ] - if bld.env.use_intree_heimdal: + if not bld.CONFIG_SET("USING_SYSTEM_KRB5"): extra_includes += [ '../source4/heimdal/lib/com_err', '../source4/heimdal/lib/gssapi', '../source4/heimdal_build' ] diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py index 207d7320b9..909e836fdb 100644 --- a/buildtools/wafsamba/samba_autoconf.py +++ b/buildtools/wafsamba/samba_autoconf.py @@ -599,8 +599,7 @@ def SAMBA_CONFIG_H(conf, path=None): # we add these here to ensure that -Wstrict-prototypes is not set during configure conf.ADD_CFLAGS('-Wall -g -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -Werror-implicit-function-declaration -Wformat=2 -Wno-format-y2k -Wmissing-prototypes -fno-common', testflags=True) - if os.getenv('TOPLEVEL_BUILD'): - conf.ADD_CFLAGS('-Wcast-qual', testflags=True) + conf.ADD_CFLAGS('-Wcast-qual', testflags=True) conf.env.DEVELOPER_MODE = True if Options.options.picky_developer: diff --git a/dynconfig/wscript b/dynconfig/wscript index e9815e0376..28f6e8dfc7 100755 --- a/dynconfig/wscript +++ b/dynconfig/wscript @@ -357,8 +357,6 @@ Build.BuildContext.dynconfig_cflags = dynconfig_cflags def build(bld): cflags = bld.dynconfig_cflags() version_header = 'version.h' - if not os.getenv('TOPLEVEL_BUILD'): - version_header = 'include/version.h' bld.SAMBA_SUBSYSTEM('DYNCONFIG', 'dynconfig.c', deps='replace talloc', diff --git a/lib/util/wscript_build b/lib/util/wscript_build index f4bd885231..8b4901a7de 100755 --- a/lib/util/wscript_build +++ b/lib/util/wscript_build @@ -65,13 +65,12 @@ bld.SAMBA_LIBRARY('tevent-util', ) -if bld.env._SAMBA_BUILD_ == 4: - bld.SAMBA_SUBSYSTEM('util_ldb', - source='util_ldb.c', - local_include=False, - public_deps='ldb', - public_headers='util_ldb.h' - ) +bld.SAMBA_SUBSYSTEM('util_ldb', + source='util_ldb.c', + local_include=False, + public_deps='ldb', + public_headers='util_ldb.h' + ) bld.SAMBA_SUBSYSTEM('UTIL_RUNCMD', diff --git a/libcli/nbt/wscript_build b/libcli/nbt/wscript_build index 2c70a1d775..b531dba469 100644 --- a/libcli/nbt/wscript_build +++ b/libcli/nbt/wscript_build @@ -11,22 +11,21 @@ bld.SAMBA_SUBSYSTEM('lmhosts', deps='replace talloc' ) -if bld.env._SAMBA_BUILD_ == 4: - bld.SAMBA_LIBRARY('cli-nbt', - source='nbtsocket.c namequery.c nameregister.c namerefresh.c namerelease.c', - public_deps='ndr NDR_NBT tevent tevent-util NDR_SECURITY samba_socket samba-util lmhosts', - private_library=True - ) +bld.SAMBA_LIBRARY('cli-nbt', + source='nbtsocket.c namequery.c nameregister.c namerefresh.c namerelease.c', + public_deps='ndr NDR_NBT tevent tevent-util NDR_SECURITY samba_socket samba-util lmhosts', + private_library=True + ) - bld.SAMBA_BINARY('nmblookup', - source='tools/nmblookup.c', - manpages='man/nmblookup.1', - deps='samba-hostconfig samba-util cli-nbt popt POPT_SAMBA netif LIBCLI_RESOLVE' - ) +bld.SAMBA_BINARY('nmblookup', + source='tools/nmblookup.c', + manpages='man/nmblookup.1', + deps='samba-hostconfig samba-util cli-nbt popt POPT_SAMBA netif LIBCLI_RESOLVE' + ) - bld.SAMBA_PYTHON('python_netbios', - source='pynbt.c', - public_deps='cli-nbt DYNCONFIG samba-hostconfig', - realname='samba/netbios.so' - ) +bld.SAMBA_PYTHON('python_netbios', + source='pynbt.c', + public_deps='cli-nbt DYNCONFIG samba-hostconfig', + realname='samba/netbios.so' + ) diff --git a/libcli/security/wscript_build b/libcli/security/wscript_build index 940ee700f2..f3b654e983 100644 --- a/libcli/security/wscript_build +++ b/libcli/security/wscript_build @@ -7,9 +7,8 @@ bld.SAMBA_LIBRARY('security', deps='talloc ndr NDR_SECURITY' ) -if getattr(bld.env, '_SAMBA_BUILD_', 0) == 4: - bld.SAMBA_PYTHON('pysecurity', - source='pysecurity.c', - deps='security pytalloc-util', - realname='samba/security.so' - ) +bld.SAMBA_PYTHON('pysecurity', + source='pysecurity.c', + deps='security pytalloc-util', + realname='samba/security.so' + ) diff --git a/source3/autogen-waf.sh b/source3/autogen-waf.sh deleted file mode 100755 index 432b523f02..0000000000 --- a/source3/autogen-waf.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -p=`dirname $0` - -echo "Setting up for waf build" - -echo "Looking for the buildtools directory" - -d="buildtools" -while test \! -d "$p/$d"; do d="../$d"; done - -echo "Found buildtools in $p/$d" - -echo "Setting up configure" -rm -f $p/configure $p/include/config*.h* -sed "s|BUILDTOOLS|$d|g;s|BUILDPATH|$p|g" < "$p/$d/scripts/configure.waf" > $p/configure -chmod +x $p/configure - -echo "Setting up Makefile" -rm -f $p/makefile $p/Makefile -sed "s|BUILDTOOLS|$d|g" < "$p/$d/scripts/Makefile.waf" > $p/Makefile - -echo "done. Now run $p/configure or $p/configure.developer then make." -if [ $p != "." ]; then - echo "Notice: The build invoke path is not 'source3'! Use make with the parameter" - echo "-C <'source3' path>. Example: make -C source3 all" -fi diff --git a/source3/passdb/wscript_build b/source3/passdb/wscript_build index 49c8154bb1..b18d873083 100644 --- a/source3/passdb/wscript_build +++ b/source3/passdb/wscript_build @@ -53,10 +53,9 @@ bld.SAMBA3_MODULE('pdb_samba4', internal_module=bld.SAMBA3_IS_STATIC_MODULE('pdb_samba4'), enabled=bld.SAMBA3_IS_ENABLED_MODULE('pdb_samba4')) -if bld.env.toplevel_build: - bld.SAMBA3_PYTHON('pypassdb', - source='py_passdb.c', - deps='pdb', - public_deps='samba-util tdb talloc pyrpc_util', - realname='samba/samba3/passdb.so' - ) +bld.SAMBA3_PYTHON('pypassdb', + source='py_passdb.c', + deps='pdb', + public_deps='samba-util tdb talloc pyrpc_util', + realname='samba/samba3/passdb.so' + ) diff --git a/source3/selftest/wscript b/source3/selftest/wscript deleted file mode 100644 index 1a266880c8..0000000000 --- a/source3/selftest/wscript +++ /dev/null @@ -1,203 +0,0 @@ -#!/usr/bin/env python -# vim: expandtab ft=python - -# selftest main code. - -import Scripting, os, Options, Utils, Environment, optparse, sys -from samba_utils import * -from samba_autoconf import * - -def set_options(opt): - - opt.add_option('--enable-selftest', - help=("enable options necessary for selftest (default=no)"), - action="store_true", dest='enable_selftest', default=False) - opt.add_option('--with-selftest-prefix', - help=("specify location of selftest directory (default=./st)"), - action="store", dest='SELFTEST_PREFIX', default='./st') - - opt.ADD_COMMAND('test', cmd_test) - opt.ADD_COMMAND('testonly', cmd_testonly) - - gr = opt.add_option_group('test options') - - gr.add_option('--load-list', - help=("Load a test id list from a text file"), - action="store", dest='LOAD_LIST', default=None) - gr.add_option('--list', - help=("List available tests"), - action="store_true", dest='LIST', default=False) - gr.add_option('--tests', - help=("wildcard pattern of tests to run"), - action="store", dest='TESTS', default='') - gr.add_option('--filtered-subunit', - help=("output (xfail) filtered subunit"), - action="store_true", dest='FILTERED_SUBUNIT', default=False) - gr.add_option('--quick', - help=("enable only quick tests"), - action="store_true", dest='QUICKTEST', default=False) - gr.add_option('--slow', - help=("enable the really slow tests"), - action="store_true", dest='SLOWTEST', default=False) - gr.add_option('--testenv', - help=("start a terminal with the test environment setup"), - action="store_true", dest='TESTENV', default=False) - gr.add_option('--valgrind', - help=("use valgrind on client programs in the tests"), - action="store_true", dest='VALGRIND', default=False) - gr.add_option('--valgrind-log', - help=("where to put the valgrind log"), - action="store", dest='VALGRINDLOG', default=None) - gr.add_option('--valgrind-server', - help=("use valgrind on the server in the tests (opens an xterm)"), - action="store_true", dest='VALGRIND_SERVER', default=False) - gr.add_option('--screen', - help=("run the samba servers in screen sessions"), - action="store_true", dest='SCREEN', default=False) - gr.add_option('--gdbtest', - help=("run the servers within a gdb window"), - action="store_true", dest='GDBTEST', default=False) - gr.add_option('--fail-immediately', - help=("stop tests on first failure"), - action="store_true", dest='FAIL_IMMEDIATELY', default=False) - gr.add_option('--socket-wrapper-pcap', - help=("create a pcap file for each failing test"), - action="store_true", dest='SOCKET_WRAPPER_PCAP', default=False) - gr.add_option('--socket-wrapper-keep-pcap', - help=("create a pcap file for all individual test"), - action="store_true", dest='SOCKET_WRAPPER_KEEP_PCAP', default=False) - -def configure(conf): - conf.env.SELFTEST_PREFIX = Options.options.SELFTEST_PREFIX - -def cmd_testonly(opt): - '''run tests without doing a build first''' - env = LOAD_ENVIRONMENT() - opt.env = env - - if (not CONFIG_SET(opt, 'NSS_WRAPPER') or -# not CONFIG_SET(opt, 'UID_WRAPPER') or - not CONFIG_SET(opt, 'SOCKET_WRAPPER')): - print("ERROR: You must use --enable-selftest to enable selftest") - sys.exit(1) - - os.environ['SAMBA_SELFTEST'] = '1' - - env.TESTS = Options.options.TESTS - - env.SUBUNIT_FORMATTER = os.getenv('SUBUNIT_FORMATTER') - if not env.SUBUNIT_FORMATTER: - env.SUBUNIT_FORMATTER = '${PYTHON} -u ${srcdir}/selftest/format-subunit --prefix=${SELFTEST_PREFIX} --immediate' - env.FILTER_XFAIL = '${PYTHON} -u ${srcdir}/selftest/filter-subunit --expected-failures=${srcdir}/source3/selftest/knownfail' - - if Options.options.FAIL_IMMEDIATELY: - env.FILTER_XFAIL += ' --fail-immediately' - - env.FORMAT_TEST_OUTPUT = '${SUBUNIT_FORMATTER}' - - # clean any previous temporary files - os.system("rm -rf %s/tmp" % env.SELFTEST_PREFIX); - - # put all command line options in the environment as TESTENV_*=* - for o in dir(Options.options): - if o[0:1] != '_': - os.environ['TESTENV_%s' % o.upper()] = str(getattr(Options.options, o, '')) - - binary_mappings = ('smbtorture3:smbtorture,' + - 'nmblookup3:nmblookup,' + - 'smbclient3:smbclient,' + - 'ntlm_auth3:ntlm_auth') - - env.OPTIONS = '--binary-mapping=' + binary_mappings - if not Options.options.SLOWTEST: - env.OPTIONS += ' --exclude=${srcdir}/source3/selftest/slow' - if Options.options.QUICKTEST: - env.OPTIONS += ' --quick --include=${srcdir}/source3/selftest/quick' - if Options.options.LOAD_LIST: - env.OPTIONS += ' --load-list=%s' % Options.options.LOAD_LIST - if Options.options.TESTENV: - env.OPTIONS += ' --testenv' - if Options.options.SOCKET_WRAPPER_PCAP: - env.OPTIONS += ' --socket-wrapper-pcap' - if Options.options.SOCKET_WRAPPER_KEEP_PCAP: - env.OPTIONS += ' --socket-wrapper-keep-pcap' - if Options.options.LIST: - env.OPTIONS += ' --list' - if os.environ.get('RUN_FROM_BUILD_FARM') is not None: - env.FILTER_OPTIONS = '${FILTER_XFAIL} --strip-passed-output' - else: - env.FILTER_OPTIONS = '${FILTER_XFAIL}' - - if Options.options.VALGRIND: - os.environ['VALGRIND'] = 'valgrind -q --num-callers=30' - if Options.options.VALGRINDLOG is not None: - os.environ['VALGRIND'] += ' --log-file=%s' % Options.options.VALGRINDLOG - - server_wrapper='' - - if Options.options.VALGRIND_SERVER: - server_wrapper = '${srcdir}/selftest/valgrind_run _DUMMY=X' - elif Options.options.GDBTEST: - server_wrapper = '${srcdir}/selftest/gdb_run _DUMMY=X' - - if Options.options.SCREEN: - server_wrapper = '${srcdir}/selftest/in_screen %s' % server_wrapper - os.environ['TERMINAL'] = EXPAND_VARIABLES(opt, '${srcdir}/selftest/in_screen') - elif server_wrapper != '': - server_wrapper = 'xterm -n server -l -e %s' % server_wrapper - - if server_wrapper != '': - os.environ['SAMBA_VALGRIND'] = EXPAND_VARIABLES(opt, server_wrapper) - - # this is needed for systems without rpath, or with rpath disabled - ADD_LD_LIBRARY_PATH('bin/shared') - ADD_LD_LIBRARY_PATH('bin/shared/private') - - # if we are using a system version of ldb then we need to tell it to - # load modules from our modules path - if env.USING_SYSTEM_LDB: - os.environ['LDB_MODULES_PATH'] = 'bin/modules/ldb' - - # tell build system where to find config.h - os.environ['CONFIG_H'] = 'bin/default/source3/include/config.h' - os.environ['VFSLIBDIR'] = os.path.abspath('bin/modules/vfs') - os.environ['NSS_WRAPPER_WINBIND_SO_PATH'] = os.path.abspath('bin/default/nsswitch/libnss-winbind.so') - - st_done = os.path.join(env.SELFTEST_PREFIX, 'st_done') - if os.path.exists(st_done): - os.unlink(st_done) - - if not os.path.isdir(env.SELFTEST_PREFIX): - os.makedirs(env.SELFTEST_PREFIX, int('755', 8)) - - # We use the full path rather than relative path because it cause problems on some plateforms (ie. solaris 8). - cmd = '(${PERL} ${srcdir}/selftest/selftest.pl --target=samba3 --prefix=${SELFTEST_PREFIX} --srcdir=${srcdir} --exclude=${srcdir}/source3/selftest/skip --testlist="${srcdir}/source3/selftest/tests.py|" ${OPTIONS} --socket-wrapper ${TESTS} && touch ${SELFTEST_PREFIX}/st_done) | ${FILTER_OPTIONS} | tee ${SELFTEST_PREFIX}/subunit' - if os.environ.get('RUN_FROM_BUILD_FARM') is None and not Options.options.FILTERED_SUBUNIT: - cmd += ' | ${FORMAT_TEST_OUTPUT}' - else: - cmd += ' | ${PYTHON} -u ${srcdir}/selftest/filter-subunit' - cmd = EXPAND_VARIABLES(opt, cmd) - - print("test: running %s" % cmd) - ret = RUN_COMMAND(cmd, env=env) - if os.path.exists(".testrepository"): - # "testr load -q" isn't - cmd = 'testr load -q < ${SELFTEST_PREFIX}/subunit > /dev/null' - cmd = EXPAND_VARIABLES(opt, cmd) - RUN_COMMAND(cmd, env=env) - - if ret != 0: - print("ERROR: test failed with exit code %d" % ret) - sys.exit(ret) - - if not os.path.exists(st_done): - print("ERROR: test command failed to complete") - sys.exit(1) - - -######################################################################## -# main test entry point -def cmd_test(opt): - '''Run the test suite (see test options below)''' - Scripting.commands.append('build') - Scripting.commands.append('testonly') diff --git a/source3/wscript b/source3/wscript index bb0354af8f..f725b623fa 100644 --- a/source3/wscript +++ b/source3/wscript @@ -1,10 +1,6 @@ #! /usr/bin/env python -srcdir = '..' -blddir = 'bin' - -APPNAME='samba' -VERSION=None +srcdir=".." import sys, os from optparse import SUPPRESS_HELP @@ -18,17 +14,6 @@ import samba3 Options.default_prefix = '/usr/local/samba' def set_options(opt): - if not os.getenv('TOPLEVEL_BUILD'): - opt.BUILTIN_DEFAULT('NONE') - opt.PRIVATE_EXTENSION_DEFAULT('s3') - opt.RECURSE('../lib/replace') - opt.RECURSE('../dynconfig') - opt.RECURSE('selftest') - opt.RECURSE('../lib/nss_wrapper') - opt.RECURSE('../lib/uid_wrapper') - opt.RECURSE('../lib/socket_wrapper') - opt.RECURSE('../lib/tevent') - opt.RECURSE('../lib/tdb_compat') opt.add_option('--with-static-modules', help=("Comma-separated list of names of modules to statically link in"), @@ -43,7 +28,7 @@ def set_options(opt): opt.SAMBA3_ADD_OPTION('winbind') opt.SAMBA3_ADD_OPTION('swat') opt.SAMBA3_ADD_OPTION('ads') - opt.SAMBA3_ADD_OPTION('krb5') + opt.SAMBA3_ADD_OPTION('mit-krb5-checks', default=False) opt.SAMBA3_ADD_OPTION('ldap') opt.SAMBA3_ADD_OPTION('cups', with_name="enable", without_name="disable") opt.SAMBA3_ADD_OPTION('iprint', with_name="enable", without_name="disable") @@ -78,13 +63,6 @@ def set_options(opt): def configure(conf): from samba_utils import TO_LIST - 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_WAF_BUILD_', version.MAJOR) - 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 @@ -92,52 +70,6 @@ def configure(conf): if Options.options.with_swat: conf.env['build_swat'] = True - if not conf.env.toplevel_build: - - conf.RECURSE('../lib/replace') - - conf.find_program('python', var='PYTHON', mandatory=True) - conf.find_program('perl', var='PERL', mandatory=True) - conf.find_program('xsltproc', var='XSLTPROC') - - # enable tool to build python extensions - conf.check_tool('python') - conf.check_python_version((2,4,2)) - conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=True) - - if sys.platform == 'darwin' and not conf.env['HAVE_ENVIRON_DECL']: - # Mac OSX needs to have this and it's also needed that the python is compiled with this - # otherwise you face errors about common symbols - if not conf.CHECK_SHLIB_W_PYTHON("Checking if -fno-common is needed"): - conf.ADD_CFLAGS('-fno-common') - if not conf.CHECK_SHLIB_W_PYTHON("Checking if -undefined dynamic_lookup is not need"): - conf.env.append_value('shlib_LINKFLAGS', ['-undefined', 'dynamic_lookup']) - if int(conf.env['PYTHON_VERSION'][0]) >= 3: - raise Utils.WafError('Python version 3.x is not supported by Samba yet') - - conf.RECURSE('../dynconfig') - conf.RECURSE('../lib/ccan') - conf.RECURSE('../lib/tdb_compat') - 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.RECURSE('../lib/util/charset') - - conf.ADD_EXTRA_INCLUDES('''#source3 #source3/include #lib/replace #lib''') - if not conf.env.USING_SYSTEM_TDB: - conf.ADD_EXTRA_INCLUDES('#lib/tdb_compat') - 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) conf.CHECK_HEADERS('execinfo.h libexc.h libunwind.h netdb.h') @@ -637,7 +569,7 @@ msg.msg_acctrightslen = sizeof(fd); # Check for kerberos have_gssapi=False - if Options.options.with_krb5 and not conf.env.toplevel_build: + if Options.options.with_mit_krb5_checks and conf.env.developer: Logs.info("Looking for kerberos features") conf.find_program('krb5-config', var='KRB5_CONFIG') if conf.env.KRB5_CONFIG: @@ -830,12 +762,6 @@ return krb5_kt_resolve(context, "WRFILE:api", &keytab); 'HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER', addmain=False, link=False, msg="Checking for KRB5_DEPRECATED define taking an identifier") - elif not conf.env.toplevel_build: - conf.SET_TARGET_TYPE('krb5', 'EMPTY') - conf.SET_TARGET_TYPE('gssapi', 'EMPTY') - conf.SET_TARGET_TYPE('gssapi_krb5', 'EMPTY') - conf.SET_TARGET_TYPE('com_err', 'EMPTY') - conf.SET_TARGET_TYPE('k5crypto', 'EMPTY') if Options.options.with_ads: use_ads=True @@ -1736,8 +1662,7 @@ main() { default_static_modules.extend(TO_LIST('pdb_ads auth_netlogond charset_weird')) default_shared_modules.extend(TO_LIST('perfcount_test')) - if conf.env.toplevel_build: - default_static_modules.extend(TO_LIST('pdb_samba4 auth_samba4')) + default_static_modules.extend(TO_LIST('pdb_samba4 auth_samba4')) if Options.options.with_acl_support and conf.CONFIG_SET('HAVE_POSIX_ACLS'): default_static_modules.extend(TO_LIST('vfs_posixacl')) @@ -1821,12 +1746,6 @@ main() { conf.DEFINE('%s_init' % entry, 'samba_init_module') conf.env[shared_env].append('%s' % entry) - if not os.getenv('TOPLEVEL_BUILD'): - # we don't want PYTHONDIR in config.h, as otherwise changing - # --prefix causes a complete rebuild - del(conf.env.defines['PYTHONDIR']) - del(conf.env.defines['PYTHONARCHDIR']) - conf.SAMBA_CONFIG_H('include/config.h') def ctags(ctx): @@ -1837,12 +1756,3 @@ def ctags(ctx): print("Running: %s" % cmd) os.system(cmd) -if not os.getenv('TOPLEVEL_BUILD'): - def wildcard_cmd(cmd): - '''called on a unknown command''' - from samba_wildcard import run_named_build_task - run_named_build_task(cmd) - def main(): - from samba_wildcard import wildcard_main - wildcard_main(wildcard_cmd) - Scripting.main = main diff --git a/source3/wscript_build b/source3/wscript_build index 6d8402ea71..41ff19159a 100755 --- a/source3/wscript_build +++ b/source3/wscript_build @@ -634,10 +634,7 @@ SPLIT_TOKENS_SRC = 'utils/split_tokens.c' LIBS='ICONV' -if bld.env.toplevel_build: - config_h = "../include/config.h" -else: - config_h = "include/config.h" +config_h = "../include/config.h" bld.SAMBA_BLDOPTIONS('smbd/build_options.c') @@ -651,15 +648,6 @@ t.env.BUILDDIR = bld.path.abspath() bld.SETUP_BUILD_GROUPS() -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('../dynconfig') - bld.env.suffix3 = '' - - ######################## SUBSYSTEMS ################################# bld.SAMBA3_LIBRARY('netapi', @@ -744,11 +732,10 @@ bld.SAMBA3_SUBSYSTEM('PARAM_UTIL', source=PARAM_UTIL_SRC, deps='samba-util') -if bld.env.toplevel_build: - bld.SAMBA3_SUBSYSTEM('LOADPARM_CTX', - source='param/loadparm_ctx.c', - deps='''s3_param_h param''', - vars=locals()) +bld.SAMBA3_SUBSYSTEM('LOADPARM_CTX', + source='param/loadparm_ctx.c', + deps='''s3_param_h param''', + vars=locals()) bld.SAMBA_GENERATOR('param/param_global_h', source= 'param/loadparm.c ../script/mkparamdefs.pl', @@ -759,12 +746,11 @@ bld.SAMBA3_SUBSYSTEM('param', source=PARAM_WITHOUT_REG_SRC, deps='samba-util PARAM_UTIL smbd_conn ldap lber LOADPARM_CTX samba3core smbconf param_local_h param/param_global_h''') -if bld.env.toplevel_build: - bld.SAMBA3_PYTHON('pys3param', - source='param/pyparam.c', - deps='param', - public_deps='samba-hostconfig pytalloc-util talloc', - realname='samba/samba3/param.so') +bld.SAMBA3_PYTHON('pys3param', + source='param/pyparam.c', + deps='param', + public_deps='samba-hostconfig pytalloc-util talloc', + realname='samba/samba3/param.so') bld.SAMBA3_SUBSYSTEM('param_service', source='param/service.c', @@ -1419,60 +1405,8 @@ swat_dir = os.path.join(bld.curdir, '../swat') swat_files = recursive_dirlist(swat_dir, swat_dir, '*') bld.INSTALL_FILES('${SWATDIR}', swat_files, base_name='../swat') -# additional compatibility rules. -# these rules allow us to have a common set of waf rules for toplevel and source3 -# builds. Effectively these are build rule aliases - -if not bld.env.toplevel_build: - bld.SAMBA3_SUBSYSTEM('POPT_SAMBA', source='', deps='popt_samba3') - bld.SAMBA3_SUBSYSTEM('ldb3', - source='lib/ldb_compat.c', - deps='samba-util') - bld.SAMBA3_SUBSYSTEM('ldb', source='', deps='ldb3') - bld.SAMBA3_SUBSYSTEM('dcerpc', '', deps='tevent-util') - bld.SAMBA3_SUBSYSTEM('cli-ldap', '', deps='tevent-util') - bld.SAMBA3_SUBSYSTEM('LOADPARM_CTX', '') - ########################## INCLUDES ################################# -bld.RECURSE('../lib/util/charset') -bld.RECURSE('../auth') -bld.RECURSE('../auth/kerberos') -bld.RECURSE('../lib/addns') -bld.RECURSE('../lib/async_req') -bld.RECURSE('../lib/ccan') -bld.RECURSE('../lib/socket') -bld.RECURSE('../lib/param') -bld.RECURSE('../libcli/auth') -bld.RECURSE('../libcli/drsuapi') -bld.RECURSE('../libcli/ldap') -bld.RECURSE('../libcli/cldap') -bld.RECURSE('../libcli/named_pipe_auth') -bld.RECURSE('../libcli/netlogon') -bld.RECURSE('../libcli/samsync') -bld.RECURSE('../libcli/security') -bld.RECURSE('../libcli/smb') -bld.RECURSE('../libcli/util') -bld.RECURSE('../libcli/smbreadline') -bld.RECURSE('../libcli/nbt') -bld.RECURSE('../libcli/registry') -bld.RECURSE('../lib/crypto') -bld.RECURSE('../lib/iniparser/src') -bld.RECURSE('../lib/nss_wrapper') -bld.RECURSE('../lib/popt') -bld.RECURSE('../librpc') -bld.RECURSE('../lib/smbconf') -bld.RECURSE('../lib/socket_wrapper') -bld.RECURSE('../lib/uid_wrapper') -bld.RECURSE('../lib/talloc') -bld.RECURSE('../lib/tdb_compat') -bld.RECURSE('../lib/util') -bld.RECURSE('../lib/tevent') -bld.RECURSE('../lib/tsocket') -bld.RECURSE('../lib/zlib') -bld.RECURSE('../libds/common') -bld.RECURSE('../nsswitch') -bld.RECURSE('../nsswitch/libwbclient') bld.RECURSE('auth') bld.RECURSE('libgpo/gpext') bld.RECURSE('lib/pthreadpool') @@ -16,8 +16,6 @@ samba_dist.DIST_DIRS('.') # install in /usr/local/samba by default Options.default_prefix = '/usr/local/samba' -os.environ['TOPLEVEL_BUILD'] = '1' - def set_options(opt): opt.BUILTIN_DEFAULT('NONE') opt.PRIVATE_EXTENSION_DEFAULT('samba4') @@ -42,7 +40,6 @@ def set_options(opt): def configure(conf): - conf.env.toplevel_build = True version = samba_version.load_version(env=conf.env) conf.DEFINE('CONFIG_H_IS_FROM_SAMBA', 1) diff --git a/wscript_build b/wscript_build index 4f61820224..87b78a3f77 100644 --- a/wscript_build +++ b/wscript_build @@ -7,9 +7,6 @@ srcdir = "." import samba_version -# mark this as a top level build, for source3 rules -bld.env.toplevel_build = True -bld.env.use_intree_heimdal = True bld.env.suffix3 = "3" # create separate build groups for building the asn1 and et compiler, then @@ -33,6 +30,7 @@ bld.RECURSE('lib/replace') bld.RECURSE('lib/socket') bld.RECURSE('lib/talloc') bld.RECURSE('lib/tevent') +bld.RECURSE('lib/addns') bld.RECURSE('lib/ccan') bld.RECURSE('lib/tdb_compat') bld.RECURSE('lib/ldb') |