Class: Shog::GenerateBuild
Instance Attribute Summary collapse
-
#deps ⇒ Object
Returns the value of attribute deps.
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize ⇒ GenerateBuild
constructor
A new instance of GenerateBuild.
- #rule ⇒ Object
- #target(params) ⇒ Object
Constructor Details
#initialize ⇒ GenerateBuild
Returns a new instance of GenerateBuild.
11 12 13 |
# File 'lib/rule/generate_build.rb', line 11 def initialize @deps = PathSet.new end |
Instance Attribute Details
#deps ⇒ Object
Returns the value of attribute deps.
5 6 7 |
# File 'lib/rule/generate_build.rb', line 5 def deps @deps end |
Instance Method Details
#id ⇒ Object
7 8 9 |
# File 'lib/rule/generate_build.rb', line 7 def id :generate_build end |
#rule ⇒ Object
15 16 17 18 19 20 |
# File 'lib/rule/generate_build.rb', line 15 def rule { "command" => "cd .. && (shog generate || rm out/build.ninja)", "description" => "Generate Build Script", } end |
#target(params) ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/rule/generate_build.rb', line 22 def target(params) output = PathSet.new output << Path.make("build.ninja", :outoftree => true, :root => true) variables = { "generator" => "1", } input = PathSet.new(params[:input]) input += @deps {:rule => "generate_build", :input => input, :output => output, :variables => variables} end |