-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
34 lines (28 loc) · 833 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
LUA_VERSIONS := 5.1 5.2 5.3 5.4
LUA_DIR := /usr/share/lua
SRC_DIR := src
FILES := $(wildcard $(SRC_DIR)/*) LICENSE README.md CHANGELOG.md Makefile test.sh tests examples
.PHONY: all install uninstall test help
all: install
install:
@for version in $(LUA_VERSIONS); do \
dest=$(LUA_DIR)/$$version/LuaXen; \
mkdir -p $$dest; \
$(INSTALL) -m 644 $(FILES) $$dest; \
done
uninstall:
@for version in $(LUA_VERSIONS); do \
dest=$(LUA_DIR)/$$version/LuaXen; \
if [ -d "$$dest" ]; then \
$(RM) -r $$dest; \
fi \
done
test:
@./test.sh
help:
@echo "Available commands:"
@echo " make all - Install the project"
@echo " make install - Install the project"
@echo " make uninstall - Uninstall the project"
@echo " make test - Run tests"
@echo " make help - Show this help"