summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba/samba_utils.py
diff options
context:
space:
mode:
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