Fix regex for dependency file analysis

On msys there are : in the file names, e.g. c:/msys/....
This commit is contained in:
Moritz Bunkus 2010-08-04 22:49:27 +02:00
parent 9823ea3891
commit b8b0739c00

View File

@ -63,7 +63,7 @@ def handle_deps(target, exit_code)
File.open("#{$dependency_dir}/" + dep_file.gsub(/\//, '_').ext('rb'), "w") do |out|
line = IO.readlines(dep_file).collect { |line| line.chomp }.join(" ").gsub(/\\/, ' ').gsub(/\s+/, ' ')
if /(.*):\s*(.*)/.match(line)
if /(.+?):\s*([^\s].*)/.match(line)
target = $1
sources = $2.gsub(/^\s+/, '').gsub(/\s+$/, '').split(/\s+/)