diff options
author | daurnimator <quae@daurnimator.com> | 2018-08-05 15:53:03 +1000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-08-10 22:49:47 -0300 |
commit | f41044e511baeeb24a5b0a833ec8d17f81794785 (patch) | |
tree | a7cf213a4eb3019ab0eaebbe46d6b1126f73045a /GNUmakefile | |
parent | 3384a49897e50924438df6182863bf474b644f2d (diff) | |
download | luarocks-f41044e511baeeb24a5b0a833ec8d17f81794785.tar.gz luarocks-f41044e511baeeb24a5b0a833ec8d17f81794785.tar.bz2 luarocks-f41044e511baeeb24a5b0a833ec8d17f81794785.zip |
GNUmakefile: create config file in ./build subdirectory
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/GNUmakefile b/GNUmakefile index 23ab0fee..31620502 100644 --- a/GNUmakefile +++ b/GNUmakefile | |||
@@ -38,7 +38,8 @@ config.unix: | |||
38 | @echo | 38 | @echo |
39 | @exit 1 | 39 | @exit 1 |
40 | 40 | ||
41 | config-$(LUA_VERSION).lua.in: config.unix | 41 | $(builddir)/config-$(LUA_VERSION).lua: config.unix |
42 | mkdir -p "$(@D)" | ||
42 | @printf -- '-- LuaRocks configuration\n\n'\ | 43 | @printf -- '-- LuaRocks configuration\n\n'\ |
43 | 'rocks_trees = {\n'\ | 44 | 'rocks_trees = {\n'\ |
44 | ' { name = "user", root = home .. "/.luarocks" };\n'\ | 45 | ' { name = "user", root = home .. "/.luarocks" };\n'\ |
@@ -53,14 +54,14 @@ config-$(LUA_VERSION).lua.in: config.unix | |||
53 | '}\n'\ | 54 | '}\n'\ |
54 | > $@ | 55 | > $@ |
55 | 56 | ||
56 | luarocks: config.unix config-$(LUA_VERSION).lua.in | 57 | luarocks: config.unix $(builddir)/config-$(LUA_VERSION).lua |
57 | rm -f src/luarocks/core/hardcoded.lua | 58 | rm -f src/luarocks/core/hardcoded.lua |
58 | echo "#!/bin/sh" > luarocks | 59 | echo "#!/bin/sh" > luarocks |
59 | echo "unset LUA_PATH LUA_PATH_5_2 LUA_PATH_5_3 LUA_PATH_5_4" >> luarocks | 60 | echo "unset LUA_PATH LUA_PATH_5_2 LUA_PATH_5_3 LUA_PATH_5_4" >> luarocks |
60 | echo 'LUAROCKS_SYSCONFDIR="$(luarocksconfdir)" LUA_PATH="$(CURDIR)/src/?.lua;;" exec "$(LUA)" "$(CURDIR)/src/bin/luarocks" --project-tree="$(CURDIR)/lua_modules" "$$@"' >> luarocks | 61 | echo 'LUAROCKS_SYSCONFDIR="$(luarocksconfdir)" LUA_PATH="$(CURDIR)/src/?.lua;;" exec "$(LUA)" "$(CURDIR)/src/bin/luarocks" --project-tree="$(CURDIR)/lua_modules" "$$@"' >> luarocks |
61 | chmod +rx ./luarocks | 62 | chmod +rx ./luarocks |
62 | ./luarocks init | 63 | ./luarocks init |
63 | cp config-$(LUA_VERSION).lua.in .luarocks/config-$(LUA_VERSION).lua | 64 | cp $(builddir)/config-$(LUA_VERSION).lua .luarocks/config-$(LUA_VERSION).lua |
64 | 65 | ||
65 | luarocks-admin: config.unix | 66 | luarocks-admin: config.unix |
66 | rm -f src/luarocks/core/hardcoded.lua | 67 | rm -f src/luarocks/core/hardcoded.lua |
@@ -105,7 +106,7 @@ $(DESTDIR)$(bindir)/luarocks-admin: ./build/luarocks-admin | |||
105 | $(DESTDIR)$(luadir)/luarocks/%.lua: src/luarocks/%.lua | 106 | $(DESTDIR)$(luadir)/luarocks/%.lua: src/luarocks/%.lua |
106 | $(INSTALL_DATA) -D "$<" "$@" | 107 | $(INSTALL_DATA) -D "$<" "$@" |
107 | 108 | ||
108 | $(DESTDIR)$(luarocksconfdir)/config-$(LUA_VERSION).lua: config-$(LUA_VERSION).lua.in | 109 | $(DESTDIR)$(luarocksconfdir)/config-$(LUA_VERSION).lua: ./build/config-$(LUA_VERSION).lua |
109 | $(INSTALL_DATA) -D "$<" "$@" | 110 | $(INSTALL_DATA) -D "$<" "$@" |
110 | 111 | ||
111 | uninstall: | 112 | uninstall: |