aboutsummaryrefslogtreecommitdiffstats
path: root/tool/mkconfig.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-10 08:30:16 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-10 08:30:16 +0000
commite98f7ea423b08222b6eceda945613040c7b08a09 (patch)
tree4060ccc1cf5fa8d56af9926ff2800bdaf9d0f6b2 /tool/mkconfig.rb
parent6f2a41e9951d7e4cb25e33e675f0d424c98ea9a8 (diff)
downloadruby-e98f7ea423b08222b6eceda945613040c7b08a09.tar.gz
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 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/mkconfig.rb')
-rwxr-xr-xtool/mkconfig.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
index 3da57581ee..e874b3f407 100755
--- a/tool/mkconfig.rb
+++ b/tool/mkconfig.rb
@@ -132,6 +132,8 @@ File.foreach "config.status" do |line|
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
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__)