diff options
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/development_tools.rb | 6 | ||||
| -rw-r--r-- | Library/Homebrew/extend/os/mac/development_tools.rb | 38 |
2 files changed, 44 insertions, 0 deletions
diff --git a/Library/Homebrew/development_tools.rb b/Library/Homebrew/development_tools.rb index b4c2cb34b..bfa54349f 100644 --- a/Library/Homebrew/development_tools.rb +++ b/Library/Homebrew/development_tools.rb @@ -19,6 +19,12 @@ class DevelopmentTools which("clang") || which("gcc") end + def installation_instructions + "Install Clang or brew install gcc" + end + alias_method :custom_installation_instructions, + :installation_instructions + def default_cc cc = DevelopmentTools.locate "cc" cc.realpath.basename.to_s rescue nil diff --git a/Library/Homebrew/extend/os/mac/development_tools.rb b/Library/Homebrew/extend/os/mac/development_tools.rb index d572bf28e..25235e4ae 100644 --- a/Library/Homebrew/extend/os/mac/development_tools.rb +++ b/Library/Homebrew/extend/os/mac/development_tools.rb @@ -22,6 +22,44 @@ class DevelopmentTools MacOS::Xcode.installed? || MacOS::CLT.installed? end + def installation_instructions + if MacOS.version >= "10.9" + <<-EOS.undent + Install the Command Line Tools: + xcode-select --install + EOS + elsif MacOS.version == "10.8" || MacOS.version == "10.7" + <<-EOS.undent + Install the Command Line Tools from + https://developer.apple.com/downloads/ + or via Xcode's preferences. + EOS + else + <<-EOS.undent + Install Xcode from + https://developer.apple.com/xcode/downloads/ + EOS + end + end + + def custom_installation_instructions + if MacOS.version > :tiger + <<-EOS.undent + Install GNU's GCC + brew install gcc + EOS + else + # Tiger doesn't ship with apple-gcc42, and this is required to build + # some software that doesn't build properly with FSF GCC. + <<-EOS.undent + Install Apple's GCC + brew install apple-gcc42 + or GNU's GCC + brew install gcc + EOS + end + end + def default_compiler case default_cc # if GCC 4.2 is installed, e.g. via Tigerbrew, prefer it |
