-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update Makefile for macosX installation about using luajit building deps #217
Changes from 1 commit
c0bf845
2fb0a48
90112de
a79f646
ad57125
0d3aa6c
4e78b61
29d07e9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ INST_LUADIR ?= $(INST_PREFIX)/share/lua/5.1 | |
INST_BINDIR ?= /usr/bin | ||
INSTALL ?= install | ||
UNAME ?= $(shell uname) | ||
OR_EXEC ?= $(shell which openresty) | ||
LUA_JIT_DIR ?= $(shell TMP='./v_tmp' && $(OR_EXEC) -V &>$${TMP} && cat $${TMP} | grep prefix | grep -Eo 'prefix=(.*?)/nginx' | grep -Eo '/.*/' && rm $${TMP})luajit | ||
|
||
|
||
.PHONY: default | ||
|
@@ -23,7 +25,7 @@ help: | |
dev: | ||
./utils/update_nginx_conf_dev.sh | ||
ifeq ($(UNAME),Darwin) | ||
luarocks install --lua-dir=/usr/local/openresty/luajit apisix-*.rockspec --tree=deps --only-deps | ||
luarocks install --lua-dir=$(LUA_JIT_DIR) apisix-*.rockspec --tree=deps --only-deps | ||
else | ||
sudo luarocks install --lua-dir=/usr/local/openresty/luajit apisix-*.rockspec --tree=deps --only-deps | ||
endif | ||
|
@@ -52,13 +54,13 @@ init: | |
run: | ||
mkdir -p logs | ||
mkdir -p /tmp/cores/ | ||
$$(which openresty) -p $$PWD/ | ||
$(OR_EXEC) -p $$PWD/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it may fail under Mac OSX. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed already: 5fccb78 please rebase to master. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, |
||
|
||
|
||
### stop: Stop the apisix server | ||
.PHONY: stop | ||
stop: | ||
$$(which openresty) -p $$PWD/ -s stop | ||
$(OR_EXEC) -p $$PWD/ -s stop | ||
|
||
|
||
### clean: Remove generated files | ||
|
@@ -70,7 +72,7 @@ clean: | |
### reload: Reload the apisix server | ||
.PHONY: reload | ||
reload: | ||
$$(which openresty) -p $$PWD/ -s reload | ||
$(OR_EXEC) -p $$PWD/ -s reload | ||
|
||
|
||
### install: Install the apisix | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'./v_tmp' -> '/tmp/v_tmp', how about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it doesn't make any sense, the
v_tmp
file will been clean immediately at the end of this command.