This project is closed and read-only.
Backport #1127 » 0001-Allow-building-ruby-with-mingw.patch
| lib/mkmf.rb | ||
|---|---|---|
|
s.tr('/', '\\')
|
||
|
end
|
||
|
# Converts native path to format acceptable in Makefile
|
||
|
#
|
||
|
# Internal use only.
|
||
|
#
|
||
|
def _quote_for_make(path)
|
||
|
if !CROSS_COMPILING
|
||
|
case CONFIG['build_os']
|
||
|
when 'mingw32'
|
||
|
# mingw uses make from msys and it needs special care
|
||
|
# converts from C:\some\path to /C/some/path
|
||
|
path = path.dup
|
||
|
path.gsub!(/\\/, '/')
|
||
|
path.gsub!(/^\s*([A-Za-z]):(\/.*)\s*$/, '/\1\2')
|
||
|
end
|
||
|
end
|
||
|
path.quote
|
||
|
end
|
||
|
class String
|
||
|
def quote_for_make
|
||
|
_quote_for_make self
|
||
|
end
|
||
|
end
|
||
|
def configuration(srcdir)
|
||
|
mk = []
|
||
|
vpath = %w[$(srcdir) $(topdir) $(hdrdir)]
|
||
| ... | ... | |
|
if CONFIG['target_os'] != 'cygwin'
|
||
|
vpath.each {|p| p.sub!(/.*/, '$(shell cygpath -u \&)')}
|
||
|
end
|
||
|
when 'msdosdjgpp', 'mingw32'
|
||
|
when 'msdosdjgpp'
|
||
|
CONFIG['PATH_SEPARATOR'] = ';'
|
||
|
end
|
||
|
end
|
||
| ... | ... | |
|
#### 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)\}/) {CONFIG[$1||$2]}.quote_for_make}
|
||
|
topdir = #{($extmk ? CONFIG["topdir"] : $topdir).quote_for_make}
|
||
|
hdrdir = #{$extmk ? CONFIG["hdrdir"].quote_for_make : '$(topdir)'}
|
||
|
VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])}
|
||
|
}
|
||
|
if $extmk
|
||
- « Previous
- 1
- …
- 3
- 4
- 5
- Next »