diff options
author | daurnimator <quae@daurnimator.com> | 2018-08-05 12:52:10 +1000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-08-10 16:52:18 -0300 |
commit | 449297aa6502e7e8f1f871cc95704dc417a6ed79 (patch) | |
tree | dbdb38016fd0b7070d4a0e274ce72be75fd65ef4 | |
parent | 0bf6fac7609b2570019c418315a1ef5bf2aa0073 (diff) | |
download | luarocks-449297aa6502e7e8f1f871cc95704dc417a6ed79.tar.gz luarocks-449297aa6502e7e8f1f871cc95704dc417a6ed79.tar.bz2 luarocks-449297aa6502e7e8f1f871cc95704dc417a6ed79.zip |
Makefile: Use 'install' for installing lua source files
-rw-r--r-- | Makefile | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -4,6 +4,7 @@ | |||
4 | INSTALL ?= install | 4 | INSTALL ?= install |
5 | INSTALL_DATA ?= $(INSTALL) -m 644 | 5 | INSTALL_DATA ?= $(INSTALL) -m 644 |
6 | 6 | ||
7 | LUAROCKS_FILES = $(shell find src/luarocks/ -type f -name '*.lua') | ||
7 | 8 | ||
8 | all: build | 9 | all: build |
9 | 10 | ||
@@ -56,9 +57,7 @@ luarocks-admin: config.unix | |||
56 | # Regular install | 57 | # Regular install |
57 | # ---------------------------------------- | 58 | # ---------------------------------------- |
58 | 59 | ||
59 | install: all $(DESTDIR)$(prefix)/bin/luarocks $(DESTDIR)$(prefix)/bin/luarocks-admin $(DESTDIR)$(luarocksconfdir)/config-$(LUA_VERSION).lua | 60 | install: $(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 | ||