Additional fixes in extras/compat15.py

This commit is contained in:
Thomas Nagy 2015-12-05 14:00:56 +01:00
parent 8113778aab
commit d109ed4fc7
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
2 changed files with 24 additions and 0 deletions

1
TODO
View File

@ -17,6 +17,7 @@ Waf 1.9
* Detect Clang by default on FreeBSD instead of gcc
* Use relative paths in apply_incpaths (and absolute ones when paths cross drives)
* Let run_once accept a list of *args
* Let more context commands depend on the configuration
and all other issues listed on https://github.com/waf-project/waf/issues

View File

@ -385,3 +385,26 @@ def install_dir(self, path):
pass
Build.BuildContext.install_dir = install_dir
# before/after names
repl = {'apply_core': 'process_source',
'apply_lib_vars': 'process_source',
'apply_obj_vars': 'propagate_uselib_vars',
'exec_rule': 'process_rule'
}
def after(*k):
for key, val in repl.items():
if key in k:
if Logs.verbose > 1:
Logs.error('after %s -> %s' % (key, val))
k.replace(key, val)
return TaskGen.after_method(*k)
def before(*k):
for key, val in repl.items():
if key in k:
if Logs.verbose > 1:
Logs.info('before %s -> %s' % (key, val))
k.replace(key, val)
return TaskGen.before_method(*k)
TaskGen.before = before