use Builder instance variables as much as possible in #finalize
This commit is contained in:
parent
33504f586b
commit
016bf5eac7
@ -93,8 +93,6 @@ module Rscons
|
||||
end.first
|
||||
command = @env.build_command("${#{com_prefix}CMD}", @vars)
|
||||
@env.produces(@target, @vars["_DEPFILE"])
|
||||
# Store vars back into options so new keys are accessible in #finalize.
|
||||
options[:vars] = vars
|
||||
standard_threaded_build("#{com_prefix} #{@target}", @target, command, @sources, @env, @cache)
|
||||
end
|
||||
|
||||
@ -106,12 +104,12 @@ module Rscons
|
||||
# Name of the target file on success or nil on failure.
|
||||
def finalize(options)
|
||||
if options[:command_status]
|
||||
target, deps, cache, env, vars = options.values_at(:target, :sources, :cache, :env, :vars)
|
||||
if File.exists?(vars['_DEPFILE'])
|
||||
deps += Util.parse_makefile_deps(vars['_DEPFILE'])
|
||||
deps = @sources
|
||||
if File.exists?(@vars['_DEPFILE'])
|
||||
deps += Util.parse_makefile_deps(@vars['_DEPFILE'])
|
||||
end
|
||||
cache.register_build(target, options[:tc].command, deps.uniq, env)
|
||||
target
|
||||
@cache.register_build(@target, options[:tc].command, deps.uniq, @env)
|
||||
@target
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -33,8 +33,6 @@ module Rscons
|
||||
@vars["_DEPFILE"] = Rscons.set_suffix(target, env.expand_varref("${DEPFILESUFFIX}", vars))
|
||||
command = @env.build_command("${CPP_CMD}", @vars)
|
||||
@env.produces(@target, @vars["_DEPFILE"])
|
||||
# Store vars back into options so new keys are accessible in #finalize.
|
||||
options[:vars] = vars
|
||||
standard_threaded_build("#{name} #{@target}", @target, command, @sources, @env, @cache)
|
||||
end
|
||||
|
||||
@ -46,12 +44,12 @@ module Rscons
|
||||
# Name of the target file on success or nil on failure.
|
||||
def finalize(options)
|
||||
if options[:command_status]
|
||||
target, deps, cache, env, vars = options.values_at(:target, :sources, :cache, :env, :vars)
|
||||
if File.exists?(vars['_DEPFILE'])
|
||||
deps += Util.parse_makefile_deps(vars['_DEPFILE'])
|
||||
deps = @sources
|
||||
if File.exists?(@vars['_DEPFILE'])
|
||||
deps += Util.parse_makefile_deps(@vars['_DEPFILE'])
|
||||
end
|
||||
cache.register_build(target, options[:tc].command, deps.uniq, env)
|
||||
target
|
||||
@cache.register_build(@target, options[:tc].command, deps.uniq, @env)
|
||||
@target
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -78,8 +78,6 @@ module Rscons
|
||||
end.first
|
||||
command = @env.build_command("${#{com_prefix}CMD}", @vars)
|
||||
@env.produces(@target, @vars["_DEPFILE"])
|
||||
# Store vars back into options so new keys are accessible in #finalize.
|
||||
options[:vars] = @vars
|
||||
standard_threaded_build("#{com_prefix} #{@target}", @target, command, @sources, @env, @cache)
|
||||
end
|
||||
|
||||
@ -91,12 +89,12 @@ module Rscons
|
||||
# Name of the target file on success or nil on failure.
|
||||
def finalize(options)
|
||||
if options[:command_status]
|
||||
target, deps, cache, env, vars = options.values_at(:target, :sources, :cache, :env, :vars)
|
||||
if File.exists?(vars['_DEPFILE'])
|
||||
deps += Util.parse_makefile_deps(vars['_DEPFILE'])
|
||||
deps = @sources
|
||||
if File.exists?(@vars['_DEPFILE'])
|
||||
deps += Util.parse_makefile_deps(@vars['_DEPFILE'])
|
||||
end
|
||||
cache.register_build(target, options[:tc].command, deps.uniq, env)
|
||||
target
|
||||
@cache.register_build(@target, options[:tc].command, deps.uniq, @env)
|
||||
@target
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user