64
64
unless installrb.empty?
65
65
config = CONFIG.dup
66
66
install_dirs(target_prefix).each {|var, val| config[var] = val}
67
FileUtils.rm_f(installrb.values.collect {|f| Config.expand(f, config)}, verbose: true)
67
FileUtils.rm_f(installrb.values.collect {|f| RbConfig.expand(f, config)}, verbose: true)
116
116
makefile = "./Makefile"
117
117
ok = File.exist?(makefile)
119
Config::CONFIG["hdrdir"] = $hdrdir
120
Config::CONFIG["srcdir"] = $srcdir
121
Config::CONFIG["topdir"] = $topdir
119
RbConfig::CONFIG["hdrdir"] = $hdrdir
120
RbConfig::CONFIG["srcdir"] = $srcdir
121
RbConfig::CONFIG["topdir"] = $topdir
122
122
CONFIG["hdrdir"] = ($hdrdir == top_srcdir) ? top_srcdir : "$(topdir)"+top_srcdir[2..-1]
123
123
CONFIG["srcdir"] = "$(hdrdir)/ext/#{$mdir}"
124
124
CONFIG["topdir"] = $topdir
182
183
$extpath |= $LIBPATH
185
Config::CONFIG["srcdir"] = $top_srcdir
186
Config::CONFIG["topdir"] = topdir
186
RbConfig::CONFIG["srcdir"] = $top_srcdir
187
RbConfig::CONFIG["topdir"] = topdir
187
188
CONFIG["srcdir"] = mk_srcdir
188
189
CONFIG["topdir"] = mk_topdir
189
190
CONFIG.delete("hdrdir")
232
232
$make = v || 'make'
234
234
opts.on('--make-flags=FLAGS', '--mflags', Shellwords) do |v|
235
v.grep(/\A([-\w]+)=(.*)/) {$configure_args["--#{$1}"] = $2}
236
237
arg.insert(0, '-') if /\A[^-][^=]*\Z/ =~ arg
352
353
ext_prefix = "#{$top_srcdir}/ext"
353
354
exts = $static_ext.sort_by {|t, i| i}.collect {|t, i| t}
354
exts |= $extension if $extension
355
exts |= Dir.glob("#{ext_prefix}/*/**/extconf.rb").collect {|d|
357
d.slice!(0, ext_prefix.length + 1)
359
}.sort unless $extension
356
exts |= $extension.select {|d| File.directory?("#{ext_prefix}/#{d}")}
358
withes, withouts = %w[--with --without].collect {|w|
359
if not (w = %w[-extensions -ext].collect {|opt|arg_config(w+opt)}).any?
361
elsif (w = w.grep(String)).empty?
364
w.collect {|opt| opt.split(/,/)}.flatten.method(:any?)
368
cond1 = proc {|n| File.fnmatch(n, ext, File::FNM_PATHNAME)}
369
withes.call(&cond1) or !withouts.call(&cond1)
371
exts |= Dir.glob("#{ext_prefix}/*/**/extconf.rb").collect {|d|
373
d.slice!(0, ext_prefix.length + 1)
376
with_config(ext, &cond)
362
Config.expand(extout = "#$extout", Config::CONFIG.merge("topdir"=>$topdir))
381
RbConfig.expand(extout = "#$extout", RbConfig::CONFIG.merge("topdir"=>$topdir))
364
Config.expand(dest = "#{$destdir}#{$rubylibdir}")
365
FileUtils.cp_r(extout+"/.", dest, :verbose => true, :noop => $dryrun)
383
RbConfig.expand(dest = "#{$destdir}#{$rubylibdir}")
384
FileUtils.cp_r(extout+"/.", dest, :remove_destination => true, :verbose => true, :noop => $dryrun)
451
472
$mflags.defined?("DESTDIR") or $mflags << "DESTDIR=#{$destdir}"
453
474
if !$extlist.empty? and $extupdate
454
rm_f(Config::CONFIG["LIBRUBY_SO"])
475
rm_f(RbConfig::CONFIG["LIBRUBY_SO"])
456
477
puts "making #{rubies.join(', ')}"