From 0a703c7fd10d8adc57f5703c697eb80a7a7202bc Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 1 Nov 2010 14:57:57 +1100 Subject: 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 --- buildtools/wafsamba/samba_deps.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/buildtools/wafsamba/samba_deps.py b/buildtools/wafsamba/samba_deps.py index 7471118722..bf19656496 100644 --- a/buildtools/wafsamba/samba_deps.py +++ b/buildtools/wafsamba/samba_deps.py @@ -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 -- cgit