Class: Spud::BuildTools::Make::Task
- Inherits:
-
Task
- Object
- Task
- Spud::BuildTools::Make::Task
show all
- Defined in:
- lib/spud/build_tools/make/task.rb
Instance Attribute Summary
Attributes inherited from Task
#filename, #name
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Task
#args, #initialize
Class Method Details
.mount! ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/spud/build_tools/make/task.rb', line 7
def self.mount!
return unless File.exist?('Makefile')
if `command -v make`.empty?
puts 'Makefile detected, but no installation of `make` exists. Skipping make...'
return
end
source = File.read('Makefile')
source.scan(/^(\S+):.*/).map(&:first).each do |name|
new(name: name, filename: 'Makefile')
end
end
|
Instance Method Details
#invoke ⇒ Object
21
22
23
|
# File 'lib/spud/build_tools/make/task.rb', line 21
def invoke(*)
system('make', name)
end
|