mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
dc4d4b3923
* regenc.h (OnigEncodingDefine): external encoding definition macro. * enc/Makefile.in: fix for linking. * enc/depend, enc/make_encmake.rb: fix for Windows. * enc/{ascii,euc_jp,sjis,utf8,iso_8859_{1..16}}.c: renamed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
28 lines
715 B
Ruby
28 lines
715 B
Ruby
#! ./miniruby
|
|
|
|
dir = File.expand_path("../..", __FILE__)
|
|
$:.unshift(File.join(dir, "lib"))
|
|
$:.unshift(dir)
|
|
$:.unshift(".")
|
|
require 'mkmf'
|
|
require 'tool/serb'
|
|
|
|
if /--builtin-encs=/ =~ ARGV[0]
|
|
BUILTIN_ENCS = $'.split.each {|e| e.sub!(/(?:\.\w+)?\z/, '.c')}
|
|
ARGV.shift
|
|
else
|
|
BUILTIN_ENCS = []
|
|
end
|
|
|
|
DEFFILE = (true if CONFIG["DLDFLAGS"].sub!(/\s+-def:\$\(DEFFILE\)\s+/, ' '))
|
|
|
|
mkin = File.read(File.join($srcdir, "Makefile.in"))
|
|
mkin.gsub!(/@(#{CONFIG.keys.join('|')})@/) {CONFIG[$1]}
|
|
if File.exist?(depend = File.join($srcdir, "depend"))
|
|
tmp = ''
|
|
eval(serb(File.read(depend), 'tmp'), binding, depend)
|
|
mkin << "\n#### depend ####\n\n" << depend_rules(tmp).join
|
|
end
|
|
open(ARGV[0], 'wb') {|f|
|
|
f.puts mkin
|
|
}
|