summaryrefslogtreecommitdiff
path: root/source3/wscript
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2010-05-11 10:32:07 +0200
committerKai Blin <kai@samba.org>2010-05-20 22:16:15 +0200
commit0e7e0397780a13b13649c910fe77709e4feedcf0 (patch)
tree61bdcc67c815d90dbaf26bdd27262d9e50e6eaef /source3/wscript
parent25f33a3f8e92e2687db782b56ad794e8dee02986 (diff)
downloadsamba-0e7e0397780a13b13649c910fe77709e4feedcf0.tar.gz
samba-0e7e0397780a13b13649c910fe77709e4feedcf0.tar.bz2
samba-0e7e0397780a13b13649c910fe77709e4feedcf0.zip
s3-waf: Autogenerate the static and dynamic init function calls
Diffstat (limited to 'source3/wscript')
-rw-r--r--source3/wscript27
1 files changed, 23 insertions, 4 deletions
diff --git a/source3/wscript b/source3/wscript
index 46261c5b65..f79d21665f 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -277,22 +277,41 @@ updwtmp updwtmpx utimensat vsyslog _write __write __xstat
conf.DEFINE('STRING_STATIC_MODULES', ' '.join(default_static_modules), quote=True)
static_list = {}
+ shared_list = {}
- prefixes = ['vfs', 'pdb', 'rpc', 'auth', 'nss_info', 'charset', 'idmap']
+ prefixes = ['vfs', 'pdb', 'rpc', 'auth', 'nss_info', 'charset', 'idmap', 'gpext']
for p in prefixes:
for m in default_static_modules:
if m.find(p) == 0:
if not p in static_list:
static_list[p] = []
static_list[p].append(m)
+ for m in default_shared_modules:
+ if m.find(p) == 0:
+ if not p in shared_list:
+ shared_list[p] = []
+ shared_list[p].append(m)
for p in prefixes:
- conf.env['%s_STATIC' % p.upper()] = ''
- conf.env['%s_SHARED' % p.upper()] = ''
+ static_env = "%s_STATIC" % p.upper()
+ shared_env = "%s_SHARED" % p.upper()
+ conf.env[static_env] = []
+ conf.env[shared_env] = []
if p in static_list:
- conf.DEFINE('static_init_%s' % p, '{ %s_init(); }' % '_init(); '.join(static_list[p]))
+ decl_list=""
+ for entry in static_list[p]:
+ decl_list += "extern NTSTATUS %s_init(void); " % entry
+ conf.env[static_env].append('%s' % entry.upper())
+ decl_list = decl_list.rstrip()
+ conf.DEFINE('static_decl_%s' % p, decl_list)
+ conf.DEFINE('static_init_%s' % p, '{ %s_init(); }' % '_init(); '.join(static_list[p]))
else:
+ conf.DEFINE('static_decl_%s' % p, '')
conf.DEFINE('static_init_%s' % p, '{}')
+ if p in shared_list:
+ for entry in shared_list[p]:
+ conf.DEFINE('%s_init' % entry, 'init_samba_module')
+ conf.env[shared_env].append('%s' % entry.upper())
if Options.options.with_winbind:
conf.DEFINE('WITH_WINBIND', '1')