waf: prevent us from modifying non-install libs during make install
authorAndrew Tridgell <tridge@samba.org>
Mon, 8 Nov 2010 00:01:13 +0000 (11:01 +1100)
committerAndrew Tridgell <tridge@samba.org>
Mon, 8 Nov 2010 00:13:28 +0000 (11:13 +1100)
we need to ensure that 'make install' does not change any of our build
libraries, and only changes the .inst.so libraries, otherwise doing a
make test in the build directory directly after a make install could
use the installed libraries, which would mean using the wrong
LDB_MODULES_PATH

this could cause the "unknown error" loading ldb modules when running
some commands directly after a make install

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

buildtools/wafsamba/samba_install.py

index 9401d228c56384d3eb20cfb2a27c2ec030df7a79..634d5b120b39de81df82507530ea856a7b55818d 100644 (file)
@@ -18,7 +18,7 @@ def install_binary(self):
     install_ldflags = install_rpath(bld)
     build_ldflags   = build_rpath(bld)
 
-    if not Options.is_install or not self.samba_install:
+    if not Options.is_install:
         # just need to set rpath if we are not installing
         self.env.RPATH = build_ldflags
         return
@@ -38,6 +38,10 @@ def install_binary(self):
     # setup the right rpath link flags for the install
     self.env.RPATH = install_ldflags
 
+    if not self.samba_install:
+        # this binary is marked not to be installed
+        return
+
     # tell waf to install the right binary
     bld.install_as(os.path.join(install_path, orig_target),
                    os.path.join(self.path.abspath(bld.env), self.target),
@@ -77,7 +81,7 @@ def install_library(self):
         # install link. That stops us from overwriting the existing build
         # target, which has different ldflags
         self.done_install_library = True
-        t = self.clone('default')
+        t = self
         t.posted = False
         t.target += '.inst'
         self.env.RPATH = build_ldflags