#NEWLINE# @ feature ( 'cc' , 'cxx' ) #NEWLINE# @ after ( 'apply_link' , 'init_cc' , 'init_cxx' , 'apply_core' ) #NEWLINE# def apply_lib_vars( self ) : #NEWLINE# #INDENT# "after apply_link because of 'link_task'\n\tafter default_cc because of the attribute 'uselib'" #NEWLINE# env = self . env #NEWLINE# self . uselib = self . to_list ( self . uselib ) #NEWLINE# names = self . to_list ( self . uselib_local ) #NEWLINE# seen = set ( [ ] ) #NEWLINE# tmp = Utils . deque ( names ) #NEWLINE# while tmp : #NEWLINE# #INDENT# lib_name = tmp . popleft ( ) #NEWLINE# if ( lib_name in seen ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# y = self . name_to_obj ( lib_name ) #NEWLINE# if ( not y ) : #NEWLINE# #INDENT# raise Utils . WafError ( ( 'object %r was not found in uselib_local (required by %r)' % ( lib_name , self . name ) ) ) #NEWLINE# #UNINDENT# y . post ( ) #NEWLINE# seen . add ( lib_name ) #NEWLINE# if getattr ( y , 'uselib_local' , None ) : #NEWLINE# #INDENT# lst = y . to_list ( y . uselib_local ) #NEWLINE# if ( ( 'cshlib' in y . features ) or ( 'cprogram' in y . features ) ) : #NEWLINE# #INDENT# lst = [ x for x in lst if ( not ( 'cstaticlib' in self . name_to_obj ( x ) . features ) ) ] #NEWLINE# #UNINDENT# tmp . extend ( lst ) #NEWLINE# #UNINDENT# if getattr ( y , 'link_task' , None ) : #NEWLINE# #INDENT# link_name = y . target [ ( y . target . rfind ( os . sep ) + 1 ) : ] #NEWLINE# if ( 'cstaticlib' in y . features ) : #NEWLINE# #INDENT# env . append_value ( 'STATICLIB' , link_name ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( 'cshlib' in y . features ) or ( 'cprogram' in y . features ) ) : #NEWLINE# #INDENT# env . append_value ( 'LIB' , link_name ) #NEWLINE# #UNINDENT# #UNINDENT# self . link_task . set_run_after ( y . link_task ) #NEWLINE# dep_nodes = getattr ( self . link_task , 'dep_nodes' , [ ] ) #NEWLINE# self . link_task . dep_nodes = ( dep_nodes + y . link_task . outputs ) #NEWLINE# tmp_path = y . link_task . outputs [ 0 ] . parent . bldpath ( self . env ) #NEWLINE# if ( not ( tmp_path in env [ 'LIBPATH' ] ) ) : #NEWLINE# #INDENT# env . prepend_value ( 'LIBPATH' , tmp_path ) #NEWLINE# #UNINDENT# #UNINDENT# for v in self . to_list ( y . uselib ) : #NEWLINE# #INDENT# if ( not env [ ( 'STATICLIB_' + v ) ] ) : #NEWLINE# #INDENT# if ( not ( v in self . uselib ) ) : #NEWLINE# #INDENT# self . uselib . insert ( 0 , v ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if getattr ( y , 'export_incdirs' , None ) : #NEWLINE# #INDENT# for x in self . to_list ( y . export_incdirs ) : #NEWLINE# #INDENT# node = y . path . find_dir ( x ) #NEWLINE# if ( not node ) : #NEWLINE# #INDENT# raise Utils . WafError ( ( 'object %r: invalid folder %r in export_incdirs' % ( y . target , x ) ) ) #NEWLINE# #UNINDENT# self . env . append_unique ( 'INC_PATHS' , node ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# for x in self . uselib : #NEWLINE# #INDENT# for v in self . p_flag_vars : #NEWLINE# #INDENT# val = self . env [ ( ( v + '_' ) + x ) ] #NEWLINE# if tmp_path : #NEWLINE# #INDENT# self . env . append_value ( v , val )