shortcut all of Environment#process if @targets is empty
This commit is contained in:
parent
8be1842cf8
commit
ddf00d08a7
@ -171,12 +171,11 @@ module Rscons
|
|||||||
# When a block is passed to Environment.new, this method is automatically
|
# When a block is passed to Environment.new, this method is automatically
|
||||||
# called after the block returns.
|
# called after the block returns.
|
||||||
def process
|
def process
|
||||||
|
unless @targets.empty?
|
||||||
clean_target_paths!
|
clean_target_paths!
|
||||||
cache = Cache.instance
|
cache = Cache.instance
|
||||||
cache.clear_checksum_cache!
|
cache.clear_checksum_cache!
|
||||||
targets_processed = {}
|
targets_processed = {}
|
||||||
unless @targets.empty?
|
|
||||||
begin
|
|
||||||
process_target = proc do |target|
|
process_target = proc do |target|
|
||||||
targets_processed[target] ||= begin
|
targets_processed[target] ||= begin
|
||||||
@targets[target][:sources].each do |src|
|
@targets[target][:sources].each do |src|
|
||||||
@ -195,6 +194,7 @@ module Rscons
|
|||||||
result
|
result
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
begin
|
||||||
@targets.each do |target, target_params|
|
@targets.each do |target, target_params|
|
||||||
process_target.call(target)
|
process_target.call(target)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user