aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-08-05 14:10:59 +1000
committerHisham Muhammad <hisham@gobolinux.org>2018-08-10 16:52:18 -0300
commit2d652d33e97c7c439932324350d794e32b7576bc (patch)
tree0af9cdca88ada1f7556850e48685a2c1274d5efa
parent949f9cf25cd984499f756251e59fe22be7aeaa37 (diff)
downloadluarocks-2d652d33e97c7c439932324350d794e32b7576bc.tar.gz
luarocks-2d652d33e97c7c439932324350d794e32b7576bc.tar.bz2
luarocks-2d652d33e97c7c439932324350d794e32b7576bc.zip
Makefile: Move shebang into variable
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index ffc5e6e8..0ac52ca4 100644
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,8 @@ luadir ?= $(datarootdir)/lua/$(LUA_VERSION)
11INSTALL ?= install 11INSTALL ?= install
12INSTALL_DATA ?= $(INSTALL) -m 644 12INSTALL_DATA ?= $(INSTALL) -m 644
13 13
14SHEBANG = '\#!$(LUA_BINDIR)/$(LUA_INTERPRETER)'
15
14LUAROCKS_FILES = $(shell find src/luarocks/ -type f -name '*.lua') 16LUAROCKS_FILES = $(shell find src/luarocks/ -type f -name '*.lua')
15 17
16all: build 18all: 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 \