diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-13 13:17:30 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-13 13:17:30 +0000 |
commit | 31e1fce2a3a4ba971aed17cf6544d04649ba4dc9 (patch) | |
tree | a1356c961466fb7d2767b1fd9086c096c5f32c3f | |
parent | 75de442dd0b7eb7325f61610f096e2a469c2eff5 (diff) |
* 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
-rw-r--r-- | ChangeLog | 6 | ||||
-rwxr-xr-x | tool/mkconfig.rb | 18 |
2 files changed, 22 insertions, 2 deletions
@@ -1,3 +1,9 @@ +Sat Aug 13 22:17:27 2011 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * 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@dotrb.org> * 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 <<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} |