From: Nathaniel Talbott > 1.8.3p1 has changed the defaults for the COPY and INSTALL Makefile > macros on Windows from "cp" and "install" to "copy > nul" for both. > This would be fine (and probably work better), except that a lot of > extensions seem to end up providing paths delimited with a "/" to the > COPY and/or INSTALL command, and "copy" on Windows doesn't handle it > properly. For an example, try building and installing > 'win32-semaphore' using 1.8.3p1. I thought it was just bccwin that had this problem because Borland 'make' macros are different from nmake, usually having the trailing path separator present. This patch to lib\mkmf.rb gets my copies through and it should work on mswin & bccwin but I'm not sure if it's suitable for merging. The principle (not my idea, BTW) is: Most Windows paths can take a trailing '.' without altering their meaning. Dir A\B\C. dot ignored Dir A\B\C\. dot refers to current folder A\B\C File A\B\C.txt. trailing dot silently ignored Obvious exception is A\B\C\. to A\B\C\.. (current to parent) So there is a way to append a file name to a directory which may appear in a variety of flavours -- append .\ (dot backslash) first -- as long as it didn't already end with a dot. ============================================================================= --- mkmf_orig.rb Sat May 07 14:58:26 2005 +++ mkmf.rb Mon Jun 06 20:39:48 2005 @@ -1033,6 +1033,7 @@ static: $(STATIC_LIB)#{$extout ? " inst dirs << dir mfile.print "pre-install-rb#{sfx}: #{dir}\n" end + dot = $nmake ? '.' : '' # may follow trailing file sep of path macros files.each do |f| dest = "#{dir}/#{File.basename(f)}" mfile.print("install-rb#{sfx}: #{dest}\n") @@ -1046,7 +1047,7 @@ static: $(STATIC_LIB)#{$extout ? " inst else sep = "" end - mfile.print("#{f} $(@D#{sep})\n") + mfile.print("#{f} $(@D#{sep})#{dot}\n") end end end ============================================================================= daz