mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
waf: added automatic prototyping of static module init functions
this avoids the need to manually list all our static init functions in the code Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
014a90f6ef
commit
0a703c7fd1
@ -210,6 +210,8 @@ def add_init_functions(self):
|
||||
|
||||
if modules == []:
|
||||
cflags.append('-DSTATIC_%s_MODULES=%s' % (sname.replace('-','_'), sentinal))
|
||||
if sentinal == 'NULL':
|
||||
cflags.append('-DSTATIC_%s_MODULES_PROTO' % sname.replace('-','_'))
|
||||
self.ccflags = cflags
|
||||
return
|
||||
|
||||
@ -222,8 +224,14 @@ def add_init_functions(self):
|
||||
init_fn_list.append(d['INIT_FUNCTION'])
|
||||
if init_fn_list == []:
|
||||
cflags.append('-DSTATIC_%s_MODULES=%s' % (m, sentinal))
|
||||
if sentinal == 'NULL':
|
||||
cflags.append('-DSTATIC_%s_MODULES_PROTO' % m)
|
||||
else:
|
||||
cflags.append('-DSTATIC_%s_MODULES=%s' % (m, ','.join(init_fn_list) + ',' + sentinal))
|
||||
proto=''
|
||||
for f in init_fn_list:
|
||||
proto = proto + '_MODULE_PROTO(%s)' % f
|
||||
cflags.append('-DSTATIC_%s_MODULES_PROTO=%s' % (m, proto))
|
||||
self.ccflags = cflags
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user