def method_missing(method, *args)
      if @builders.has_key?(method.to_s)
        target, sources, vars, *rest = args
        vars ||= {}
        unless vars.is_a?(Hash) or vars.is_a?(VarSet)
          raise "Unexpected construction variable set: #{vars.inspect}"
        end
        builder = @builders[method.to_s]
        target = expand_path(expand_varref(target))
        sources = Array(sources).map do |source|
          expand_path(expand_varref(source))
        end.flatten
        build_target = builder.create_build_target(env: self, target: target, sources: sources, vars: vars)
        add_target(build_target.to_s, builder, sources, vars, rest)
        build_target
      else
        super
      end
    end
def method_missing(method, *args)
      if @builders.has_key?(method.to_s)
        target, sources, vars, *rest = args
        vars ||= {}
        unless vars.is_a?(Hash) or vars.is_a?(VarSet)
          raise "Unexpected construction variable set: #{vars.inspect}"
        end
        builder = @builders[method.to_s]
        target = expand_path(expand_varref(target))
        sources = Array(sources).map do |source|
          expand_path(expand_varref(source))
        end.flatten
        build_target = builder.create_build_target(env: self, target: target, sources: sources, vars: vars)
        add_target(build_target.to_s, builder, sources, vars, rest)
        build_target
      else
        super
      end
    end
Define a build target.

 @param method [Symbol] Method name.
 @param args [Array] Method arguments.

 @return [BuildTarget]
   The {BuildTarget} object registered, if the method called is a
   {Builder}.