From c5a952031025dc6ad7ed6e307251d00e49332bc0 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Tue, 10 Aug 2010 08:01:06 -0700 Subject: [PATCH] ENV.rb - add ENV.cflags --- Library/Homebrew/extend/ENV.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb index bf2ae672fb..0b854544ac 100644 --- a/Library/Homebrew/extend/ENV.rb +++ b/Library/Homebrew/extend/ENV.rb @@ -168,18 +168,19 @@ module HomebrewEnvExtension def enable_warnings remove_from_cflags '-w' end + # Snow Leopard defines an NCURSES value the opposite of most distros # See: http://bugs.python.org/issue6848 def ncurses_define append 'CPPFLAGS', "-DNCURSES_OPAQUE=0" end + # returns the compiler we're using - def cc - self['CC'] or "gcc" - end - def cxx - self['CXX'] or "g++" - end + def cc; self['CC'] or "gcc"; end + def cxx; self['CXX'] or "g++"; end + + # CFLAGS are read quite a bit + def cflags; ENV['CFLAGS']; end def m64 append_to_cflags '-m64'