Rework builder interface to only use #run method - close #91

The builder's #run method will be called repeatedly until it returns
true or false. The Builder#wait_for method can be used to cause a
builder to wait for a Thread, Command, or another Builder.
This commit is contained in:
josh committed 2019-02-17 22:08:39 -05:00
1 parent 8426a54a57
commit b882f8de99
38 files changed
+580 -665

No files matched your search

+8 -8
View File
@@ -1,16 +1,16 @@
class StrictBuilder < Rscons::Builder
def run(options)
command = %W[gcc -o #{@target}] + @sources.sort
if @cache.up_to_date?(@target, command, @sources, @env, strict_deps: true)
@target
if @command
finalize_command
else
ThreadedCommand.new(command, short_description: "#{name} #{@target}")
@command = %W[gcc -o #{@target}] + @sources.sort
if @cache.up_to_date?(@target, @command, @sources, @env, strict_deps: true)
true
else
register_command("#{name} #{@target}", @command)
end
end
end
def finalize(options)
standard_finalize(options)
end
end
build do