# 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
from samba_bundled import *
import samba_install
import samba_conftests
+import samba_abi
import tru64cc
import irixcc
import generic_cc
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.
+
+Alternatively, please use ./autogen-waf.sh, and then
+run ./configure and make as usual. That will call the right version of waf.
+''')
+ sys.exit(1)
+
+
@conf
def SAMBA_BUILD_ENV(conf):
'''create the samba build environment'''
target_type='LIBRARY',
bundled_extension=True,
link_name=None,
+ abi_file=None,
+ abi_match=None,
+ hide_symbols=False,
enabled=True):
'''define a Samba library'''
autoproto = autoproto,
depends_on = depends_on,
needs_python = needs_python,
+ hide_symbols = hide_symbols,
local_include = local_include)
if libname == obj_target:
features += ' pyext'
elif needs_python:
features += ' pyembed'
+ if abi_file:
+ features += ' abi_check'
+
+ if abi_file:
+ abi_file = os.path.join(bld.curdir, abi_file)
bld.SET_BUILD_GROUP(group)
t = bld(
samba_inst_path = install_path,
name = libname,
samba_realname = realname,
- samba_install = install
+ samba_install = install,
+ abi_file = abi_file,
+ abi_match = abi_match
)
if link_name:
t.link_name = link_name
- if autoproto is not None:
- bld.SAMBA_AUTOPROTO(autoproto, source)
-
- if public_headers is not None:
- bld.PUBLIC_HEADERS(public_headers, header_path=header_path)
-
if pc_files is not None:
bld.PKG_CONFIG_FILES(pc_files, vnum=vnum)
public_headers=None,
header_path=None,
modules=None,
- installdir=None,
ldflags=None,
cflags='',
autoproto=None,
use_hostcc=False,
+ use_global_deps=True,
compiler=None,
group='binaries',
manpages=None,
subsystem_name = subsystem_name,
needs_python = needs_python,
local_include = local_include,
- use_hostcc = use_hostcc)
+ use_hostcc = use_hostcc,
+ use_global_deps= use_global_deps)
bld.SET_BUILD_GROUP(group)
if subsystem_name is not None:
bld.TARGET_ALIAS(subsystem_name, binname)
- if autoproto is not None:
- bld.SAMBA_AUTOPROTO(autoproto, source)
- if public_headers is not None:
- bld.PUBLIC_HEADERS(public_headers, header_path=header_path)
Build.BuildContext.SAMBA_BINARY = SAMBA_BINARY
subsystem_name=None,
enabled=True,
use_hostcc=False,
+ use_global_deps=True,
vars=None,
+ hide_symbols=False,
needs_python=False):
'''define a Samba subsystem'''
features = features,
source = source,
target = modname,
- samba_cflags = CURRENT_CFLAGS(bld, modname, cflags),
+ samba_cflags = CURRENT_CFLAGS(bld, modname, cflags, hide_symbols=hide_symbols),
depends_on = depends_on,
samba_deps = TO_LIST(deps),
samba_includes = includes,
local_include = local_include,
local_include_first = local_include_first,
samba_subsystem= subsystem_name,
- samba_use_hostcc = use_hostcc
+ samba_use_hostcc = use_hostcc,
+ samba_use_global_deps = use_global_deps
)
if cflags_end is not None: