Parent

Rake::MakefileLoader

Makefile loader to be used with the import file loader.

Constants

SPACE_MARK

Public Instance Methods

load(fn) click to toggle source

Load the makefile dependencies in fn.

    # File lib/rake/loaders/makefile.rb, line 10
10:     def load(fn)
11:       open(fn) do |mf|
12:         lines = mf.read
13:         lines.gsub!(/\\ /, SPACE_MARK)
14:         lines.gsub!(/#[^\n]*\n/, "")
15:         lines.gsub!(/\\\n/, ' ')
16:         lines.split("\n").each do |line|
17:           process_line(line)
18:         end
19:       end
20:     end

Private Instance Methods

process_line(line) click to toggle source

Process one logical line of makefile data.

    # File lib/rake/loaders/makefile.rb, line 25
25:     def process_line(line)
26:       file_tasks, args = line.split(':')
27:       return if args.nil?
28:       dependents = args.split.map { |d| respace(d) }
29:       file_tasks.strip.split.each do |file_task|
30:         file_task = respace(file_task)
31:         file file_task => dependents
32:       end
33:     end
respace(str) click to toggle source
    # File lib/rake/loaders/makefile.rb, line 35
35:     def respace(str)
36:       str.gsub(/#{SPACE_MARK}/, ' ')
37:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.