wafsamba: Only add init function if not building module as shared library.
authorJelmer Vernooij <jelmer@samba.org>
Thu, 10 Jun 2010 11:02:59 +0000 (13:02 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Tue, 15 Jun 2010 11:15:50 +0000 (13:15 +0200)
buildtools/wafsamba/wafsamba.py

index 4b0580daeb3498fbbb4aa28d8ed7d4c3e718cef5..183253665e24a8910e711c0ea9b98915fd08c045 100644 (file)
@@ -327,11 +327,6 @@ def SAMBA_MODULE(bld, modname, source,
                  enabled=True):
     '''define a Samba module.'''
 
-    # we add the init function regardless of whether the module
-    # is enabled or not, as we need to generate a null list if
-    # all disabled
-    bld.ADD_INIT_FUNCTION(subsystem, modname, init_function)
-
     if internal_module or BUILTIN_LIBRARY(bld, modname):
         # treat internal modules as subsystems for now
         SAMBA_SUBSYSTEM(bld, modname, source,
@@ -342,6 +337,7 @@ def SAMBA_MODULE(bld, modname, source,
                         cflags=cflags,
                         local_include=local_include,
                         enabled=enabled)
+        bld.ADD_INIT_FUNCTION(subsystem, modname, init_function)
         return
 
     if not enabled:
@@ -363,14 +359,19 @@ def SAMBA_MODULE(bld, modname, source,
         deps += ' ' + subsystem
 
     bld.SET_BUILD_GROUP('main')
-    bld(
-        features       = 'cc',
+    t = bld(
+        features       = 'cc cshlib install_lib',
         source         = source,
         target         = modname,
         samba_cflags   = CURRENT_CFLAGS(bld, modname, cflags),
         samba_includes = includes,
         local_include  = local_include,
-        samba_deps     = TO_LIST(deps)
+        samba_deps     = TO_LIST(deps),
+        install_path   = None,
+        samba_inst_path= "${MODULESDIR}/%s" % subsystem,
+        samba_realname = None,
+        vnum           = None,
+        samba_install  = True,
         )
 
     if autoproto is not None: