aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2009-12-01 11:27:44 +0000
committerMax Howell2009-12-01 12:07:34 +0000
commit7b2bef79f0d87ea04d63552a6d7d983414661383 (patch)
tree0fbcc2602485cfbc138da078b4309ad2e6e046ac /Library
parentc3ae9719a09d0278ebf9baeb4ac9b8610fb04c7e (diff)
downloadhomebrew-7b2bef79f0d87ea04d63552a6d7d983414661383.tar.bz2
When not installed to /usr/local use -isystem
This means our include directory is prioritised above all -I but after all other system directories. This is how it should be. Also helps fix #113.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/ENV.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb
index 1edc4a64b..fc6bdd64b 100644
--- a/Library/Homebrew/extend/ENV.rb
+++ b/Library/Homebrew/extend/ENV.rb
@@ -35,8 +35,8 @@ module HomebrewEnvExtension
ENV['MAKEFLAGS']="-j#{Hardware.processor_count}"
unless HOMEBREW_PREFIX.to_s == '/usr/local'
- # /usr/local is always in the build system path so only add other paths
- ENV['CPPFLAGS'] = "-I#{HOMEBREW_PREFIX}/include"
+ # /usr/local is already an -isystem and -L directory so we skip it
+ ENV['CPPFLAGS'] = "-isystem #{HOMEBREW_PREFIX}/include"
ENV['LDFLAGS'] = "-L#{HOMEBREW_PREFIX}/lib"
else
# ignore existing build vars, thus we should have less bugs to deal with