def add_builder(builder, &action)
      if not builder.is_a? Rscons::Builder
        builder = Rscons::Builders::SimpleBuilder.new(builder, &action)
      end
      @builders[builder.name] = builder
      var_defs = builder.default_variables(self)
      if var_defs
        var_defs.each_pair do |var, val|
          @varset[var] ||= val
        end
      end
    end
def add_builder(builder, &action)
      if not builder.is_a? Rscons::Builder
        builder = Rscons::Builders::SimpleBuilder.new(builder, &action)
      end
      @builders[builder.name] = builder
      var_defs = builder.default_variables(self)
      if var_defs
        var_defs.each_pair do |var, val|
          @varset[var] ||= val
        end
      end
    end
Create an Environment object.

 @param options [Hash]
 @option options [Symbol] :echo
   :command, :short, or :off (default :short)
 @option options [String] :build_root
   Build root directory (default "build")
 @option options [Boolean] :exclude_builders
   Whether to omit adding default builders (default false)

 If a block is given, the Environment object is yielded to the block and
 when the block returns, the {#process} method is automatically called.
 Make a copy of the Environment object.

 By default, a cloned environment will contain a copy of all environment
 options, construction variables, and builders, but not a copy of the
 targets, build hooks, build directories, or the build root.

 Exactly which items are cloned are controllable via the optional :clone
 parameter, which can be :none, :all, or a set or array of any of the
 following:
 - :variables to clone construction variables (on by default)
 - :builders to clone the builders (on by default)
 - :build_root to clone the build root (on by default)
 - :build_dirs to clone the build directories (on by default)
 - :build_hooks to clone the build hooks (on by default)

 If a block is given, the Environment object is yielded to the block and
 when the block returns, the {#process} method is automatically called.

 Any options that #initialize receives can also be specified here.

 @return [Environment] The newly created {Environment} object.
 Add a {Builder} object to the Environment.

 @overload add_builder(builder)

   Add the given builder to the Environment.

   @param builder [Builder] An instance of the builder to register.

 @overload add_builder(builder,&action)

   Create a new {Builders::SimpleBuilder} instance and add it to the
   environment.

   @since 1.8.0

   @param builder [String,Symbol]
     The name of the builder to add.

   @param action [Block]
     A block that will be called when the builder is executed to generate
     a target file. The provided block should have the same prototype as
     {Rscons::Builder#run}.

 @return [void]