parameters: (ctx, kw)
docstring: Load all settings from the additional_settings parameter, and store them in a lookup map
docstring_summary: Load all settings from the additional_settings parameter, and store them in a lookup map
docstring_tokens: Load all settings from the additional_settings parameter and store them in a lookup map
function: def LoadAdditionalFileSettings(ctx, kw):
      """
      Load all settings from the additional_settings parameter, and store them in a lookup map
      """
      append_kw_entry(kw,'features',[ 'apply_additional_settings' ])
      kw['file_specifc_settings'] = {}
  
      for setting in kw['additional_settings']:
  
          setting['target'] = kw['target'] # reuse target name
  
          file_list = []
  
          if 'file_list' in setting:
              # Option A: The files are specifed as a *.waf_files (which is loaded already)
              for list in setting['file_list']:
                  file_list += kw['file_list_to_source'][list]
  
          if 'files' in setting:
              # Option B: The files are already specified as an list
              file_list += setting['files']
  
          if 'regex' in setting:
              # Option C: A regex is specifed to match the files
              p = re.compile(setting['regex'])
  
              for file in kw['source']:
                  file_abs = file.abspath() if isinstance(file, Node.Node) else file
                  if p.match(file_abs):
                      file_list += [file]
  
          # insert files into lookup dictonary, but make sure no uber file and no file within an uber file is specified
          uber_file_folder = ctx.bldnode.make_node('..')
          uber_file_folder = uber_file_folder.make_node('uber_files')
          uber_file_folder = uber_file_folder.make_node(kw['target'])
  
          for file in file_list:
              if isinstance(file, Node.Node):
                  file_abspath = file.abspath()
              elif os.path.isabs(file):
                  file_abspath = file
              else:
                  file_abspath = ctx.path.make_node(file).abspath()
  
              if 'uber_file_lookup' in kw:
                  for uber_file in kw['uber_file_lookup']:
  
                      # Uber files are not allowed for additional settings
                      if file_abspath == uber_file:
                          ctx.cry_file_error("Additional File Settings are not supported for UberFiles (%s) to ensure a consistent behavior without UberFiles, please adjust your setup" % file, ctx.path.make_node('wscript').abspath())
  
                      for entry in kw['uber_file_lookup'][uber_file]:
                          if file_abspath == entry.abspath():
                              ctx.cry_file_error("Additional File Settings are not supported for file using UberFiles (%s) to ensure a consistent behavior without UberFiles, please adjust your setup" % file, ctx.path.make_node('wscript').abspath())
  
              # All fine, add file name to dictonary
              kw['file_specifc_settings'][file_abspath] = setting
              setting['source'] = []
function_tokens: def LoadAdditionalFileSettings ( ctx , kw ) : append_kw_entry ( kw , 'features' , [ 'apply_additional_settings' ] ) kw [ 'file_specifc_settings' ] = { } for setting in kw [ 'additional_settings' ] : setting [ 'target' ] = kw [ 'target' ] # reuse target name file_list = [ ] if 'file_list' in setting : # Option A: The files are specifed as a *.waf_files (which is loaded already) for list in setting [ 'file_list' ] : file_list += kw [ 'file_list_to_source' ] [ list ] if 'files' in setting : # Option B: The files are already specified as an list file_list += setting [ 'files' ] if 'regex' in setting : # Option C: A regex is specifed to match the files p = re . compile ( setting [ 'regex' ] ) for file in kw [ 'source' ] : file_abs = file . abspath ( ) if isinstance ( file , Node . Node ) else file if p . match ( file_abs ) : file_list += [ file ] # insert files into lookup dictonary, but make sure no uber file and no file within an uber file is specified uber_file_folder = ctx . bldnode . make_node ( '..' ) uber_file_folder = uber_file_folder . make_node ( 'uber_files' ) uber_file_folder = uber_file_folder . make_node ( kw [ 'target' ] ) for file in file_list : if isinstance ( file , Node . Node ) : file_abspath = file . abspath ( ) elif os . path . isabs ( file ) : file_abspath = file else : file_abspath = ctx . path . make_node ( file ) . abspath ( ) if 'uber_file_lookup' in kw : for uber_file in kw [ 'uber_file_lookup' ] : # Uber files are not allowed for additional settings if file_abspath == uber_file : ctx . cry_file_error ( "Additional File Settings are not supported for UberFiles (%s) to ensure a consistent behavior without UberFiles, please adjust your setup" % file , ctx . path . make_node ( 'wscript' ) . abspath ( ) ) for entry in kw [ 'uber_file_lookup' ] [ uber_file ] : if file_abspath == entry . abspath ( ) : ctx . cry_file_error ( "Additional File Settings are not supported for file using UberFiles (%s) to ensure a consistent behavior without UberFiles, please adjust your setup" % file , ctx . path . make_node ( 'wscript' ) . abspath ( ) ) # All fine, add file name to dictonary kw [ 'file_specifc_settings' ] [ file_abspath ] = setting setting [ 'source' ] = [ ]