本文整理汇总了Python中waflib.TaskGen.taskgen_method方法的典型用法代码示例。如果您正苦于以下问题:Python TaskGen.taskgen_method方法的具体用法?Python TaskGen.taskgen_method怎么用?Python TaskGen.taskgen_method使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类waflib.TaskGen
的用法示例。
在下文中一共展示了TaskGen.taskgen_method方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: add_obj_file
# 需要导入模块: from waflib import TaskGen [as 别名]
# 或者: from waflib.TaskGen import taskgen_method [as 别名]
self.link_task.inputs.append(node)
def add_obj_file(self,file):
if not hasattr(self,'obj_files'):self.obj_files=[]
if not'process_obj_files'in self.meths:self.meths.append('process_obj_files')
self.obj_files.append(file)
old_define=Configure.ConfigurationContext.__dict__['define']
def define(self,key,val,quote=True):
old_define(self,key,val,quote)
if key.startswith('HAVE_'):
self.env[key]=1
old_undefine=Configure.ConfigurationContext.__dict__['undefine']
def undefine(self,key):
old_undefine(self,key)
if key.startswith('HAVE_'):
self.env[key]=0
def set_incdirs(self,val):
Logs.warn('compat: change "export_incdirs" by "export_includes"')
self.export_includes=val
TaskGen.task_gen.export_incdirs=property(None,set_incdirs)
TaskGen.feature('d')(old_importpaths)
TaskGen.before('apply_incpaths')(old_importpaths)
TaskGen.feature('c','cxx','d')(apply_uselib_local)
TaskGen.before('apply_incpaths','propagate_uselib_vars')(apply_uselib_local)
TaskGen.after('apply_link','process_source')(apply_uselib_local)
TaskGen.feature('cprogram','cxxprogram','cstlib','cxxstlib','cshlib','cxxshlib','dprogram','dstlib','dshlib')(apply_objdeps)
TaskGen.after('apply_link')(apply_objdeps)
TaskGen.after('apply_link')(process_obj_files)
TaskGen.taskgen_method(add_obj_file)
Configure.conf(define)
Configure.conf(undefine)
示例2: after
# 需要导入模块: from waflib import TaskGen [as 别名]
# 或者: from waflib.TaskGen import taskgen_method [as 别名]
def after(*k):
def deco(func):
exclude_taskgen.append(func.__name__)
setattr(task_gen, func.__name__, func)
for fun_name in k:
if not fun_name in task_gen.prec[func.__name__]:
task_gen.prec[func.__name__].append(fun_name)
fix_fun_doc(func)
append_doc(func, 'after', k)
return func
return deco
after.__doc__ = TaskGen.after.__doc__
TaskGen.after = after
# replay existing methods
TaskGen.taskgen_method(TaskGen.to_nodes)
TaskGen.feature('*')(TaskGen.process_source)
TaskGen.feature('*')(TaskGen.process_rule)
TaskGen.before('process_source')(TaskGen.process_rule)
TaskGen.feature('seq')(TaskGen.sequence_order)
TaskGen.extension('.pc.in')(TaskGen.add_pcfile)
TaskGen.feature('subst')(TaskGen.process_subst)
TaskGen.before('process_source','process_rule')(TaskGen.process_subst)
from waflib.Task import Task
Task.__dict__['post_run'].__doc__ = "Update the cache files (executed by threads). Override in subclasses."
from waflib import Configure, Build, Errors
confmeths = []