summaryrefslogtreecommitdiff
path: root/lib/mkmf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mkmf.rb')
-rw-r--r--lib/mkmf.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index a4f7e588992..66f1f8a03f0 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -630,7 +630,8 @@ EOMF
dfile = open(depend, "r")
mfile.printf "###\n"
while line = dfile.gets()
- mfile.printf "%s", line.gsub(/\.o\b/, ".#{$OBJEXT}")
+ line.gsub!(/\.o\b/, ".#{$OBJEXT}")
+ mfile.printf "%s", line.gsub(/(\s)([^\s\/]+\.[ch])/, '\1{$(srcdir)}\2') if /nmake/i =~ $make
end
dfile.close
end