diff options
-rw-r--r-- | Makefile | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -11,6 +11,8 @@ luadir ?= $(datarootdir)/lua/$(LUA_VERSION) | |||
11 | INSTALL ?= install | 11 | INSTALL ?= install |
12 | INSTALL_DATA ?= $(INSTALL) -m 644 | 12 | INSTALL_DATA ?= $(INSTALL) -m 644 |
13 | 13 | ||
14 | SHEBANG = '\#!$(LUA_BINDIR)/$(LUA_INTERPRETER)' | ||
15 | |||
14 | LUAROCKS_FILES = $(shell find src/luarocks/ -type f -name '*.lua') | 16 | LUAROCKS_FILES = $(shell find src/luarocks/ -type f -name '*.lua') |
15 | 17 | ||
16 | all: build | 18 | all: build |
@@ -46,7 +48,7 @@ luarocks-admin: config.unix | |||
46 | 48 | ||
47 | ./build/luarocks: src/bin/luarocks config.unix | 49 | ./build/luarocks: src/bin/luarocks config.unix |
48 | mkdir -p "$(@D)" | 50 | mkdir -p "$(@D)" |
49 | (printf '#!$(LUA_BINDIR)/$(LUA_INTERPRETER)\n'\ | 51 | (printf '$(SHEBANG)\n'\ |
50 | 'package.loaded["luarocks.core.hardcoded"] = { SYSCONFDIR = [[$(luarocksconfdir)]] }\n'\ | 52 | 'package.loaded["luarocks.core.hardcoded"] = { SYSCONFDIR = [[$(luarocksconfdir)]] }\n'\ |
51 | 'package.path=[[$(luadir)/?.lua;]] .. package.path\n'; \ | 53 | 'package.path=[[$(luadir)/?.lua;]] .. package.path\n'; \ |
52 | tail -n +2 src/bin/luarocks \ | 54 | tail -n +2 src/bin/luarocks \ |
@@ -54,7 +56,7 @@ luarocks-admin: config.unix | |||
54 | 56 | ||
55 | ./build/luarocks-admin: src/bin/luarocks-admin config.unix | 57 | ./build/luarocks-admin: src/bin/luarocks-admin config.unix |
56 | mkdir -p "$(@D)" | 58 | mkdir -p "$(@D)" |
57 | (printf '#!$(LUA_BINDIR)/$(LUA_INTERPRETER)\n'\ | 59 | (printf '$(SHEBANG)\n'\ |
58 | 'package.loaded["luarocks.core.hardcoded"] = { SYSCONFDIR = [[$(luarocksconfdir)]] }\n'\ | 60 | 'package.loaded["luarocks.core.hardcoded"] = { SYSCONFDIR = [[$(luarocksconfdir)]] }\n'\ |
59 | 'package.path=[[$(luadir)/?.lua;]] .. package.path\n'; \ | 61 | 'package.path=[[$(luadir)/?.lua;]] .. package.path\n'; \ |
60 | tail -n +2 src/bin/luarocks-admin \ | 62 | tail -n +2 src/bin/luarocks-admin \ |