diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2019-08-28 14:45:40 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2019-08-28 14:46:00 -0300 |
commit | e9215f139be7afa3af116a2039594362e4f1f2be (patch) | |
tree | 7587765ea569bd6ec71d38b2c5907f8df281fb55 | |
parent | 47e0f2f0730ccc7cbd6e15d6920cc023996a088b (diff) | |
download | luarocks-e9215f139be7afa3af116a2039594362e4f1f2be.tar.gz luarocks-e9215f139be7afa3af116a2039594362e4f1f2be.tar.bz2 luarocks-e9215f139be7afa3af116a2039594362e4f1f2be.zip |
Ensure that LuaRocks always finds itself
-rw-r--r-- | GNUmakefile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/GNUmakefile b/GNUmakefile index 22f1e918..cd9e5a8f 100644 --- a/GNUmakefile +++ b/GNUmakefile | |||
@@ -69,7 +69,7 @@ $(builddir)/luarocks: src/bin/luarocks config.unix | |||
69 | 'package.loaded["luarocks.core.hardcoded"] = { '\ | 69 | 'package.loaded["luarocks.core.hardcoded"] = { '\ |
70 | "$$([ -n "$(FORCE_CONFIG)" ] && printf 'FORCE_CONFIG = true, ')"\ | 70 | "$$([ -n "$(FORCE_CONFIG)" ] && printf 'FORCE_CONFIG = true, ')"\ |
71 | 'SYSCONFDIR = [[$(luarocksconfdir)]] }\n'\ | 71 | 'SYSCONFDIR = [[$(luarocksconfdir)]] }\n'\ |
72 | 'package.path=[[$(luadir)/?.lua;]] .. package.path\n'; \ | 72 | 'local list = package.searchers or package.loaders; table.insert(list, 1, function(name) if name:match("^luarocks%%.") then return loadfile([[$(luadir)/]] .. name:gsub([[%%.]], [[/]]) .. [[.lua]]) end end)\n'; \ |
73 | tail -n +2 src/bin/luarocks \ | 73 | tail -n +2 src/bin/luarocks \ |
74 | )> "$@" | 74 | )> "$@" |
75 | 75 | ||
@@ -79,7 +79,7 @@ $(builddir)/luarocks-admin: src/bin/luarocks-admin config.unix | |||
79 | 'package.loaded["luarocks.core.hardcoded"] = { '\ | 79 | 'package.loaded["luarocks.core.hardcoded"] = { '\ |
80 | "$$([ -n "$(FORCE_CONFIG)" ] && printf 'FORCE_CONFIG = true, ')"\ | 80 | "$$([ -n "$(FORCE_CONFIG)" ] && printf 'FORCE_CONFIG = true, ')"\ |
81 | 'SYSCONFDIR = [[$(luarocksconfdir)]] }\n'\ | 81 | 'SYSCONFDIR = [[$(luarocksconfdir)]] }\n'\ |
82 | 'package.path=[[$(luadir)/?.lua;]] .. package.path\n'; \ | 82 | 'local list = package.searchers or package.loaders; table.insert(list, 1, function(name) if name:match("^luarocks%%.") then return loadfile([[$(luadir)/]] .. name:gsub([[%%.]], [[/]]) .. [[.lua]]) end end)\n'; \ |
83 | tail -n +2 src/bin/luarocks-admin \ | 83 | tail -n +2 src/bin/luarocks-admin \ |
84 | )> "$@" | 84 | )> "$@" |
85 | 85 | ||