aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2012-08-29 15:19:42 -0400
committerMax Howell2012-08-29 15:19:42 -0400
commita96686ab33a68ee445017923898a8a33c97d4d66 (patch)
tree993ca610110bde0d902367b9dae34fa28614bc83 /Library
parent45aef5a8128de1afe88163c2dea85bdff3831e28 (diff)
downloadhomebrew-a96686ab33a68ee445017923898a8a33c97d4d66.tar.bz2
Warn about removed warnings less shockingly
The problem here now is though that the warnings only appear when compiling verbosely. But they should thus be visible if the build fails. Or if people are hunting for problems.
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/ENV/4.3/cc11
-rwxr-xr-xLibrary/Homebrew/build.rb8
2 files changed, 7 insertions, 12 deletions
diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc
index 2342dc51e..2d7e6ca80 100755
--- a/Library/ENV/4.3/cc
+++ b/Library/ENV/4.3/cc
@@ -106,6 +106,13 @@ class Cmd
args << arg
end
end
+
+ rms = @args - args
+ %w{CPPFLAGS LDFLAGS CXXFLAGS CFLAGS}.each do |flag|
+ unison = ENV[flag].split(' ') & rms
+ puts "Warning! #{unison*' '} removed from #{flag.upcase} by superenv" unless unison.empty?
+ end
+
args
end
def cflags
@@ -135,10 +142,6 @@ end
####################################################################### sanity
abort "The build-tool has reset ENV. --lame-env required." unless ENV['HOMEBREW_BREW_FILE']
-%w{CPPFLAGS LDFLAGS CXXFLAGS CFLAGS}.each do |flag|
- puts "#{flag} set but superenv running! Flags may be removed!" if ENV[flag]
-end
-
######################################################################### main
cmd = Cmd.new($0, ARGV)
exec "xcrun", cmd.tool, *cmd.args
diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb
index dc94cf738..97365a203 100755
--- a/Library/Homebrew/build.rb
+++ b/Library/Homebrew/build.rb
@@ -85,14 +85,6 @@ def install f
ENV.deps = keg_only_deps.map(&:to_s)
ENV.x11 = f.requirements.detect{|rq| rq.class == X11Dependency }
ENV.setup_build_environment
- class << ENV
- def []=(key, value)
- case key when 'CFLAGS', 'CPPFLAGS', 'LDFAGS'
- opoo "#{key} set with --env=super! Flags may not take effect!"
- end
- store(key, value)
- end
- end
end
f.recursive_requirements.each { |req| req.modify_build_environment }