ruby-changes:37475
From: nobu <ko1@a...>
Date: Tue, 10 Feb 2015 17:30:28 +0900 (JST)
Subject: [ruby-changes:37475] nobu:r49556 (trunk): mkconfig.rb: SDKROOT
nobu 2015-02-10 17:30:16 +0900 (Tue, 10 Feb 2015) New Revision: 49556 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49556 Log: mkconfig.rb: SDKROOT * tool/mkconfig.rb (RbConfig): allow prefix includedir by SDKROOT environment variable on OSX. cf. http://www.opensource.apple.com/source/ruby/ruby-106/patches/tool_mkconfig.rb.diff Modified files: trunk/tool/mkconfig.rb Index: tool/mkconfig.rb =================================================================== --- tool/mkconfig.rb (revision 49555) +++ tool/mkconfig.rb (revision 49556) @@ -132,6 +132,8 @@ File.foreach "config.status" do |line| https://github.com/ruby/ruby/blob/trunk/tool/mkconfig.rb#L132 if universal val.sub!(/universal/, %q[#{arch && universal[/(?:\A|\s)#{Regexp.quote(arch)}=(\S+)/, 1] || '\&'}]) end + when /^includedir$/ + val = '"$(SDKROOT)"'+val if /darwin/ =~ arch end v = " CONFIG[\"#{name}\"] #{eq} #{val}\n" if fast[name] @@ -232,6 +234,9 @@ end https://github.com/ruby/ruby/blob/trunk/tool/mkconfig.rb#L234 print(*v_fast) print(*v_others) +print <<EOS if /darwin/ =~ arch + CONFIG["SDKROOT"] = ENV["SDKROOT"] || "" # don't run xcrun everytime, usually useless. +EOS print <<EOS CONFIG["archdir"] = "$(rubyarchdir)" CONFIG["topdir"] = File.dirname(__FILE__) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/