add backwards-compatibility test for Builder#standard_build
This commit is contained in:
1 parent
b454208117
commit
83226e894d
2 files changed
+54
-28
No files matched your search
@@ -0,0 +1,17 @@
|
||||
class MyCommand < Rscons::Builder
|
||||
def run(target, sources, cache, env, vars)
|
||||
vars = vars.merge({
|
||||
"_TARGET" => target,
|
||||
"_SOURCES" => sources,
|
||||
})
|
||||
command = env.build_command("${CMD}", vars)
|
||||
cmd_desc = vars["CMD_DESC"] || "MyCommand"
|
||||
standard_build("#{cmd_desc} #{target}", target, command, sources, env, cache)
|
||||
end
|
||||
end
|
||||
|
||||
Rscons::Environment.new do |env|
|
||||
env.add_builder(MyCommand.new)
|
||||
command = %w[gcc -c -o ${_TARGET} ${_SOURCES}]
|
||||
env.MyCommand("simple.o", "simple.c", "CMD" => command)
|
||||
end
|
||||
Reference in new issue
Block a user