waf: Make shared modules available in the build dir.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 4 Sep 2010 00:18:31 +0000 (02:18 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 4 Sep 2010 13:00:32 +0000 (15:00 +0200)
buildtools/wafsamba/samba_install.py
buildtools/wafsamba/wafsamba.py

index 488729bc513dfacfaa975342c7ec17388e7bcd40..f4ca26353d3bcd4e17ab792020f50c9fd36e1530 100644 (file)
@@ -150,6 +150,11 @@ def symlink_lib(self):
         if os.path.islink(link_target) and os.readlink(link_target) == libpath:
             return
         os.unlink(link_target)
+
+    link_container = os.path.dirname(link_target)
+    if not os.path.isdir(link_container):
+        os.mkdir(link_container)
+
     os.symlink(libpath, link_target)
 
 
index c24d82b930be56a71e5afa4305782cea042d9b69..43c56281392db999ae82f841d5a9d6e9d2393c4e 100644 (file)
@@ -59,7 +59,7 @@ def SAMBA_BUILD_ENV(conf):
     # this allows all of the bin/shared and bin/python targets
     # to be expressed in terms of build directory paths
     mkdir_p(os.path.join(conf.blddir, 'default'))
-    for p in ['python','shared']:
+    for p in ['python','shared', 'modules']:
         link_target = os.path.join(conf.blddir, 'default/' + p)
         if not os.path.lexists(link_target):
             os.symlink('../' + p, link_target)
@@ -351,7 +351,7 @@ def SAMBA_MODULE(bld, modname, source,
 
     obj_target = modname + '.objlist'
 
-    realname = modname 
+    realname = modname
     if subsystem is not None:
         deps += ' ' + subsystem
         while realname.startswith("lib"+subsystem+"_"):
@@ -363,6 +363,8 @@ def SAMBA_MODULE(bld, modname, source,
     while realname.startswith("lib"):
         realname = realname[len("lib"):]
 
+    build_link_name = "modules/%s/%s" % (subsystem, realname)
+
     bld.SAMBA_LIBRARY(modname,
                       source,
                       deps=deps,
@@ -371,6 +373,7 @@ def SAMBA_MODULE(bld, modname, source,
                       autoproto = autoproto,
                       local_include=local_include,
                       vars=vars,
+                      link_name=build_link_name,
                       install_path="${MODULESDIR}/%s" % subsystem
                       )