aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAdam Vandenberg2010-07-13 14:20:52 -0700
committerAdam Vandenberg2010-07-13 14:20:52 -0700
commita22bf178572db574e7b358adbd7f58f86f439d33 (patch)
tree04d5cf873756fc70c36080d05fa1b5bece88a0c7 /bin
parent49d167def59c4c076790c0271e4132737ad95c8c (diff)
downloadhomebrew-a22bf178572db574e7b358adbd7f58f86f439d33.tar.bz2
Add command "brew --env"
"brew --env" will set up a build environment and then dump certain ENV variables (CC, CXX, LD, CFLAGS, CXXFLAGS, MAKEFLAGS). If any of CC, CXX, LD are symlinks, now also output the target compiler. (Typically these will be symlinks from eg /usr/bin/cc to /usr/bin/gcc-4.2). This is a diagnostic command which may be merged into --config, turned into an external command, or removed if it doesn't turn out to be useful.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/brew6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/brew b/bin/brew
index bf8b06c99..ba2b622f3 100755
--- a/bin/brew
+++ b/bin/brew
@@ -94,6 +94,12 @@ begin
end
when '--config'
dump_config
+ when '--env'
+ require 'hardware'
+ require 'extend/ENV'
+ ENV.extend(HomebrewEnvExtension)
+ ENV.setup_build_environment
+ dump_build_env ENV
when 'home', 'homepage'
if ARGV.named.empty?