parameters: (line)
return_statement: return (funex(c), dvars)
docstring: Create a compiled function to execute a process with the shell
  	WARNING: this method may disappear anytime, so use compile_fun instead
docstring_summary: Create a compiled function to execute a process with the shell
  	WARNING: this method may disappear anytime, so use compile_fun instead
docstring_tokens: Create a compiled function to execute a process with the shell WARNING : this method may disappear anytime so use compile_fun instead
function: def compile_fun_shell(line):
  	"""
  	Create a compiled function to execute a process with the shell
  	WARNING: this method may disappear anytime, so use compile_fun instead
  	"""
  
  	extr = []
  	def repl(match):
  		g = match.group
  		if g('dollar'): return "$"
  		elif g('backslash'): return '\\\\'
  		elif g('subst'): extr.append((g('var'), g('code'))); return "%s"
  		return None
  
  	line = reg_act.sub(repl, line) or line
  
  	parm = []
  	dvars = []
  	app = parm.append
  	for (var, meth) in extr:
  		if var == 'SRC':
  			if meth: app('tsk.inputs%s' % meth)
  			else: app('" ".join([a.path_from(bld.bldnode) for a in tsk.inputs])')
  		elif var == 'ABS_SRC':
  			if meth: app('tsk.inputs%s' % meth)
  			else: app('" ".join([\'"{}"\'.format(a.abspath()) for a in tsk.inputs])')
  		elif var == 'TGT':
  			if meth: app('tsk.outputs%s' % meth)
  			else: app('" ".join([a.path_from(bld.bldnode) for a in tsk.outputs])')
  		elif meth:
  			if meth.startswith(':'):
  				m = meth[1:]
  				if m == 'SRC':
  					m = '[a.path_from(bld.bldnode) for a in tsk.inputs]'
  				if m == 'ABS_SRC':
  					m = '[a.abspath() for a in tsk.inputs]'
  				elif m == 'TGT':
  					m = '[a.path_from(bld.bldnode) for a in tsk.outputs]'
  				elif m[:3] not in ('tsk', 'gen', 'bld'):
  					dvars.extend([var, meth[1:]])
  					m = '%r' % m
  				app('" ".join(tsk.colon(%r, %s))' % (var, m))
  			else:
  				app('%s%s' % (var, meth))
  		else:
  			if not var in dvars: dvars.append(var)
  			app("p('%s')" % var)
  	if parm: parm = "%% (%s) " % (',\n\t\t'.join(parm))
  	else: parm = ''
  
  	c = COMPILE_TEMPLATE_SHELL % (line, parm)
  
  	Logs.debug('action: %s' % c.strip().splitlines())
  	return (funex(c), dvars)
function_tokens: def compile_fun_shell ( line ) : extr = [ ] def repl ( match ) : g = match . group if g ( 'dollar' ) : return "$" elif g ( 'backslash' ) : return '\\\\' elif g ( 'subst' ) : extr . append ( ( g ( 'var' ) , g ( 'code' ) ) ) return "%s" return None line = reg_act . sub ( repl , line ) or line parm = [ ] dvars = [ ] app = parm . append for ( var , meth ) in extr : if var == 'SRC' : if meth : app ( 'tsk.inputs%s' % meth ) else : app ( '" ".join([a.path_from(bld.bldnode) for a in tsk.inputs])' ) elif var == 'ABS_SRC' : if meth : app ( 'tsk.inputs%s' % meth ) else : app ( '" ".join([\'"{}"\'.format(a.abspath()) for a in tsk.inputs])' ) elif var == 'TGT' : if meth : app ( 'tsk.outputs%s' % meth ) else : app ( '" ".join([a.path_from(bld.bldnode) for a in tsk.outputs])' ) elif meth : if meth . startswith ( ':' ) : m = meth [ 1 : ] if m == 'SRC' : m = '[a.path_from(bld.bldnode) for a in tsk.inputs]' if m == 'ABS_SRC' : m = '[a.abspath() for a in tsk.inputs]' elif m == 'TGT' : m = '[a.path_from(bld.bldnode) for a in tsk.outputs]' elif m [ : 3 ] not in ( 'tsk' , 'gen' , 'bld' ) : dvars . extend ( [ var , meth [ 1 : ] ] ) m = '%r' % m app ( '" ".join(tsk.colon(%r, %s))' % ( var , m ) ) else : app ( '%s%s' % ( var , meth ) ) else : if not var in dvars : dvars . append ( var ) app ( "p('%s')" % var ) if parm : parm = "%% (%s) " % ( ',\n\t\t' . join ( parm ) ) else : parm = '' c = COMPILE_TEMPLATE_SHELL % ( line , parm ) Logs . debug ( 'action: %s' % c . strip ( ) . splitlines ( ) ) return ( funex ( c ) , dvars )