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:
1 parent
8426a54a57
commit
b882f8de99
38 files changed
+580
-665
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user