aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-07-30 20:27:46 -0500
committerJack Nagel2014-07-30 20:27:46 -0500
commit8e7522117b508a35ebafc13fe1778ef759332873 (patch)
treefb286b2c3b810864fee6d275dc80a077c2bd74e9 /Library
parent0adf64bd51cac5689896ccd53bc68e1bef479982 (diff)
downloadhomebrew-8e7522117b508a35ebafc13fe1778ef759332873.tar.bz2
Pass the build object into the Tab
Since the Tab is written in the build process, the formula's build object will have the correct args attached to it already, so we don't need to reconstruct it.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/build.rb3
-rw-r--r--Library/Homebrew/tab.rb9
2 files changed, 4 insertions, 8 deletions
diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb
index 509a1e51b..70c943d21 100644
--- a/Library/Homebrew/build.rb
+++ b/Library/Homebrew/build.rb
@@ -186,8 +186,7 @@ class Build
# link against it.
stdlibs = keg.detect_cxx_stdlibs :skip_executables => true
- Tab.create(f, ENV.compiler, stdlibs.first,
- Options.coerce(ARGV.options_only)).write
+ Tab.create(f, ENV.compiler, stdlibs.first, f.build).write
rescue Exception => e
if ARGV.debug?
debrew e, f
diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb
index b5bd8a2ad..73895bb04 100644
--- a/Library/Homebrew/tab.rb
+++ b/Library/Homebrew/tab.rb
@@ -10,16 +10,13 @@ require 'utils/json'
class Tab < OpenStruct
FILENAME = 'INSTALL_RECEIPT.json'
- def self.create f, compiler, stdlib, args
- build = f.build.dup
- build.args = args
-
+ def self.create(formula, compiler, stdlib, build)
Tab.new :used_options => build.used_options,
:unused_options => build.unused_options,
- :tabfile => f.prefix.join(FILENAME),
+ :tabfile => formula.prefix.join(FILENAME),
:built_as_bottle => !!ARGV.build_bottle?,
:poured_from_bottle => false,
- :tapped_from => f.tap,
+ :tapped_from => formula.tap,
:time => Time.now.to_i,
:HEAD => Homebrew.git_head,
:compiler => compiler,