aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPeter Melnichenko <mpeterval@gmail.com>2018-07-10 18:44:54 +0300
committerHisham Muhammad <hisham@gobolinux.org>2018-07-10 20:27:08 -0300
commit74352926fd13834b5b369a70aff3481357483833 (patch)
treee69f369614a740ba9bfd8c5e4576e55eb8ed8692 /Makefile
parent9d38b91692d53cc485c55bad8d55357f04b30141 (diff)
downloadluarocks-74352926fd13834b5b369a70aff3481357483833.tar.gz
luarocks-74352926fd13834b5b369a70aff3481357483833.tar.bz2
luarocks-74352926fd13834b5b369a70aff3481357483833.zip
Use $(CURDIR) instead of $(PWD) in Makefiles
$(CURDIR) is built-in and is guaranteed to always work. $(PWD) is inherited from the shell and may be incorrect or missing. In particular, it is invalid if make is run by some program that changes current directory prior to the execution.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index df89f11a..28de3dbe 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ config-$(LUA_VERSION).lua.in: config.unix
20 rm -f src/luarocks/core/hardcoded.lua 20 rm -f src/luarocks/core/hardcoded.lua
21 echo "#!/bin/sh" > luarocks 21 echo "#!/bin/sh" > luarocks
22 echo "unset LUA_PATH LUA_PATH_5_2 LUA_PATH_5_3 LUA_PATH_5_4" >> luarocks 22 echo "unset LUA_PATH LUA_PATH_5_2 LUA_PATH_5_3 LUA_PATH_5_4" >> luarocks
23 echo 'LUAROCKS_SYSCONFDIR="$(SYSCONFDIR)" LUA_PATH="$(PWD)/src/?.lua;;" exec "$(LUA_BINDIR)/$(LUA_INTERPRETER)" "$(PWD)/src/bin/luarocks" --project-tree="$(PWD)/lua_modules" "$$@"' >> luarocks 23 echo 'LUAROCKS_SYSCONFDIR="$(SYSCONFDIR)" LUA_PATH="$(CURDIR)/src/?.lua;;" exec "$(LUA_BINDIR)/$(LUA_INTERPRETER)" "$(CURDIR)/src/bin/luarocks" --project-tree="$(CURDIR)/lua_modules" "$$@"' >> luarocks
24 chmod +rx ./luarocks 24 chmod +rx ./luarocks
25 ./luarocks init 25 ./luarocks init
26 cp config-$(LUA_VERSION).lua.in .luarocks/config-$(LUA_VERSION).lua 26 cp config-$(LUA_VERSION).lua.in .luarocks/config-$(LUA_VERSION).lua
@@ -29,7 +29,7 @@ luarocks-admin: config.unix
29 rm -f src/luarocks/core/hardcoded.lua 29 rm -f src/luarocks/core/hardcoded.lua
30 echo "#!/bin/sh" > luarocks-admin 30 echo "#!/bin/sh" > luarocks-admin
31 echo "unset LUA_PATH LUA_PATH_5_2 LUA_PATH_5_3 LUA_PATH_5_4" >> luarocks-admin 31 echo "unset LUA_PATH LUA_PATH_5_2 LUA_PATH_5_3 LUA_PATH_5_4" >> luarocks-admin
32 echo 'LUAROCKS_SYSCONFDIR="$(SYSCONFDIR)" LUA_PATH="$(PWD)/src/?.lua;;" exec "$(LUA_BINDIR)/$(LUA_INTERPRETER)" "$(PWD)/src/bin/luarocks-admin" --project-tree="$(PWD)/lua_modules" "$$@"' >> luarocks-admin 32 echo 'LUAROCKS_SYSCONFDIR="$(SYSCONFDIR)" LUA_PATH="$(CURDIR)/src/?.lua;;" exec "$(LUA_BINDIR)/$(LUA_INTERPRETER)" "$(CURDIR)/src/bin/luarocks-admin" --project-tree="$(CURDIR)/lua_modules" "$$@"' >> luarocks-admin
33 chmod +rx ./luarocks-admin 33 chmod +rx ./luarocks-admin
34 34
35# ---------------------------------------- 35# ----------------------------------------
@@ -69,10 +69,10 @@ BINARY_TARGET=build-binary
69binary: $(BINARY_TARGET)/luarocks.exe $(BINARY_TARGET)/luarocks-admin.exe 69binary: $(BINARY_TARGET)/luarocks.exe $(BINARY_TARGET)/luarocks-admin.exe
70 70
71$(BINARY_TARGET)/luarocks.exe: ./luarocks 71$(BINARY_TARGET)/luarocks.exe: ./luarocks
72 LUA_PATH="$(PWD)/src/?.lua;;" "$(LUA_BINDIR)/$(LUA_INTERPRETER)" binary/all_in_one "src/bin/luarocks" "$(LUA_DIR)" "^src/luarocks/admin/" "$(SYSCONFDIR)" $(BINARY_TARGET) $(BINARY_PLATFORM) $(BINARY_CC) $(BINARY_NM) $(BINARY_SYSROOT) 72 LUA_PATH="$(CURDIR)/src/?.lua;;" "$(LUA_BINDIR)/$(LUA_INTERPRETER)" binary/all_in_one "src/bin/luarocks" "$(LUA_DIR)" "^src/luarocks/admin/" "$(SYSCONFDIR)" $(BINARY_TARGET) $(BINARY_PLATFORM) $(BINARY_CC) $(BINARY_NM) $(BINARY_SYSROOT)
73 73
74$(BINARY_TARGET)/luarocks-admin.exe: ./luarocks 74$(BINARY_TARGET)/luarocks-admin.exe: ./luarocks
75 LUA_PATH="$(PWD)/src/?.lua;;" "$(LUA_BINDIR)/$(LUA_INTERPRETER)" binary/all_in_one "src/bin/luarocks-admin" "$(LUA_DIR)" "^src/luarocks/cmd/" "$(SYSCONFDIR)" $(BINARY_TARGET) $(BINARY_PLATFORM) $(BINARY_CC) $(BINARY_NM) $(BINARY_SYSROOT) 75 LUA_PATH="$(CURDIR)/src/?.lua;;" "$(LUA_BINDIR)/$(LUA_INTERPRETER)" binary/all_in_one "src/bin/luarocks-admin" "$(LUA_DIR)" "^src/luarocks/cmd/" "$(SYSCONFDIR)" $(BINARY_TARGET) $(BINARY_PLATFORM) $(BINARY_CC) $(BINARY_NM) $(BINARY_SYSROOT)
76 76
77# ---------------------------------------- 77# ----------------------------------------
78# Binary install 78# Binary install