Emit deprecation warning for --use-{gcc,llvm,clang}

Closes Homebrew/homebrew#24864.
This commit is contained in:
Jack Nagel 2013-12-02 01:17:25 -06:00
parent ea992b02e5
commit 4443a9f2e1

View File

@ -6,6 +6,19 @@ module Homebrew extend self
def install
raise FormulaUnspecifiedError if ARGV.named.empty?
{
'gcc' => 'gcc-4.2',
'llvm' => 'llvm-gcc',
'clang' => 'clang'
}.each_pair do |old, new|
opt = "--use-#{old}"
if ARGV.include? opt then opoo <<-EOS.undent
#{opt.inspect} is deprecated and will be removed in a future version.
Please use "--cc=#{new}" instead.
EOS
end
end
if ARGV.include? '--head'
raise "Specify `--HEAD` in uppercase to build from trunk."
end