aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/install.rb
diff options
context:
space:
mode:
authorMax Howell2009-10-15 12:36:09 +0100
committerMax Howell2009-10-15 16:51:53 +0100
commit543a113712635b64bcfe0804acea0d8079b8bd44 (patch)
tree404789c8e1a0d62d5e72d0e3c763018c73d51762 /Library/Homebrew/install.rb
parent6ad2907000d927e055cacf389228ebdc01fcc0d7 (diff)
downloadbrew-543a113712635b64bcfe0804acea0d8079b8bd44.tar.bz2
Some subdirs and renames to aid homebrew n00bs
The classes better reflect their contents. I'm sure this change may be contentious, but I am a sucker for trying to create source bases that are easy to get to grips with and easy to navigate. brewkit.rb is now a deprecated file.
Diffstat (limited to 'Library/Homebrew/install.rb')
-rwxr-xr-xLibrary/Homebrew/install.rb27
1 files changed, 11 insertions, 16 deletions
diff --git a/Library/Homebrew/install.rb b/Library/Homebrew/install.rb
index d9b66d5ac..19fa99b7d 100755
--- a/Library/Homebrew/install.rb
+++ b/Library/Homebrew/install.rb
@@ -2,7 +2,7 @@
require 'global'
require 'brew.h'
-require 'brewkit'
+require 'extend/ENV'
require 'fileutils'
require 'formula'
require 'hardware'
@@ -31,30 +31,25 @@ EOS
end
-def ENV_prepend key, value, separator = ' '
- if ENV[key] and not ENV[key].empty?
- ENV[key] = value+separator+ENV[key]
- else
- ENV[key] = value
- end
-end
-
-
def install f
+ # we deliberately only do this when install is run, although it may be the wrong decision…
+ ENV.extend(HomebrewEnvExtension)
+ ENV.setup_build_environment
+
f.deps.each do |dep|
dep = Formula.factory dep
if dep.keg_only?
- ENV_prepend 'LDFLAGS', "-L#{dep.lib}"
- ENV_prepend 'CPPFLAGS', "-I#{dep.include}"
- ENV_prepend 'PATH', "#{dep.bin}", ':'
- ENV_prepend 'PKG_CONFIG_PATH', dep.lib+'pkgconfig', ':'
+ ENV.prepend 'LDFLAGS', "-L#{dep.lib}"
+ ENV.prepend 'CPPFLAGS', "-I#{dep.include}"
+ ENV.prepend 'PATH', "#{dep.bin}", ':'
+ ENV.prepend 'PKG_CONFIG_PATH', dep.lib+'pkgconfig', ':'
end
end
if ARGV.verbose?
ohai "Build Environment"
- %w[PATH CFLAGS LDFLAGS CPPFLAGS MAKEFLAGS CC CXX MACOSX_DEPLOYMENT_TARGET].each do |f|
- puts "#{f}: #{ENV[f]}" unless ENV[f].to_s.empty?
+ %w[PATH CFLAGS LDFLAGS CPPFLAGS MAKEFLAGS CC CXX MACOSX_DEPLOYMENT_TARGET].each do |env|
+ puts "#{env}: #{ENV[env]}" unless ENV[env].to_s.empty?
end
end