Permalink
Browse files

updated Makefile.

  • Loading branch information...
1 parent 2e48d90 commit 0de0ffe86ae8ac033b4bea5dd3f00c947e6fe243 @agentzh agentzh committed Feb 28, 2012
Showing with 12 additions and 5 deletions.
  1. +12 −5 Makefile
View
17 Makefile
@@ -1,11 +1,18 @@
OPENRESTY_PREFIX=/usr/local/openresty-debug
-.PHONY: all test
-all: ;
+PREFIX ?= /usr/local
+LUA_INCLUDE_DIR ?= $(PREFIX)/include
+LUA_LIB_DIR ?= $(PREFIX)/lib/lua/$(LUA_VERSION)
+INSTALL ?= install
-test:
- PATH=$(OPENRESTY_PREFIX)/nginx/sbin:$$PATH prove -I../test-nginx/lib -r t
+.PHONY: all test install
+
+all: ;
install: all
- cp -r lib/resty $(OPENRESTY_PREFIX)/lualib/
+ $(INSTALL) -d $(DESTDIR)/$(LUA_LIB_DIR)/resty
+ $(INSTALL) lib/resty/*.lua $(DESTDIR)/$(LUA_LIB_DIR)/resty
+
+test: all
+ PATH=$(OPENRESTY_PREFIX)/nginx/sbin:$$PATH prove -I../test-nginx/lib -r t

0 comments on commit 0de0ffe

Please sign in to comment.