def register_builds(target, sources, suffixes, vars, options = {})
      options[:features] ||= []
      @registered_build_dependencies[target] ||= Set.new
      sources.map do |source|
        if source.end_with?(*suffixes)
          source
        else
          output_fname = nil
          suffixes.each do |suffix|
            attempt_output_fname = get_build_fname(source, suffix, features: options[:features])
            if builder = find_builder_for(attempt_output_fname, source, options[:features])
              output_fname = attempt_output_fname
              self.__send__(builder.name, output_fname, source, vars)
              @registered_build_dependencies[target] << output_fname
              break
            end
          end
          output_fname or raise "Could not find a builder for #{source.inspect}."
        end
      end
    end
def register_builds(target, sources, suffixes, vars, options = {})
      options[:features] ||= []
      @registered_build_dependencies[target] ||= Set.new
      sources.map do |source|
        if source.end_with?(*suffixes)
          source
        else
          output_fname = nil
          suffixes.each do |suffix|
            attempt_output_fname = get_build_fname(source, suffix, features: options[:features])
            if builder = find_builder_for(attempt_output_fname, source, options[:features])
              output_fname = attempt_output_fname
              self.__send__(builder.name, output_fname, source, vars)
              @registered_build_dependencies[target] << output_fname
              break
            end
          end
          output_fname or raise "Could not find a builder for #{source.inspect}."
        end
      end
    end
Find and register builders to build source files into files containing
 one of the suffixes given by suffixes.

 This method is used internally by Rscons builders. It should be called
 from the builder's #setup method.

 @since 1.10.0

 @param target [String]
   The target that depends on these builds.
 @param sources [Array<String>]
   List of source file(s) to build.
 @param suffixes [Array<String>]
   List of suffixes to try to convert source files into.
 @param vars [Hash]
   Extra variables to pass to the builders.
 @param options [Hash]
   Extra options.
 @option options [Array<String>] :features
   Set of features the builder must provide. Each feature can be proceeded
   by a "-" character to indicate that the builder must /not/ provide the
   given feature.
   * shared - builder builds a shared object/library

 @return [Array<String>]
   List of the output file name(s).