[前][次][番号順一覧][スレッド一覧]

ruby-changes:11458

From: shyouhei <ko1@a...>
Date: Fri, 27 Mar 2009 20:07:10 +0900 (JST)
Subject: [ruby-changes:11458] Ruby:r23083 (ruby_1_8_7): merge revision(s) 21749:

shyouhei	2009-03-27 20:06:57 +0900 (Fri, 27 Mar 2009)

  New Revision: 23083

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23083

  Log:
    merge revision(s) 21749:
    * lib/mkmf.rb (mkintpath): new function which converts native path
      to format acceptable in Makefile.
    * lib/mkmf.rb (configuration): convers srcdir, topdir and hdrdir.
      a patch by Alexey Borzenkov <snaury AT gmail.com> at
      [ruby-core:21448].

  Modified files:
    branches/ruby_1_8_7/lib/mkmf.rb
    branches/ruby_1_8_7/version.h

Index: ruby_1_8_7/version.h
===================================================================
--- ruby_1_8_7/version.h	(revision 23082)
+++ ruby_1_8_7/version.h	(revision 23083)
@@ -2,7 +2,7 @@
 #define RUBY_RELEASE_DATE "2009-03-27"
 #define RUBY_VERSION_CODE 187
 #define RUBY_RELEASE_CODE 20090327
-#define RUBY_PATCHLEVEL 154
+#define RUBY_PATCHLEVEL 155
 
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 8
Index: ruby_1_8_7/lib/mkmf.rb
===================================================================
--- ruby_1_8_7/lib/mkmf.rb	(revision 23082)
+++ ruby_1_8_7/lib/mkmf.rb	(revision 23083)
@@ -1233,6 +1233,29 @@
   s.tr('/', '\\')
 end
 
+# Converts native path to format acceptable in Makefile
+#
+# Internal use only.
+#
+if !CROSS_COMPILING
+  case CONFIG['build_os']
+  when 'mingw32'
+    def mkintpath(path)
+      # mingw uses make from msys and it needs special care
+      # converts from C:\some\path to /C/some/path
+      path = path.dup
+      path.tr!('\\', '/')
+      path.sub!(/\A([A-Za-z]):(?=\/)/, '/\1')
+      path
+    end
+  end
+end
+unless defined?(mkintpath)
+  def mkintpath(path)
+    path
+  end
+end
+
 def configuration(srcdir)
   mk = []
   vpath = %w[$(srcdir) $(topdir) $(hdrdir)]
@@ -1255,9 +1278,9 @@
   "top_srcdir = " + $top_srcdir.sub(%r"\A#{Regexp.quote($topdir)}/", "$(topdir)/")
 end
 }
-srcdir = #{srcdir.gsub(/\$\((srcdir)\)|\$\{(srcdir)\}/) {CONFIG[$1||$2]}.quote}
-topdir = #{($extmk ? CONFIG["topdir"] : $topdir).quote}
-hdrdir = #{$extmk ? CONFIG["hdrdir"].quote : '$(topdir)'}
+srcdir = #{srcdir.gsub(/\$\((srcdir)\)|\$\{(srcdir)\}/) {mkintpath(CONFIG[$1||$2])}.quote}
+topdir = #{mkintpath($extmk ? CONFIG["topdir"] : $topdir).quote}
+hdrdir = #{$extmk ? mkintpath(CONFIG["hdrdir"]).quote : '$(topdir)'}
 VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])}
 }
   if $extmk

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]