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
commitee794cd21a010ac70abab2746844b0db0e4a1852 (patch)
tree43642b0ad49b0663e2d4946ba6363b8aa5cb8fd1 /bin
parent2bac03ef92d747e8a8d254976d111f3409766e3d (diff)
downloadbrew-ee794cd21a010ac70abab2746844b0db0e4a1852.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?