1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

wafsamba: added global_include option

this allows you to disable the global include additions. We will use
this for testing our public headers without including any of the
source tree directories
This commit is contained in:
Andrew Tridgell 2011-02-28 18:52:36 +11:00
parent 4f52becec1
commit 59be7265ad
2 changed files with 15 additions and 3 deletions

View File

@ -137,7 +137,7 @@ def build_includes(self):
includes.extend(self.samba_includes_extended) includes.extend(self.samba_includes_extended)
if 'EXTRA_INCLUDES' in bld.env: if 'EXTRA_INCLUDES' in bld.env and getattr(self, 'global_include', True):
includes.extend(bld.env['EXTRA_INCLUDES']) includes.extend(bld.env['EXTRA_INCLUDES'])
includes.append('#') includes.append('#')
@ -958,7 +958,8 @@ def show_object_duplicates(bld, tgt_list):
# this provides a way to save our dependency calculations between runs # this provides a way to save our dependency calculations between runs
savedeps_version = 3 savedeps_version = 3
savedeps_inputs = ['samba_deps', 'samba_includes', 'local_include', 'local_include_first', 'samba_cflags', savedeps_inputs = ['samba_deps', 'samba_includes', 'local_include', 'local_include_first', 'samba_cflags',
'source', 'grouping_library', 'samba_ldflags', 'allow_undefined_symbols' ] 'source', 'grouping_library', 'samba_ldflags', 'allow_undefined_symbols',
'use_global_deps', 'global_include' ]
savedeps_outputs = ['uselib', 'uselib_local', 'add_objects', 'includes', 'ccflags', 'ldflags', 'samba_deps_extended'] savedeps_outputs = ['uselib', 'uselib_local', 'add_objects', 'includes', 'ccflags', 'ldflags', 'samba_deps_extended']
savedeps_outenv = ['INC_PATHS'] savedeps_outenv = ['INC_PATHS']
savedeps_envvars = ['NONSHARED_BINARIES', 'GLOBAL_DEPENDENCIES', 'EXTRA_CFLAGS', 'EXTRA_LDFLAGS', 'EXTRA_INCLUDES' ] savedeps_envvars = ['NONSHARED_BINARIES', 'GLOBAL_DEPENDENCIES', 'EXTRA_CFLAGS', 'EXTRA_LDFLAGS', 'EXTRA_INCLUDES' ]

View File

@ -109,6 +109,7 @@ def SAMBA_LIBRARY(bld, libname, source,
group='libraries', group='libraries',
depends_on='', depends_on='',
local_include=True, local_include=True,
global_include=True,
vars=None, vars=None,
subdir=None, subdir=None,
install_path=None, install_path=None,
@ -167,7 +168,8 @@ def SAMBA_LIBRARY(bld, libname, source,
depends_on = depends_on, depends_on = depends_on,
hide_symbols = hide_symbols, hide_symbols = hide_symbols,
pyext = pyext or (target_type == "PYTHON"), pyext = pyext or (target_type == "PYTHON"),
local_include = local_include) local_include = local_include,
global_include = global_include)
if BUILTIN_LIBRARY(bld, libname): if BUILTIN_LIBRARY(bld, libname):
return return
@ -242,6 +244,7 @@ def SAMBA_LIBRARY(bld, libname, source,
samba_includes = includes, samba_includes = includes,
version_script = vscript, version_script = vscript,
local_include = local_include, local_include = local_include,
global_include = global_include,
vnum = vnum, vnum = vnum,
soname = soname, soname = soname,
install_path = None, install_path = None,
@ -288,6 +291,7 @@ def SAMBA_BINARY(bld, binname, source,
group='binaries', group='binaries',
manpages=None, manpages=None,
local_include=True, local_include=True,
global_include=True,
subsystem_name=None, subsystem_name=None,
pyembed=False, pyembed=False,
vars=None, vars=None,
@ -332,6 +336,7 @@ def SAMBA_BINARY(bld, binname, source,
autoproto = autoproto, autoproto = autoproto,
subsystem_name = subsystem_name, subsystem_name = subsystem_name,
local_include = local_include, local_include = local_include,
global_include = global_include,
use_hostcc = use_hostcc, use_hostcc = use_hostcc,
pyext = pyembed, pyext = pyembed,
use_global_deps= use_global_deps) use_global_deps= use_global_deps)
@ -349,6 +354,7 @@ def SAMBA_BINARY(bld, binname, source,
samba_deps = deps, samba_deps = deps,
samba_includes = includes, samba_includes = includes,
local_include = local_include, local_include = local_include,
global_include = global_include,
samba_modules = modules, samba_modules = modules,
top = True, top = True,
samba_subsystem= subsystem_name, samba_subsystem= subsystem_name,
@ -376,6 +382,7 @@ def SAMBA_MODULE(bld, modname, source,
cflags='', cflags='',
internal_module=True, internal_module=True,
local_include=True, local_include=True,
global_include=True,
vars=None, vars=None,
subdir=None, subdir=None,
enabled=True, enabled=True,
@ -396,6 +403,7 @@ def SAMBA_MODULE(bld, modname, source,
autoproto_extra_source=autoproto_extra_source, autoproto_extra_source=autoproto_extra_source,
cflags=cflags, cflags=cflags,
local_include=local_include, local_include=local_include,
global_include=global_include,
enabled=enabled) enabled=enabled)
bld.ADD_INIT_FUNCTION(subsystem, modname, init_function) bld.ADD_INIT_FUNCTION(subsystem, modname, init_function)
@ -432,6 +440,7 @@ def SAMBA_MODULE(bld, modname, source,
realname = realname, realname = realname,
autoproto = autoproto, autoproto = autoproto,
local_include=local_include, local_include=local_include,
global_include=global_include,
vars=vars, vars=vars,
link_name=build_link_name, link_name=build_link_name,
install_path="${MODULESDIR}/%s" % subsystem, install_path="${MODULESDIR}/%s" % subsystem,
@ -459,6 +468,7 @@ def SAMBA_SUBSYSTEM(bld, modname, source,
depends_on='', depends_on='',
local_include=True, local_include=True,
local_include_first=True, local_include_first=True,
global_include=True,
subsystem_name=None, subsystem_name=None,
enabled=True, enabled=True,
use_hostcc=False, use_hostcc=False,
@ -504,6 +514,7 @@ def SAMBA_SUBSYSTEM(bld, modname, source,
samba_includes = includes, samba_includes = includes,
local_include = local_include, local_include = local_include,
local_include_first = local_include_first, local_include_first = local_include_first,
global_include = global_include,
samba_subsystem= subsystem_name, samba_subsystem= subsystem_name,
samba_use_hostcc = use_hostcc, samba_use_hostcc = use_hostcc,
samba_use_global_deps = use_global_deps samba_use_global_deps = use_global_deps