aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-08-05 14:14:17 +1000
committerHisham Muhammad <hisham@gobolinux.org>2018-08-10 16:52:18 -0300
commit29f544b7269406af115072a25a1cef15c7053d5f (patch)
tree24eb355b5235b08509c421a8396935859079687a /Makefile
parent9f7d9f75816e075c4a61ad818f02b067815fe29b (diff)
downloadluarocks-29f544b7269406af115072a25a1cef15c7053d5f.tar.gz
luarocks-29f544b7269406af115072a25a1cef15c7053d5f.tar.bz2
luarocks-29f544b7269406af115072a25a1cef15c7053d5f.zip
Move config-.lua.in generation to Makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index a72bdbcd..a96091ee 100644
--- a/Makefile
+++ b/Makefile
@@ -39,6 +39,19 @@ config.unix:
39 @exit 1 39 @exit 1
40 40
41config-$(LUA_VERSION).lua.in: config.unix 41config-$(LUA_VERSION).lua.in: config.unix
42 @printf -- '-- LuaRocks configuration\n\n'\
43 'rocks_trees = {\n'\
44 ' { name = "user", root = home .. "/.luarocks" };\n'\
45 ' { name = "system", root = "'"$(rocks_tree)"'" };\n'\
46 '}\n'\
47 "$$([ -n "$(LUA_INTERPRETER)" ] && printf 'lua_interpreter = "%s";\\n' "$(LUA_INTERPRETER)")"\
48 'variables = {\n'\
49 "$$([ -n "$(LUA_DIR)" ] && printf ' LUA_DIR = "%s";\\n' "$(LUA_DIR)")"\
50 "$$([ -n "$(LUA_INCDIR)" ] && printf ' LUA_INCDIR = "%s";\\n' "$(LUA_INCDIR)")"\
51 "$$([ -n "$(LUA_BINDIR)" ] && printf ' LUA_BINDIR = "%s";\\n' "$(LUA_BINDIR)")"\
52 "$$([ -n "$(LUA_LIBDIR)" ] && printf ' LUA_LIBDIR = "%s";\\n' "$(LUA_LIBDIR)")"\
53 '}\n'\
54 > $@
42 55
43luarocks: config.unix config-$(LUA_VERSION).lua.in 56luarocks: config.unix config-$(LUA_VERSION).lua.in
44 rm -f src/luarocks/core/hardcoded.lua 57 rm -f src/luarocks/core/hardcoded.lua