summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba/samba_utils.py
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-18 23:47:48 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:52 +1000
commite9fd67f4deaa822bec025f8cc2557b825a05f3ef (patch)
treefce439cbe815fc6f683ea16b3d37460951e222bd /buildtools/wafsamba/samba_utils.py
parentc1f4015dcd7cb6edbde9fafd138c4d36fc061a8d (diff)
downloadsamba-e9fd67f4deaa822bec025f8cc2557b825a05f3ef.tar.gz
samba-e9fd67f4deaa822bec025f8cc2557b825a05f3ef.tar.bz2
samba-e9fd67f4deaa822bec025f8cc2557b825a05f3ef.zip
build: split build and install libraries/binaries
we need to split these to avoid re-compilation on install as install has different rpath settings
Diffstat (limited to 'buildtools/wafsamba/samba_utils.py')
-rw-r--r--buildtools/wafsamba/samba_utils.py23
1 files changed, 9 insertions, 14 deletions
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py
index 5fbb801ef6..a5d42e4f7f 100644
--- a/buildtools/wafsamba/samba_utils.py
+++ b/buildtools/wafsamba/samba_utils.py
@@ -51,23 +51,18 @@ def runonce(function):
-################################################################
-# magic rpath handling
-#
-# we want a different rpath when installing and when building
-# Note that this should really check if rpath is available on this platform
-# and it should also honor an --enable-rpath option
def set_rpath(bld):
- if Options.is_install:
- if bld.env['RPATH_ON_INSTALL']:
- bld.env['RPATH'] = ['-Wl,-rpath=%s/lib' % bld.env.PREFIX]
- else:
- bld.env['RPATH'] = []
- else:
- rpath = os.path.normpath('%s/%s' % (bld.env['BUILD_DIRECTORY'], LIB_PATH))
- bld.env.append_value('RPATH', '-Wl,-rpath=%s' % rpath)
+ '''setup the default rpath'''
+ rpath = os.path.normpath('%s/%s' % (bld.env['BUILD_DIRECTORY'], LIB_PATH))
+ bld.env.append_value('RPATH', '-Wl,-rpath=%s' % rpath)
Build.BuildContext.set_rpath = set_rpath
+def install_rpath(bld):
+ '''the rpath value for installation'''
+ if bld.env['RPATH_ON_INSTALL']:
+ return ['-Wl,-rpath=%s/lib' % bld.env.PREFIX]
+ return []
+
#############################################################
# return a named build cache dictionary, used to store