diff options
| author | Max Howell | 2009-09-21 23:50:57 +0100 |
|---|---|---|
| committer | Max Howell | 2009-09-21 23:50:57 +0100 |
| commit | e21fcfd5e8038c5feadb5745148dded6dfaf0de3 (patch) | |
| tree | f821653b3b1cfb1319c7a112a21d7e3a8aa11795 /Library | |
| parent | 35b0b61adacc1ecb27a4570be266d7a3d8e5a290 (diff) | |
| download | homebrew-e21fcfd5e8038c5feadb5745148dded6dfaf0de3.tar.bz2 | |
ENV.cc; returns the compiler we use
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/dos2unix.rb | 5 | ||||
| -rw-r--r-- | Library/Formula/tree.rb | 3 | ||||
| -rw-r--r-- | Library/Homebrew/brewkit.rb | 4 |
3 files changed, 7 insertions, 5 deletions
diff --git a/Library/Formula/dos2unix.rb b/Library/Formula/dos2unix.rb index c0ba4f5f6..48a3098d2 100644 --- a/Library/Formula/dos2unix.rb +++ b/Library/Formula/dos2unix.rb @@ -8,9 +8,8 @@ class Dos2unix <Formula def install File.unlink 'dos2unix' - # we don't use make as it doesn't optimise :P - gcc = ENV['CC'] || "gcc" - system "#{gcc} #{ENV['CFLAGS']} dos2unix.c -o dos2unix" + # we don't use the Makefile as it doesn't optimize + system "#{ENV.cc} #{ENV['CFLAGS']} dos2unix.c -o dos2unix" # make install is broken due to INSTALL file, but also it sucks so we'll do it # also Ruby 1.8 is broken, it won't allow you to move a symlink that's diff --git a/Library/Formula/tree.rb b/Library/Formula/tree.rb index 982b4bb5a..87db1beb8 100644 --- a/Library/Formula/tree.rb +++ b/Library/Formula/tree.rb @@ -6,8 +6,7 @@ class Tree <Formula @md5='a7731a898e2c0d7e422a57a84ffbb06c' def install - gcc = ENV['CC'] || "gcc" - system "#{gcc} #{ENV['CFLAGS']} -o tree tree.c strverscmp.c" + system "#{ENV.cc} #{ENV['CFLAGS']} -o tree tree.c strverscmp.c" bin.install "tree" man1.install "man/tree.1" diff --git a/Library/Homebrew/brewkit.rb b/Library/Homebrew/brewkit.rb index 41422ed9e..37f2adbab 100644 --- a/Library/Homebrew/brewkit.rb +++ b/Library/Homebrew/brewkit.rb @@ -143,6 +143,10 @@ module HomebrewEnvExtension def enable_warnings remove_from_cflags '-w' end + # returns the compiler we're using + def cc + ENV['CC'] or "gcc" + end private def append key, value |
