build:wafsamba: Moved samba_before_apply_obj_vars to samba_utils
authorThomas Nagy <tnagy@waf.io>
Wed, 4 Nov 2015 23:39:25 +0000 (00:39 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 6 Nov 2015 09:37:24 +0000 (10:37 +0100)
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>
buildtools/wafsamba/samba_optimisation.py
buildtools/wafsamba/samba_utils.py

index 9d4fad1ed16f572327a4c88bef74763e2a825f99..5008f833238cb19362eca367ca6b02fc900522a7 100644 (file)
@@ -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)
+
index fb1355c768eeea90bd1ff6428d1c1dd993603066..5776be89717d759c7cdf1f74ad24617a620b70c9 100644 (file)
@@ -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)
+