ruby-changes:10285
From: yugui <ko1@a...>
Date: Wed, 28 Jan 2009 18:23:34 +0900 (JST)
Subject: [ruby-changes:10285] Ruby:r21829 (ruby_1_9_1): merges r21749 and r21750 from trunk into ruby_1_9_1.
yugui 2009-01-28 18:22:28 +0900 (Wed, 28 Jan 2009) New Revision: 21829 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21829 Log: merges r21749 and r21750 from trunk into ruby_1_9_1. * 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]. -- * lib/mkmf.rb (configuration): leaves PATH_SEPARATOR unchanged. Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/lib/mkmf.rb Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 21828) +++ ruby_1_9_1/ChangeLog (revision 21829) @@ -1,5 +1,14 @@ -Fri Jan 23 14:36:06 2009 Nobuyoshi Nakada <nobu@r...> +Fri Jan 23 15:12:52 2009 Nobuyoshi Nakada <nobu@r...> + * lib/mkmf.rb (mkintpath): new function which converts native path + to format acceptable in Makefile. + + * lib/mkmf.rb (configuration): leaves PATH_SEPARATOR unchanged. + + * lib/mkmf.rb (configuration): convers srcdir, topdir and hdrdir. + a patch by Alexey Borzenkov <snaury AT gmail.com> at + [ruby-core:21448]. + * lib/mkmf.rb (try_func): got rid of c-mode confusion. Fri Jan 23 13:26:45 2009 Nobuyoshi Nakada <nobu@r...> Index: ruby_1_9_1/lib/mkmf.rb =================================================================== --- ruby_1_9_1/lib/mkmf.rb (revision 21828) +++ ruby_1_9_1/lib/mkmf.rb (revision 21829) @@ -1299,6 +1299,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 = $VPATH.dup @@ -1308,8 +1331,6 @@ if CONFIG['target_os'] != 'cygwin' vpath = vpath.map {|p| p.sub(/.*/, '$(shell cygpath -u \&)')} end - when 'mingw32' - CONFIG['PATH_SEPARATOR'] = ';' end end CONFIG["hdrdir"] ||= $hdrdir @@ -1318,9 +1339,9 @@ #### Start of system configuration section. #### #{"top_srcdir = " + $top_srcdir.sub(%r"\A#{Regexp.quote($topdir)}/", "$(topdir)/") if $extmk} -srcdir = #{srcdir.gsub(/\$\((srcdir)\)|\$\{(srcdir)\}/) {CONFIG[$1||$2]}.quote} -topdir = #{($extmk ? CONFIG["topdir"] : $topdir).quote} -hdrdir = #{CONFIG["hdrdir"].quote} +srcdir = #{srcdir.gsub(/\$\((srcdir)\)|\$\{(srcdir)\}/) {mkintpath(CONFIG[$1||$2])}.quote} +topdir = #{mkintpath($extmk ? CONFIG["topdir"] : $topdir).quote} +hdrdir = #{mkintpath(CONFIG["hdrdir"]).quote} arch_hdrdir = #{$arch_hdrdir} VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])} } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/