parameters: (ctx, kw)
docstring: Util function to ensure file lists are correctly tracked regardless of current target platform
docstring_summary: Util function to ensure file lists are correctly tracked regardless of current target platform
docstring_tokens: Util function to ensure file lists are correctly tracked regardless of current target platform
function: def TrackFileListChanges(ctx, kw):
      """
      Util function to ensure file lists are correctly tracked regardless of current target platform
      """
      def _to_list( value ):
          """ Helper function to ensure a value is always a list """
          if isinstance(value,list):
              return value
          return [ value ]
  
      files_to_track = []
      kw['waf_file_entries'] = []
  
      # Collect all file list entries
      for (key,value) in list(kw.items()):
          if 'file_list' in key:
              files_to_track += _to_list(value)
          # Collect potential file lists from additional options
          if 'additional_settings' in key:
              for settings_container in kw['additional_settings']:
                  for (key2,value2) in list(settings_container.items()):
                      if 'file_list' in key2:
                          files_to_track += _to_list(value2)
  
      # Remove duplicates
      files_to_track = list(set(files_to_track))
  
      # Add results to global lists
      for file in files_to_track:
          file_node = ctx.path.make_node(file)
          append_kw_entry(kw,'waf_file_entries',[ file_node ])
function_tokens: def TrackFileListChanges ( ctx , kw ) : def _to_list ( value ) : """ Helper function to ensure a value is always a list """ if isinstance ( value , list ) : return value return [ value ] files_to_track = [ ] kw [ 'waf_file_entries' ] = [ ] # Collect all file list entries for ( key , value ) in list ( kw . items ( ) ) : if 'file_list' in key : files_to_track += _to_list ( value ) # Collect potential file lists from additional options if 'additional_settings' in key : for settings_container in kw [ 'additional_settings' ] : for ( key2 , value2 ) in list ( settings_container . items ( ) ) : if 'file_list' in key2 : files_to_track += _to_list ( value2 ) # Remove duplicates files_to_track = list ( set ( files_to_track ) ) # Add results to global lists for file in files_to_track : file_node = ctx . path . make_node ( file ) append_kw_entry ( kw , 'waf_file_entries' , [ file_node ] )