summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorThomas Nagy <tnagy@waf.io>2015-10-28 21:04:28 +0100
committerMichael Adam <obnox@samba.org>2015-10-28 21:40:24 +0100
commit1466e27fa612b0e09e78dea75c65516e76529ff6 (patch)
tree92cdfe2b7d6d152e7a9bf6329418e3670c8d1877 /buildtools
parent6404c07266be0a2986473aacec7079c5849f3703 (diff)
downloadsamba-1466e27fa612b0e09e78dea75c65516e76529ff6.tar.gz
build:wafsamba: Removed hard-coded class names from build scripts
Using hard-coded class names prevents subclassing and make it hard to reason about the workflow. The wscript files read during the build must be read during the installation phase as well. Signed-off-by: Thomas Nagy <tnagy@waf.io> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/samba_utils.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py
index f7bb11ce310..36d3929f549 100644
--- a/buildtools/wafsamba/samba_utils.py
+++ b/buildtools/wafsamba/samba_utils.py
@@ -2,7 +2,7 @@
# and for SAMBA_ macros for building libraries, binaries etc
import os, sys, re, fnmatch, shlex
-import Build, Options, Utils, Task, Logs
+import Build, Options, Utils, Task, Logs, Configure
from TaskGen import feature, before
from Configure import conf, ConfigurationContext
from Logs import debug
@@ -656,11 +656,10 @@ def PROCESS_SEPARATE_RULE(self, rule):
You should have file named wscript_<stage>_rule in the current directory
where stage is either 'configure' or 'build'
'''
- ctxclass = self.__class__.__name__
stage = ''
- if ctxclass == 'ConfigurationContext':
+ if isinstance(self, Configure.ConfigurationContext):
stage = 'configure'
- elif ctxclass == 'BuildContext':
+ elif isinstance(self, Build.BuildContext):
stage = 'build'
file_path = os.path.join(self.curdir, WSCRIPT_FILE+'_'+stage+'_'+rule)
txt = load_file(file_path)