diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-17 17:30:57 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-17 17:30:57 +0000 |
commit | 39678e7c3f8321dfc074d8a95855e664af348eec (patch) | |
tree | b46aaa66945072ef9b64c0a91131081c8d2a36f7 /enc | |
parent | b6b5af9f3afec4567bc25593a658b12d2d38361a (diff) | |
download | ruby-39678e7c3f8321dfc074d8a95855e664af348eec.tar.gz ruby-39678e7c3f8321dfc074d8a95855e664af348eec.tar.xz ruby-39678e7c3f8321dfc074d8a95855e664af348eec.zip |
* configure.in (BUILTIN_ENCS): removed.
* common.mk (enc.mk): pass BUILTIN_ENCS from command line.
* enc/depend: ditto.
* enc/make_encmake.rb: ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc')
-rw-r--r-- | enc/depend | 2 | ||||
-rw-r--r-- | enc/make_encmake.rb | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/enc/depend b/enc/depend index 8fc836daf..b115a8a42 100644 --- a/enc/depend +++ b/enc/depend @@ -1,4 +1,4 @@ -! encs = (Dir.open($srcdir) {|d| d.grep(/.+\.c\z/)} - CONFIG["BUILTIN_ENCS"].split).each {|e| e.chomp!(".c")} +! encs = (Dir.open($srcdir) {|d| d.grep(/.+\.c\z/)} - BUILTIN_ENCS).each {|e| e.chomp!(".c")} VPATH = <% %w[$(arch_hdrdir)/ruby $(hdrdir)/ruby $(top_srcdir) $(srcdir)].join(CONFIG["PATH_SEPARATOR"]) %> diff --git a/enc/make_encmake.rb b/enc/make_encmake.rb index 593f8ba62..c20920168 100644 --- a/enc/make_encmake.rb +++ b/enc/make_encmake.rb @@ -7,6 +7,13 @@ $:.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 + mkin = File.read(File.join($srcdir, "Makefile.in")) mkin.gsub!(/@(#{CONFIG.keys.join('|')})@/) {CONFIG[$1]} if File.exist?(depend = File.join($srcdir, "depend")) @@ -14,6 +21,6 @@ if File.exist?(depend = File.join($srcdir, "depend")) eval(serb(File.read(depend), 'tmp')) mkin << "\n#### depend ####\n\n" << depend_rules(tmp).join end -open(ARGV[0], 'w') {|f| +open(ARGV[0], 'wb') {|f| f.puts mkin } |