Class: Comet::Rules::Merge
- Inherits:
-
Object
- Object
- Comet::Rules::Merge
- Defined in:
- lib/comet/rules/merge.rb
Instance Method Summary collapse
- #commands ⇒ Object
- #contents ⇒ Object
-
#initialize(dependencies) ⇒ Merge
constructor
A new instance of Merge.
- #rules ⇒ Object
- #target ⇒ Object
Constructor Details
#initialize(dependencies) ⇒ Merge
Returns a new instance of Merge.
4 5 6 |
# File 'lib/comet/rules/merge.rb', line 4 def initialize(dependencies) @dependencies = dependencies end |
Instance Method Details
#commands ⇒ Object
26 27 28 |
# File 'lib/comet/rules/merge.rb', line 26 def commands { COMET_LINK: 'llvm-link' } end |
#contents ⇒ Object
15 16 17 18 19 20 |
# File 'lib/comet/rules/merge.rb', line 15 def contents [ "#{target}: #{@dependencies.map(&:target).uniq.join ' '} | #{Comet::TMPDIR}", "\t#{llvm_link.join ' '} -o $@ $^" ] end |
#rules ⇒ Object
22 23 24 |
# File 'lib/comet/rules/merge.rb', line 22 def rules @dependencies end |
#target ⇒ Object
8 9 10 11 12 13 |
# File 'lib/comet/rules/merge.rb', line 8 def target @target ||= Comet::Makefile.fingerprint Hash[ command: llvm_link, dependencies: Set[@dependencies.map(&:target).uniq] ], extension: :ll end |