diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-27 11:06:21 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-27 11:06:21 +0000 |
commit | 7e5e3cb57613e37990b3929fce963cfed7b33f11 (patch) | |
tree | f4917bfdcd02e2496e96d9729a09530e7c0149b3 | |
parent | b17c347ac63569fbe896e1dd12f4a2c933a66448 (diff) |
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].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@23081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | lib/mkmf.rb | 29 | ||||
-rw-r--r-- | version.h | 2 |
2 files changed, 27 insertions, 4 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb index de8dee1056..2dfd1e1501 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -1031,6 +1031,29 @@ def winsep(s) 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)] @@ -1049,9 +1072,9 @@ SHELL = /bin/sh #### Start of system configuration section. #### -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 @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2009-03-27" #define RUBY_VERSION_CODE 186 #define RUBY_RELEASE_CODE 20090327 -#define RUBY_PATCHLEVEL 366 +#define RUBY_PATCHLEVEL 367 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 |