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.
Constant Summary collapse
- SPACE_MARK =
"__ __"
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.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/rake/loaders/makefile.rb', line 10 def load(fn) open(fn) do |mf| lines = mf.read lines.gsub!(/\\ /, SPACE_MARK) lines.gsub!(/#[^\n]*\n/m, "") lines.gsub!(/\\\n/, ' ') lines.split("\n").each do |line| process_line(line) end end end |