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

15 lines
406 B
Ruby

class MyObject < Rscons::Builder
def run(options)
target, sources, cache, env, vars = options.values_at(:target, :sources, :cache, :env, :vars)
env.run_builder(env.builders["Object"], target, sources, cache, vars)
end
end
build do
Rscons::Environment.new do |env|
env.add_builder(MyObject.new)
env.MyObject("simple.o", "simple.c")
env.Program("simple.exe", "simple.o")
end
end