From 31e1fce2a3a4ba971aed17cf6544d04649ba4dc9 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 13 Aug 2011 13:17:30 +0000 Subject: * tool/mkconfig.rb: do not make the entries related to sitedir and verdordir if disabled by --without options. [ruby-core:38922] [Bug #5187] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ tool/mkconfig.rb | 18 ++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 91e206c61c..567a36deba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sat Aug 13 22:17:27 2011 Nobuyoshi Nakada + + * tool/mkconfig.rb: do not make the entries related to sitedir and + verdordir if disabled by --without options. [ruby-core:38922] + [Bug #5187] + Sat Aug 13 17:03:22 2011 Tadayoshi Funaba * ext/date/date_core.c: [ruby-core:38861] diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb index a2221f0032..b707c4bd64 100755 --- a/tool/mkconfig.rb +++ b/tool/mkconfig.rb @@ -175,14 +175,22 @@ end print " CONFIG[#{v.dump}] = #{versions[v].dump}\n" end -dest = drive ? /= \"(?!\$[\(\{])(?:[a-z]:)?/i : /= \"(?!\$[\(\{])/ +dest = drive ? %r'= "(?!\$[\(\{])(?i:[a-z]:)' : %r'= "(?!\$[\(\{])' +v_disabled = {} v_others.collect! do |x| - if /^\s*CONFIG\["(?!abs_|old)[a-z]+(?:_prefix|dir)"\]/ === x + if /^\s*CONFIG\["((?!abs_|old)[a-z]+(?:_prefix|dir))"\]/ === x + name = $1 + if /= "no"$/ =~ x + v_disabled[name] = true + v_others.delete(name) + next + end x.sub(dest, '= "$(DESTDIR)') else x end end +v_others.compact! if $install_name v_fast << " CONFIG[\"ruby_install_name\"] = \"" + $install_name + "\"\n" @@ -197,10 +205,16 @@ print(*v_others) print <