#NEWLINE# def compile_fun_noshell( name , line ) : #NEWLINE# #INDENT# extr = [ ] #NEWLINE# def repl( match ) : #NEWLINE# #INDENT# g = match . group #NEWLINE# if g ( 'dollar' ) : #NEWLINE# #INDENT# return '$' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if g ( 'subst' ) : #NEWLINE# #INDENT# extr . append ( ( g ( 'var' ) , g ( 'code' ) ) ) #NEWLINE# return '<<|@|>>' #NEWLINE# #UNINDENT# #UNINDENT# return None #NEWLINE# #UNINDENT# line2 = reg_act . sub ( x , line ) #NEWLINE# params = line2 . split ( '<<|@|>>' ) #NEWLINE# buf = [ ] #NEWLINE# dvars = [ ] #NEWLINE# app = buf . append #NEWLINE# for x in range ( len ( extr ) ) : #NEWLINE# #INDENT# params [ x ] = params [ x ] . strip ( ) #NEWLINE# if params [ x ] : #NEWLINE# #INDENT# app ( ( 'lst.extend(%r)' % params [ x ] . split ( ) ) ) #NEWLINE# #UNINDENT# ( var , meth ) = extr [ x ] #NEWLINE# if ( var == 'SRC' ) : #NEWLINE# #INDENT# if meth : #NEWLINE# #INDENT# app ( ( 'lst.append(task.inputs%s)' % meth ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# app ( 'lst.extend([i.path_from(bld_root) for i in task.inputs])' ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( var == 'TGT' ) : #NEWLINE# #INDENT# if meth : #NEWLINE# #INDENT# app ( ( 'lst.append(task.outputs%s)' % meth ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# app ( 'lst.extend([i.path_from(bld_root) for i in task.outputs])' ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# app ( ( 'lst.extend(to_list(env.get(%r, [])))' % var ) ) #NEWLINE# if ( not ( var in dvars ) ) : #NEWLINE# #INDENT# dvars . append ( var ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if params [ ( - 1 ) ] : #NEWLINE# #INDENT# app ( ( 'lst.extend(%r)' % shlex . split ( params [ ( - 1 ) ] ) ) ) #NEWLINE# #UNINDENT# fun = ( COMPILE_TEMPLATE_NOSHELL % '\n\t' . join ( buf ) ) #NEWLINE# return ( funex ( fun ) , dvars )