Skip to content

Commit

Permalink
wrangler: respect $CC during compilation
Browse files Browse the repository at this point in the history
Closes Homebrew#11524.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
  • Loading branch information
nox authored and jacknagel committed Apr 11, 2012
1 parent 4ad165c commit 80ad462
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions Library/Formula/wrangler.rb
Expand Up @@ -7,10 +7,74 @@ class Wrangler < Formula

depends_on 'erlang'

def patches
# Respect $CC during compilation. Merged upstream:
# https://github.com/RefactoringTools/wrangler/pull/41
DATA
end

def install
ENV.deparallelize
system "./configure", "--prefix=#{prefix}"
system "make"
system "make install"
end
end

__END__
diff --git i/c_src/gsuffixtree/Makefile.in w/c_src/gsuffixtree/Makefile.in
index 3f4e6fa..751ed55 100755
--- i/c_src/gsuffixtree/Makefile.in
+++ w/c_src/gsuffixtree/Makefile.in
@@ -1,5 +1,6 @@


+CC = @CC@
ERL_CFLAGS = @ERL_CFLAGS@
ERL_LIB = @ERL_LIB@
CFLAGS = @CFLAGS@
@@ -10,13 +11,13 @@ ERL_LDFLAGS= ${LDFLAGS} ${ERL_LIB}


gsuffixtree: main.o gsuffix_tree.o
- gcc ${ERL_LDFLAGS} main.o gsuffix_tree.o -lerl_interface -lei -lpthread -o gsuffixtree
+ $(CC) ${ERL_LDFLAGS} main.o gsuffix_tree.o -lerl_interface -lei -lpthread -o gsuffixtree

gsuffix_tree.o: gsuffix_tree.c gsuffix_tree.h
- gcc ${CFLAGS} ${ERL_CFLAGS} -o gsuffix_tree.o -c gsuffix_tree.c
+ $(CC) ${CFLAGS} ${ERL_CFLAGS} -o gsuffix_tree.o -c gsuffix_tree.c

main.o: gsuffix_tree.h
- gcc ${CFLAGS} ${ERL_CFLAGS} -o main.o -c main.c
+ $(CC) ${CFLAGS} ${ERL_CFLAGS} -o main.o -c main.c

clean:
-rm -f *.o
diff --git i/c_src/suffixtree/Makefile.in w/c_src/suffixtree/Makefile.in
index 8ed7c1d..3f40de4 100755
--- i/c_src/suffixtree/Makefile.in
+++ w/c_src/suffixtree/Makefile.in
@@ -1,5 +1,6 @@


+CC = @CC@
ERL_CFLAGS = @ERL_CFLAGS@
ERL_LIB = @ERL_LIB@
CFLAGS = @CFLAGS@
@@ -10,13 +11,13 @@ ERL_LDFLAGS= ${LDFLAGS} ${ERL_LIB}


suffixtree: main.o suffix_tree.o
- gcc ${ERL_LDFLAGS} main.o suffix_tree.o -lerl_interface -lei -lpthread -o suffixtree
+ $(CC) ${ERL_LDFLAGS} main.o suffix_tree.o -lerl_interface -lei -lpthread -o suffixtree

suffix_tree.o: suffix_tree.c suffix_tree.h
- gcc ${CFLAGS} ${ERL_CFLAGS} -o suffix_tree.o -c suffix_tree.c
+ $(CC) ${CFLAGS} ${ERL_CFLAGS} -o suffix_tree.o -c suffix_tree.c

main.o: suffix_tree.h
- gcc ${CFLAGS} ${ERL_CFLAGS} -o main.o -c main.c
+ $(CC) ${CFLAGS} ${ERL_CFLAGS} -o main.o -c main.c

clean:
-rm -f *.o

0 comments on commit 80ad462

Please sign in to comment.