2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-22 18:07:12 +01:00

Additional compatibility helpers in compat15.py

This commit is contained in:
Thomas Nagy 2015-11-05 00:57:37 +01:00
parent efbc47b434
commit 18204eb963
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64

View File

@ -155,6 +155,16 @@ def get_curdir(self):
return self.path.abspath()
Context.Context.curdir = property(get_curdir, Utils.nada)
def get_srcdir(self):
return self.srcnode.abspath()
Configure.ConfigurationContext.srcdir = property(get_srcdir, Utils.nada)
def get_blddir(self):
return self.bldnode.abspath()
Configure.ConfigurationContext.blddir = property(get_blddir, Utils.nada)
Configure.ConfigurationContext.check_message_1 = Configure.ConfigurationContext.start_msg
Configure.ConfigurationContext.check_message_2 = Configure.ConfigurationContext.end_msg
rev = Context.load_module
def load_module(path, encoding=None):
@ -171,6 +181,8 @@ def load_module(path, encoding=None):
if Logs.verbose:
Logs.warn('compat: rename "blddir" to "out" (%r)' % path)
ret.out = ret.blddir
Utils.g_module = Context.g_module
Options.launch_dir = Context.launch_dir
return ret
Context.load_module = load_module