summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorThomas Nagy <tnagy@waf.io>2015-11-05 00:39:25 +0100
committerAndrew Bartlett <abartlet@samba.org>2015-11-06 10:37:24 +0100
commit973197909887ccd38eb5b5aaf48235dea09fdc81 (patch)
tree04fd3fc9be56b8a78253a6365dd45599668a508b /buildtools
parent40a2deb52099c6149a072c545010093d11b0b1a7 (diff)
downloadsamba-973197909887ccd38eb5b5aaf48235dea09fdc81.tar.gz
build:wafsamba: Moved samba_before_apply_obj_vars to samba_utils
The function samba_before_apply_obj_vars serves to remove system paths, it is certainly not an optimisation and has no place in that module. By optimisation, we mean that the build process could run without it. Signed-off-by: Thomas Nagy <tnagy@waf.io> Reviewed-by: Uri Simchoni uri@samba.org Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/samba_optimisation.py22
-rw-r--r--buildtools/wafsamba/samba_utils.py25
2 files changed, 25 insertions, 22 deletions
diff --git a/buildtools/wafsamba/samba_optimisation.py b/buildtools/wafsamba/samba_optimisation.py
index 9d4fad1ed16..5008f833238 100644
--- a/buildtools/wafsamba/samba_optimisation.py
+++ b/buildtools/wafsamba/samba_optimisation.py
@@ -266,24 +266,4 @@ def apply_lib_vars(self):
if val:
self.env.append_value(v, val)
-@feature('cprogram', 'cshlib', 'cstaticlib')
-@after('apply_lib_vars')
-@before('apply_obj_vars')
-def samba_before_apply_obj_vars(self):
- """before apply_obj_vars for uselib, this removes the standard pathes"""
-
- def is_standard_libpath(env, path):
- for _path in env.STANDARD_LIBPATH:
- if _path == os.path.normpath(path):
- return True
- return False
-
- v = self.env
-
- for i in v['RPATH']:
- if is_standard_libpath(v, i):
- v['RPATH'].remove(i)
-
- for i in v['LIBPATH']:
- if is_standard_libpath(v, i):
- v['LIBPATH'].remove(i)
+
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py
index fb1355c768e..5776be89717 100644
--- a/buildtools/wafsamba/samba_utils.py
+++ b/buildtools/wafsamba/samba_utils.py
@@ -3,7 +3,7 @@
import os, sys, re, fnmatch, shlex
import Build, Options, Utils, Task, Logs, Configure
-from TaskGen import feature, before
+from TaskGen import feature, before, after
from Configure import conf, ConfigurationContext
from Logs import debug
@@ -683,3 +683,26 @@ def AD_DC_BUILD_IS_ENABLED(self):
return False
Build.BuildContext.AD_DC_BUILD_IS_ENABLED = AD_DC_BUILD_IS_ENABLED
+
+@feature('cprogram', 'cshlib', 'cstaticlib')
+@after('apply_lib_vars')
+@before('apply_obj_vars')
+def samba_before_apply_obj_vars(self):
+ """before apply_obj_vars for uselib, this removes the standard paths"""
+
+ def is_standard_libpath(env, path):
+ for _path in env.STANDARD_LIBPATH:
+ if _path == os.path.normpath(path):
+ return True
+ return False
+
+ v = self.env
+
+ for i in v['RPATH']:
+ if is_standard_libpath(v, i):
+ v['RPATH'].remove(i)
+
+ for i in v['LIBPATH']:
+ if is_standard_libpath(v, i):
+ v['LIBPATH'].remove(i)
+