diff options
| author | Jack Nagel | 2014-07-02 21:57:52 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-07-02 21:58:43 -0500 |
| commit | 54112bb6fbd5b4af50cbf9b1ca89c80962d1430f (patch) | |
| tree | 3cefdf19bbba347c5c971435dd55a26506dd275f /Library/Homebrew/extend | |
| parent | 97dc1ba243ec29ec2580da6d6533f79a97eb880f (diff) | |
| download | homebrew-54112bb6fbd5b4af50cbf9b1ca89c80962d1430f.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}" } |
