Drop support for 5-argument form of Builder#run - #84
This commit is contained in:
1 parent
b41a368da1
commit
7992450383
12 files changed
+36
-93
No files matched your search
@@ -1,11 +1,11 @@
|
||||
class MySource < Rscons::Builder
|
||||
def run(target, sources, cache, env, vars)
|
||||
File.open(target, 'w') do |fh|
|
||||
def run(options)
|
||||
File.open(@target, 'w') do |fh|
|
||||
fh.puts <<EOF
|
||||
#define THE_VALUE 5678
|
||||
EOF
|
||||
end
|
||||
target
|
||||
@target
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
class MySource < Rscons::Builder
|
||||
def run(target, sources, cache, env, vars)
|
||||
File.open(target, 'w') do |fh|
|
||||
def run(options)
|
||||
File.open(@target, 'w') do |fh|
|
||||
fh.puts <<EOF
|
||||
#define THE_VALUE 678
|
||||
EOF
|
||||
end
|
||||
target
|
||||
@target
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
class MySource < Rscons::Builder
|
||||
def run(target, sources, cache, env, vars)
|
||||
File.open(target, 'w') do |fh|
|
||||
def run(options)
|
||||
File.open(@target, 'w') do |fh|
|
||||
fh.puts <<EOF
|
||||
#define THE_VALUE #{env.expand_varref("${the_value}")}
|
||||
#define THE_VALUE #{@env.expand_varref("${the_value}")}
|
||||
EOF
|
||||
end
|
||||
target
|
||||
@target
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
class CHGen < Rscons::Builder
|
||||
def run(target, sources, cache, env, vars)
|
||||
def run(options)
|
||||
target, sources, cache, env, vars = options.values_at(:target, :sources, :cache, :env, :vars)
|
||||
c_fname = target
|
||||
h_fname = target.sub(/\.c$/, ".h")
|
||||
unless cache.up_to_date?([c_fname, h_fname], "", sources, env)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class TestBuilder < Rscons::Builder
|
||||
def run(target, sources, cache, env, vars)
|
||||
def run(options)
|
||||
target
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
class MyObject < Rscons::Builder
|
||||
def run(target, sources, cache, env, vars)
|
||||
def run(options)
|
||||
target, sources, cache, env, vars = options.values_at(:target, :sources, :cache, :env, :vars)
|
||||
env.run_builder(env.builders["Object"].new(target: target, sources: sources, cache: cache, env: env, vars: vars), target, sources, cache, vars)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user