ruby-changes:20921
From: nobu <ko1@a...>
Date: Sat, 13 Aug 2011 22:17:43 +0900 (JST)
Subject: [ruby-changes:20921] nobu:r32970 (trunk, ruby_1_9_3): * tool/mkconfig.rb: do not make the entries related to sitedir and
nobu 2011-08-13 22:17:30 +0900 (Sat, 13 Aug 2011) New Revision: 32970 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32970 Log: * tool/mkconfig.rb: do not make the entries related to sitedir and verdordir if disabled by --without options. [ruby-core:38922] [Bug #5187] Modified files: branches/ruby_1_9_3/ChangeLog branches/ruby_1_9_3/tool/mkconfig.rb trunk/ChangeLog trunk/tool/mkconfig.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 32969) +++ ChangeLog (revision 32970) @@ -1,3 +1,9 @@ +Sat Aug 13 22:17:27 2011 Nobuyoshi Nakada <nobu@r...> + + * 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 <tadf@d...> * ext/date/date_core.c: [ruby-core:38861] Index: tool/mkconfig.rb =================================================================== --- tool/mkconfig.rb (revision 32969) +++ tool/mkconfig.rb (revision 32970) @@ -175,14 +175,22 @@ 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 <<EOS CONFIG["rubylibdir"] = "$(rubylibprefix)/$(ruby_version)" CONFIG["archdir"] = "$(rubylibdir)/$(arch)" +EOS +print <<EOS unless v_disabled["sitedir"] CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)" CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)" +EOS +print <<EOS unless v_disabled["vendordir"] CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)" CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)" +EOS +print <<EOS CONFIG["topdir"] = File.dirname(__FILE__) MAKEFILE_CONFIG = {} CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup} Index: ruby_1_9_3/ChangeLog =================================================================== --- ruby_1_9_3/ChangeLog (revision 32969) +++ ruby_1_9_3/ChangeLog (revision 32970) @@ -1,3 +1,9 @@ +Sat Aug 13 22:17:27 2011 Nobuyoshi Nakada <nobu@r...> + + * 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:06:57 2011 Tadayoshi Funaba <tadf@d...> * ext/date/date_core.c: [ruby-core:38861] Index: ruby_1_9_3/tool/mkconfig.rb =================================================================== --- ruby_1_9_3/tool/mkconfig.rb (revision 32969) +++ ruby_1_9_3/tool/mkconfig.rb (revision 32970) @@ -175,14 +175,22 @@ 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 <<EOS CONFIG["rubylibdir"] = "$(rubylibprefix)/$(ruby_version)" CONFIG["archdir"] = "$(rubylibdir)/$(arch)" +EOS +print <<EOS unless v_disabled["sitedir"] CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)" CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)" +EOS +print <<EOS unless v_disabled["vendordir"] CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)" CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)" +EOS +print <<EOS CONFIG["topdir"] = File.dirname(__FILE__) MAKEFILE_CONFIG = {} CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup} -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/