diff --git a/TODO b/TODO index 3600c3fd..848bfcaa 100644 --- a/TODO +++ b/TODO @@ -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 diff --git a/waflib/extras/compat15.py b/waflib/extras/compat15.py index dcb6c0fa..36050f9d 100644 --- a/waflib/extras/compat15.py +++ b/waflib/extras/compat15.py @@ -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 +