# Path: waflib/TaskGen.py
# def feature(*k):
# 	"""
# 	Decorator that registers a task generator method that will be executed when the
# 	object attribute ``feature`` contains the corresponding key(s)::
# 
# 		from waflib.Task import feature
# 		@feature('myfeature')
# 		def myfunction(self):
# 			print('that is my feature!')
# 		def build(bld):
# 			bld(features='myfeature')
# 
# 	:param k: feature names
# 	:type k: list of string
# 	"""
# 	def deco(func):
# 		setattr(task_gen, func.__name__, func)
# 		for name in k:
# 			feats[name].update([func.__name__])
# 		return func
# 	return deco
# 
# def after_method(*k):
# 	"""
# 	Decorator that registers a task generator method which will be executed
# 	after the functions of given name(s)::
# 
# 		from waflib.TaskGen import feature, after
# 		@feature('myfeature')
# 		@after_method('fun2')
# 		def fun1(self):
# 			print('feature 1!')
# 		@feature('myfeature')
# 		def fun2(self):
# 			print('feature 2!')
# 		def build(bld):
# 			bld(features='myfeature')
# 
# 	:param k: method names
# 	:type k: list of string
# 	"""
# 	def deco(func):
# 		setattr(task_gen, func.__name__, func)
# 		for fun_name in k:
# 			task_gen.prec[fun_name].add(func.__name__)
# 		return func
# 	return deco
# 
# def taskgen_method(func):
# 	"""
# 	Decorator that registers method as a task generator method.
# 	The function must accept a task generator as first parameter::
# 
# 		from waflib.TaskGen import taskgen_method
# 		@taskgen_method
# 		def mymethod(self):
# 			pass
# 
# 	:param func: task generator method to add
# 	:type func: function
# 	:rtype: function
# 	"""
# 	setattr(task_gen, func.__name__, func)
# 	return func
# 
# Path: waflib/Tools/ccroot.py
# SYSTEM_LIB_PATHS = ['/usr/lib64', '/usr/lib', '/usr/local/lib64', '/usr/local/lib']
# USELIB_VARS = Utils.defaultdict(set)
# def create_compiled_task(self, name, node):
# def to_incnodes(self, inlst):
# def apply_incpaths(self):
# 	def add_target(self, target):
# 	def exec_command(self, *k, **kw):
# 	def exec_mf(self):
# def rm_tgt(cls):
# 	def wrap(self):
# def apply_skip_stlib_link_deps(self):
# def apply_link(self):
# def use_rec(self, name, **kw):
# def process_use(self):
# def accept_node_to_link(self, node):
# def add_objects_from_tgen(self, tg):
# def get_uselib_vars(self):
# def propagate_uselib_vars(self):
# def apply_implib(self):
# def apply_vnum(self):
# 	def keyword(self):
# 	def run(self):
# 	def runnable_status(self):
# 	def runnable_status(self):
# def read_shlib(self, name, paths=[], export_includes=[], export_defines=[]):
# def read_stlib(self, name, paths=[], export_includes=[], export_defines=[]):
# def process_lib(self):
# 	def runnable_status(self):
# def add_those_o_files(self, node):
# def process_objs(self):
# def read_object(self, obj):
# def set_full_paths_hpux(self):
# class link_task(Task.Task):
# class stlink_task(link_task):
# class vnum(Task.Task):
# class fake_shlib(link_task):
# class fake_stlib(stlink_task):
# class fake_o(Task.Task):


import os, shlex, sys
from waflib.TaskGen import feature, after_method, taskgen_method
from waflib import Utils, Task, Logs, Options
from waflib.Tools import ccroot

	self.handle_ut_cwd('ut_cwd')

	if not hasattr(self, 'ut_paths'):
		paths = []
		for x in self.tmp_use_sorted:
			try:
				y = self.bld.get_tgen_by_name(x).link_task
			except AttributeError:
				pass
			else:
				if not isinstance(y, ccroot.stlink_task):
					paths.append(y.outputs[0].parent.abspath())
		self.ut_paths = os.pathsep.join(paths) + os.pathsep

	if not hasattr(self, 'ut_env'):
		self.ut_env = dct = dict(os.environ)
		def add_path(var):
			dct[var] = self.ut_paths + dct.get(var,'')
		if Utils.is_win32:
			add_path('PATH')
		elif Utils.unversioned_sys_platform() == 'darwin':
			add_path('DYLD_LIBRARY_PATH')
			add_path('LD_LIBRARY_PATH')
		else:
			add_path('LD_LIBRARY_PATH')

	if not hasattr(self, 'ut_cmd'):
		self.ut_cmd = getattr(Options.options, 'testcmd', False)


# Path: waflib/TaskGen.py
# def feature(*k):
# 	"""
# 	Decorator that registers a task generator method that will be executed when the
# 	object attribute ``feature`` contains the corresponding key(s)::
# 
# 		from waflib.Task import feature
# 		@feature('myfeature')
# 		def myfunction(self):
# 			print('that is my feature!')
# 		def build(bld):
# 			bld(features='myfeature')
# 
# 	:param k: feature names
# 	:type k: list of string
# 	"""
# 	def deco(func):
# 		setattr(task_gen, func.__name__, func)
# 		for name in k:
# 			feats[name].update([func.__name__])
# 		return func
# 	return deco
# 
# def after_method(*k):
# 	"""
# 	Decorator that registers a task generator method which will be executed
# 	after the functions of given name(s)::
# 
# 		from waflib.TaskGen import feature, after
# 		@feature('myfeature')
# 		@after_method('fun2')
# 		def fun1(self):
# 			print('feature 1!')
# 		@feature('myfeature')
# 		def fun2(self):
# 			print('feature 2!')
# 		def build(bld):
# 			bld(features='myfeature')
# 
# 	:param k: method names
# 	:type k: list of string
# 	"""
# 	def deco(func):
# 		setattr(task_gen, func.__name__, func)
# 		for fun_name in k:
# 			task_gen.prec[fun_name].add(func.__name__)
# 		return func
# 	return deco
# 
# def taskgen_method(func):
# 	"""
# 	Decorator that registers method as a task generator method.
# 	The function must accept a task generator as first parameter::
# 
# 		from waflib.TaskGen import taskgen_method
# 		@taskgen_method
# 		def mymethod(self):
# 			pass
# 
# 	:param func: task generator method to add
# 	:type func: function
# 	:rtype: function
# 	"""
# 	setattr(task_gen, func.__name__, func)
# 	return func
# 
# Path: waflib/Tools/ccroot.py
# SYSTEM_LIB_PATHS = ['/usr/lib64', '/usr/lib', '/usr/local/lib64', '/usr/local/lib']
# USELIB_VARS = Utils.defaultdict(set)
# def create_compiled_task(self, name, node):
# def to_incnodes(self, inlst):
# def apply_incpaths(self):
# 	def add_target(self, target):
# 	def exec_command(self, *k, **kw):
# 	def exec_mf(self):
# def rm_tgt(cls):
# 	def wrap(self):
# def apply_skip_stlib_link_deps(self):
# def apply_link(self):
# def use_rec(self, name, **kw):
# def process_use(self):
# def accept_node_to_link(self, node):
# def add_objects_from_tgen(self, tg):
# def get_uselib_vars(self):
# def propagate_uselib_vars(self):
# def apply_implib(self):
# def apply_vnum(self):
# 	def keyword(self):
# 	def run(self):
# 	def runnable_status(self):
# 	def runnable_status(self):
# def read_shlib(self, name, paths=[], export_includes=[], export_defines=[]):
# def read_stlib(self, name, paths=[], export_includes=[], export_defines=[]):
# def process_lib(self):
# 	def runnable_status(self):
# def add_those_o_files(self, node):
# def process_objs(self):
# def read_object(self, obj):
# def set_full_paths_hpux(self):
# class link_task(Task.Task):
# class stlink_task(link_task):
# class vnum(Task.Task):
# class fake_shlib(link_task):
# class fake_stlib(stlink_task):
# class fake_o(Task.Task):


# Path: waflib/Tools/waf_unit_test.py
import os, shlex, sys
from waflib.TaskGen import feature, after_method, taskgen_method
from waflib import Utils, Task, Logs, Options
from waflib.Tools import ccroot


	self.handle_ut_cwd('ut_cwd')

	if not hasattr(self, 'ut_paths'):
		paths = []
		for x in self.tmp_use_sorted:
			try:
				y = self.bld.get_tgen_by_name(x).link_task
			except AttributeError:
				pass
			else:
				if not isinstance(y, ccroot.stlink_task):
					paths.append(y.outputs[0].parent.abspath())
		self.ut_paths = os.pathsep.join(paths) + os.pathsep

	if not hasattr(self, 'ut_env'):
		self.ut_env = dct = dict(os.environ)
		def add_path(var):
			dct[var] = self.ut_paths + dct.get(var,'')
		if Utils.is_win32:
			add_path('PATH')
		elif Utils.unversioned_sys_platform() == 'darwin':
			add_path('DYLD_LIBRARY_PATH')
			add_path('LD_LIBRARY_PATH')
		else:
			add_path('LD_LIBRARY_PATH')

	if not hasattr(self, 'ut_cmd'):
		self.ut_cmd = getattr(Options.options, 'testcmd', False)


@taskgen_method