Drop support for 5-argument form of Builder#run - #84

This commit is contained in:
josh committed 2019-02-10 21:47:34 -05:00
1 parent b41a368da1
commit 7992450383
12 files changed
+36 -93

No files matched your search

+3 -3
View File
@@ -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
+3 -3
View File
@@ -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
+4 -4
View File
@@ -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)