#NEWLINE# def _calculate_sources( self , target ) : #NEWLINE# #INDENT# gentargets = OrderedSet ( ) #NEWLINE# def add_to_gentargets( target ) : #NEWLINE# #INDENT# if self . is_gentarget ( target ) : #NEWLINE# #INDENT# gentargets . add ( target ) #NEWLINE# #UNINDENT# #UNINDENT# self . context . build_graph . walk_transitive_dependency_graph ( [ target . address ] , add_to_gentargets , postorder = True ) #NEWLINE# sources_by_base = OrderedDict ( ) #NEWLINE# for target in gentargets : #NEWLINE# #INDENT# base = target . target_base #NEWLINE# if ( base not in sources_by_base ) : #NEWLINE# #INDENT# sources_by_base [ base ] = OrderedSet ( ) #NEWLINE# #UNINDENT# sources_by_base [ base ] . update ( target . sources_relative_to_buildroot ( ) ) #NEWLINE# #UNINDENT# return sources_by_base