diff options
| author | Jack Nagel | 2014-07-02 21:57:52 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2014-07-02 21:58:43 -0500 | 
| commit | 32d84377d54ab1c7de897cd19fc1df458c622ae8 (patch) | |
| tree | 08e1fe27ee5dd46347a62610824d09d248ba08ca /Library/Homebrew/extend | |
| parent | 729ee39994faf25803d50e33dec0620dae5d964e (diff) | |
| download | brew-32d84377d54ab1c7de897cd19fc1df458c622ae8.tar.bz2 | |
Move constants so we don't have to load all of ENV to get them
Diffstat (limited to 'Library/Homebrew/extend')
| -rw-r--r-- | Library/Homebrew/extend/ENV/shared.rb | 19 | 
1 files changed, 10 insertions, 9 deletions
diff --git a/Library/Homebrew/extend/ENV/shared.rb b/Library/Homebrew/extend/ENV/shared.rb index 8208d185d..9225b997f 100644 --- a/Library/Homebrew/extend/ENV/shared.rb +++ b/Library/Homebrew/extend/ENV/shared.rb @@ -1,17 +1,18 @@ -require 'formula' +require "formula" +require "compilers"  module SharedEnvExtension +  include CompilerConstants +    CC_FLAG_VARS = %w{CFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS}    FC_FLAG_VARS = %w{FCFLAGS FFLAGS} -  # Update these every time a new GNU GCC branch is released -  GNU_GCC_VERSIONS = (3..9) -  GNU_GCC_REGEXP = /gcc-(4\.[3-9])/ - -  COMPILER_SYMBOL_MAP = { 'gcc-4.0'  => :gcc_4_0, -                          'gcc-4.2'  => :gcc, -                          'llvm-gcc' => :llvm, -                          'clang'    => :clang } +  COMPILER_SYMBOL_MAP = { +    "gcc-4.0"  => :gcc_4_0, +    "gcc-4.2"  => :gcc, +    "llvm-gcc" => :llvm, +    "clang"    => :clang, +  }    COMPILERS = COMPILER_SYMBOL_MAP.values +      GNU_GCC_VERSIONS.map { |n| "gcc-4.#{n}" }  | 
