Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/luajit-rocks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'luarocks/Makefile.install.inc')
-rw-r--r--luarocks/Makefile.install.inc22
1 files changed, 22 insertions, 0 deletions
diff --git a/luarocks/Makefile.install.inc b/luarocks/Makefile.install.inc
new file mode 100644
index 0000000..20d96a1
--- /dev/null
+++ b/luarocks/Makefile.install.inc
@@ -0,0 +1,22 @@
+
+.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"; \
+ 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
+