aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile20
1 files changed, 15 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 0ac52ca4..a72bdbcd 100644
--- a/Makefile
+++ b/Makefile
@@ -2,16 +2,26 @@
2-include config.unix 2-include config.unix
3 3
4# See https://www.gnu.org/software/make/manual/html_node/Makefile-Conventions.html 4# See https://www.gnu.org/software/make/manual/html_node/Makefile-Conventions.html
5prefix ?= /usr/local
5datarootdir ?= $(prefix)/share 6datarootdir ?= $(prefix)/share
6bindir ?= $(prefix)/bin 7bindir ?= $(prefix)/bin
7 8sysconfdir ?= $(prefix)/etc
8luadir ?= $(datarootdir)/lua/$(LUA_VERSION)
9
10
11INSTALL ?= install 9INSTALL ?= install
12INSTALL_DATA ?= $(INSTALL) -m 644 10INSTALL_DATA ?= $(INSTALL) -m 644
13 11
14SHEBANG = '\#!$(LUA_BINDIR)/$(LUA_INTERPRETER)' 12LUA_INTERPRETER ?= lua
13ifdef LUA_BINDIR
14LUA = $(LUA_BINDIR)/$(LUA_INTERPRETER)
15SHEBANG = \#!$(LUA_BINDIR)/$(LUA_INTERPRETER)
16else
17LUA = $(LUA_INTERPRETER)
18SHEBANG = \#!/usr/bin/env $(LUA_INTERPRETER)
19endif
20LUA_VERSION ?= $(shell $(LUA) -e 'print(_VERSION:match(" (5%.[1234])$$"))')
21rocks_tree ?= $(prefix)
22luarocksconfdir ?= $(sysconfdir)/luarocks
23luadir ?= $(datarootdir)/lua/$(LUA_VERSION)
24
15 25
16LUAROCKS_FILES = $(shell find src/luarocks/ -type f -name '*.lua') 26LUAROCKS_FILES = $(shell find src/luarocks/ -type f -name '*.lua')
17 27