aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/haproxy.rb
diff options
context:
space:
mode:
authorMax Howell2010-01-13 11:06:52 +0000
committerMax Howell2010-01-13 11:23:11 +0000
commit99acd7f4fb773d7af8bef08ffa6a79c2cf4c9798 (patch)
treef8fec0fae27724f59a07b0561a9276f24e56f47a /Library/Formula/haproxy.rb
parentaf6d133c80c0bbf26bf752260feececc99438fd5 (diff)
downloadhomebrew-99acd7f4fb773d7af8bef08ffa6a79c2cf4c9798.tar.bz2
Use new inreplace syntax where useful
Diffstat (limited to 'Library/Formula/haproxy.rb')
-rw-r--r--Library/Formula/haproxy.rb13
1 files changed, 6 insertions, 7 deletions
diff --git a/Library/Formula/haproxy.rb b/Library/Formula/haproxy.rb
index ed637ba5e..a96740950 100644
--- a/Library/Formula/haproxy.rb
+++ b/Library/Formula/haproxy.rb
@@ -6,13 +6,12 @@ class Haproxy <Formula
homepage 'http://haproxy.1wt.eu'
def install
- inreplace 'Makefile', 'PREFIX = /usr/local', "PREFIX = #{prefix}"
- inreplace 'Makefile', 'DOCDIR = $(PREFIX)/doc/haproxy', "DOCDIR = #{doc}"
- # use our CC, LD, CFLAGS and LDFLAGS
- inreplace 'Makefile', 'LDFLAGS = $(ARCH_FLAGS) -g', ''
- inreplace 'Makefile', 'CFLAGS = $(ARCH_FLAGS) $(CPU_CFLAGS) $(DEBUG_CFLAGS)', ''
- inreplace 'Makefile', 'CC = gcc', ''
- inreplace 'Makefile', 'LD = $(CC)', ''
+ inreplace 'Makefile' do |contents|
+ contents.change_make_var! 'PREFIX', prefix
+ contents.change_make_var! 'DOCDIR', doc
+ # use our CC, LD, CFLAGS and LDFLAGS
+ contents.remove_make_var! %w[LDFLAGS CFLAGS CC LD]
+ end
# We build generic since the Makefile.osx doesn't appear to work
system "make", "TARGET=generic"