aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-08-05 12:52:10 +1000
committerHisham Muhammad <hisham@gobolinux.org>2018-08-10 16:52:18 -0300
commit449297aa6502e7e8f1f871cc95704dc417a6ed79 (patch)
treedbdb38016fd0b7070d4a0e274ce72be75fd65ef4
parent0bf6fac7609b2570019c418315a1ef5bf2aa0073 (diff)
downloadluarocks-449297aa6502e7e8f1f871cc95704dc417a6ed79.tar.gz
luarocks-449297aa6502e7e8f1f871cc95704dc417a6ed79.tar.bz2
luarocks-449297aa6502e7e8f1f871cc95704dc417a6ed79.zip
Makefile: Use 'install' for installing lua source files
-rw-r--r--Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index fa3ff4e8..5b8f6377 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,7 @@
4INSTALL ?= install 4INSTALL ?= install
5INSTALL_DATA ?= $(INSTALL) -m 644 5INSTALL_DATA ?= $(INSTALL) -m 644
6 6
7LUAROCKS_FILES = $(shell find src/luarocks/ -type f -name '*.lua')
7 8
8all: build 9all: build
9 10
@@ -56,9 +57,7 @@ luarocks-admin: config.unix
56# Regular install 57# Regular install
57# ---------------------------------------- 58# ----------------------------------------
58 59
59install: all $(DESTDIR)$(prefix)/bin/luarocks $(DESTDIR)$(prefix)/bin/luarocks-admin $(DESTDIR)$(luarocksconfdir)/config-$(LUA_VERSION).lua 60install: $(DESTDIR)$(prefix)/bin/luarocks $(DESTDIR)$(prefix)/bin/luarocks-admin $(DESTDIR)$(luarocksconfdir)/config-$(LUA_VERSION).lua $(patsubst src/%, $(DESTDIR)$(prefix)/share/lua/$(LUA_VERSION)/%, $(LUAROCKS_FILES))
60 mkdir -p "$(DESTDIR)$(prefix)/share/lua/$(LUA_VERSION)/luarocks"
61 cp -a src/luarocks/* "$(DESTDIR)$(prefix)/share/lua/$(LUA_VERSION)/luarocks"
62 61
63$(DESTDIR)$(prefix)/bin/luarocks: ./build/luarocks 62$(DESTDIR)$(prefix)/bin/luarocks: ./build/luarocks
64 $(INSTALL) -D "$<" "$@" 63 $(INSTALL) -D "$<" "$@"
@@ -66,6 +65,9 @@ $(DESTDIR)$(prefix)/bin/luarocks: ./build/luarocks
66$(DESTDIR)$(prefix)/bin/luarocks-admin: ./build/luarocks-admin 65$(DESTDIR)$(prefix)/bin/luarocks-admin: ./build/luarocks-admin
67 $(INSTALL) -D "$<" "$@" 66 $(INSTALL) -D "$<" "$@"
68 67
68$(DESTDIR)$(prefix)/share/lua/$(LUA_VERSION)/luarocks/%.lua: src/luarocks/%.lua
69 $(INSTALL_DATA) -D "$<" "$@"
70
69$(DESTDIR)$(luarocksconfdir)/config-$(LUA_VERSION).lua: config-$(LUA_VERSION).lua.in 71$(DESTDIR)$(luarocksconfdir)/config-$(LUA_VERSION).lua: config-$(LUA_VERSION).lua.in
70 $(INSTALL_DATA) -D "$<" "$@" 72 $(INSTALL_DATA) -D "$<" "$@"
71 73