From 4dd439f804844ce82c1519eede0e9201db72ba77 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Fri, 26 Jul 2019 17:10:24 -0300 Subject: GNUmakefile: copy config file prior to running 'luarocks init' As originally suggested by @blueyed in #1043. --- .gitignore | 1 + GNUmakefile | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 99850056..23f76e8a 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /lua /lua_modules /luarocks +/.luarocks diff --git a/GNUmakefile b/GNUmakefile index 7b877bc9..22f1e918 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -47,13 +47,14 @@ $(builddir)/config-$(LUA_VERSION).lua: config.unix > $@ luarocks: config.unix $(builddir)/config-$(LUA_VERSION).lua + mkdir -p .luarocks + cp $(builddir)/config-$(LUA_VERSION).lua .luarocks/config-$(LUA_VERSION).lua rm -f src/luarocks/core/hardcoded.lua echo "#!/bin/sh" > luarocks echo "unset LUA_PATH LUA_PATH_5_2 LUA_PATH_5_3 LUA_PATH_5_4 LUA_CPATH LUA_CPATH_5_2 LUA_CPATH_5_3 LUA_CPATH_5_4" >> luarocks echo 'LUAROCKS_SYSCONFDIR="$(luarocksconfdir)" LUA_PATH="$(CURDIR)/src/?.lua;;" exec "$(LUA)" "$(CURDIR)/src/bin/luarocks" --project-tree="$(CURDIR)/lua_modules" "$$@"' >> luarocks chmod +rx ./luarocks ./luarocks init - cp $(builddir)/config-$(LUA_VERSION).lua .luarocks/config-$(LUA_VERSION).lua luarocks-admin: config.unix rm -f src/luarocks/core/hardcoded.lua -- cgit v1.2.3-55-g6feb