Skip to content
Snippets Groups Projects
Commit fe37cc52 authored by Tim D. Smith's avatar Tim D. Smith Committed by Xu Cheng
Browse files

Revert "Avoid constructing paths by string interpolation"

This reverts commit 8c7f3d859e8f715b6c63e4fe75e7a636aee4167f.
parent 87781f2a
No related branches found
No related tags found
No related merge requests found
......@@ -67,8 +67,8 @@ module Stdenv
macosxsdk MacOS.version
if MacOS::Xcode.without_clt?
append_path "PATH", (MacOS::Xcode.prefix/"usr/bin").to_s
append_path "PATH", (MacOS::Xcode.toolchain_path/"usr/bin").to_s
append_path "PATH", "#{MacOS::Xcode.prefix}/usr/bin"
append_path "PATH", "#{MacOS::Xcode.toolchain_path}/usr/bin"
end
end
......
......@@ -119,8 +119,8 @@ module Superenv
# On 10.9, there are shims for all tools in /usr/bin.
# On 10.7 and 10.8 we need to add these directories ourselves.
if MacOS::Xcode.without_clt? && MacOS.version <= "10.8"
paths << (MacOS::Xcode.prefix/"usr/bin").to_s
paths << (MacOS::Xcode.toolchain_path/"usr/bin").to_s
paths << "#{MacOS::Xcode.prefix}/usr/bin"
paths << "#{MacOS::Xcode.toolchain_path}/usr/bin"
end
paths << MacOS::X11.bin.to_s if x11?
......
......@@ -33,7 +33,7 @@ module OS
def sdk_paths
@sdk_paths ||= begin
# Xcode.prefix is pretty smart, so let's look inside to find the sdk
sdk_prefix = (Xcode.prefix/"Platforms/MacOSX.platform/Developer/SDKs").to_s
sdk_prefix = "#{Xcode.prefix}/Platforms/MacOSX.platform/Developer/SDKs"
# Xcode < 4.3 style
sdk_prefix = "/Developer/SDKs" unless File.directory? sdk_prefix
# Finally query Xcode itself (this is slow, so check it last)
......
......@@ -50,7 +50,7 @@ module OS
end
def toolchain_path
(prefix/"Toolchains/XcodeDefault.xctoolchain") if installed? && version >= "4.3"
Pathname.new("#{prefix}/Toolchains/XcodeDefault.xctoolchain") if installed? && version >= "4.3"
end
# Ask Spotlight where Xcode is. If the user didn't install the
......@@ -79,8 +79,8 @@ module OS
return nil if !MacOS::Xcode.installed? && !MacOS::CLT.installed?
[(prefix/"usr/bin/xcodebuild"), which("xcodebuild")].uniq.each do |path|
if path.file?
%W[#{prefix}/usr/bin/xcodebuild #{which("xcodebuild")}].uniq.each do |path|
if File.file? path
Utils.popen_read(path, "-version") =~ /Xcode (\d(\.\d)*)/
return $1 if $1
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment