rscons/build_tests/typical/echo_command_string.rb
Josh Holtrop f8e6666a2c Add 'build' DSL method.
Disallow processing Environments until configuration is performed.
2018-12-17 22:14:35 -05:00

16 lines
352 B
Ruby

class MyBuilder < Rscons::Builder
def run(options)
env, target = options.values_at(:env, :target)
env.print_builder_run_message("MyBuilder #{target}", "MyBuilder #{target} command")
target
end
end
build do
Rscons::Environment.new do |env|
env.echo = :command
env.add_builder(MyBuilder.new)
env.MyBuilder("foo")
end
end