From e9fd67f4deaa822bec025f8cc2557b825a05f3ef Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 18 Mar 2010 23:47:48 +1100 Subject: build: split build and install libraries/binaries we need to split these to avoid re-compilation on install as install has different rpath settings --- buildtools/wafsamba/samba_utils.py | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'buildtools/wafsamba/samba_utils.py') 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 -- cgit