aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2012-02-09 14:52:30 -0500
committerBrian Cully <bjc@kublai.com>2012-02-09 14:53:25 -0500
commitb6d09140c407f5642984abecf213ba830c33f917 (patch)
tree134945e6f3a9f4cf824d4c482508ed2c06ca5c9f
parentba58faaa776b911c3ce74e49cf39a9f14bc436d1 (diff)
downloadmysqlerl-b6d09140c407f5642984abecf213ba830c33f917.tar.gz
mysqlerl-b6d09140c407f5642984abecf213ba830c33f917.zip
Put port driver in priv/bin
-rw-r--r--c_src/Makefile10
-rw-r--r--src/mysqlerl_connection.erl2
2 files changed, 6 insertions, 6 deletions
diff --git a/c_src/Makefile b/c_src/Makefile
index 29eec47..c976202 100644
--- a/c_src/Makefile
+++ b/c_src/Makefile
@@ -12,9 +12,9 @@ MYSQLLIBS = $(MYSQLPREFIX)/lib/libmysqlclient.a
CFLAGS = -g -Wall -Werror $(MYSQLINCS) $(ERLINCS)
LDFLAGS = $(MYSQLLIBS) $(ERLLIBS)
-PRIVDIR = ../priv
+BINDIR = ../priv/bin
-BINS = $(PRIVDIR)/mysqlerl
+BINS = $(BINDIR)/mysqlerl
OBJS = io.o log.o msg.o mysqlerl.o
all: $(BINS)
@@ -22,8 +22,8 @@ all: $(BINS)
clean:
rm -rf *.o $(BINS)
-$(PRIVDIR)/mysqlerl: $(PRIVDIR) $(OBJS)
+$(BINDIR)/mysqlerl: $(BINDIR) $(OBJS)
$(CC) -o $@ $(OBJS) $(LDFLAGS)
-$(PRIVDIR):
- mkdir -p $(PRIVDIR)
+$(BINDIR):
+ mkdir -p $(BINDIR)
diff --git a/src/mysqlerl_connection.erl b/src/mysqlerl_connection.erl
index aa49c7e..362b807 100644
--- a/src/mysqlerl_connection.erl
+++ b/src/mysqlerl_connection.erl
@@ -60,7 +60,7 @@ helper() ->
PrivDir when is_list(PrivDir) -> ok;
{error, bad_name} -> PrivDir = filename:join(["..", "priv"])
end,
- filename:join([PrivDir, "mysqlerl"]).
+ filename:nativename(filename:join([PrivDir, "bin", "mysqlerl"])).
port_ref(Sup) ->
[{mysqlerl_port, Ref, worker, _}] = supervisor:which_children(Sup),