File: Makefile.install.inc

package info (click to toggle)
luarocks 2.4.2+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 1,056 kB
  • ctags: 607
  • sloc: sh: 523; makefile: 181; ansic: 5
file content (23 lines) | stat: -rw-r--r-- 626 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

.PHONY: install_bins install_luas 

install_bins:
	mkdir -p "$(DESTDIR)$(BINDIR)"
	cd src/bin && \
	luaver="$(LUA_VERSION)" && [ -n "$$luaver" ] || luaver=`$(LUA) -e 'print(_VERSION:sub(5))'`; \
	for f in $(BIN_FILES); \
	do \
	   cp "$$f" "$(DESTDIR)$(BINDIR)/$$f-$$luaver"; \
	   chmod +rx "$(DESTDIR)$(BINDIR)/$$f-$$luaver"; \
	   ln -nfs "$$f-$$luaver" "$(DESTDIR)$(BINDIR)/$$f"; \
	done

install_luas:
	mkdir -p "$(DESTDIR)$(LUADIR)/luarocks"
	cd src/luarocks && for f in $(LUAROCKS_FILES); \
	do \
	   d="$(DESTDIR)$(LUADIR)/luarocks"/`dirname "$$f"` && \
	   mkdir -p "$$d" && \
	   cp "$$f" "$$d" || exit 1; \
	done