diff options
author | daurnimator <quae@daurnimator.com> | 2018-08-05 14:10:59 +1000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-08-10 16:52:18 -0300 |
commit | 2d652d33e97c7c439932324350d794e32b7576bc (patch) | |
tree | 0af9cdca88ada1f7556850e48685a2c1274d5efa | |
parent | 949f9cf25cd984499f756251e59fe22be7aeaa37 (diff) | |
download | luarocks-2d652d33e97c7c439932324350d794e32b7576bc.tar.gz luarocks-2d652d33e97c7c439932324350d794e32b7576bc.tar.bz2 luarocks-2d652d33e97c7c439932324350d794e32b7576bc.zip |
Makefile: Move shebang into variable
-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 \ |