Parent

Included Modules

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 12
12:     def load(fn)
13:       open(fn) do |mf|
14:         lines = mf.read
15:         lines.gsub!(/\\ /, SPACE_MARK)
16:         lines.gsub!(/#[^\n]*\n/, "")
17:         lines.gsub!(/\\\n/, ' ')
18:         lines.split("\n").each do |line|
19:           process_line(line)
20:         end
21:       end
22:     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 27
27:     def process_line(line)
28:       file_tasks, args = line.split(':')
29:       return if args.nil?
30:       dependents = args.split.map { |d| respace(d) }
31:       file_tasks.strip.split.each do |file_task|
32:         file_task = respace(file_task)
33:         file file_task => dependents
34:       end
35:     end
respace(str) click to toggle source
    # File lib/rake/loaders/makefile.rb, line 37
37:     def respace(str)
38:       str.gsub(/#{SPACE_MARK}/, ' ')
39:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.