Class: Rake::MakefileLoader
- Inherits:
-
Object
- Object
- Rake::MakefileLoader
- Defined in:
- lib/rake/loaders/makefile.rb
Overview
Makefile loader to be used with the import file loader.
Instance Method Summary collapse
-
#load(fn) ⇒ Object
Load the makefile dependencies in
fn
.
Instance Method Details
#load(fn) ⇒ Object
Load the makefile dependencies in fn
.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/rake/loaders/makefile.rb', line 9 def load(fn) open(fn) do |mf| lines = mf.read lines.gsub!(/#[^\n]*\n/m, "") lines.gsub!(/\\\n/, ' ') lines.split("\n").each do |line| process_line(line) end end end |