-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (36 loc) · 999 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
35
36
37
38
39
40
41
42
43
44
45
46
doc := doc
mod_name := utils
mods := mods
release := release
release_name := utils
test := test
all: test doc
clean:
$(RM) -R $(doc)
.PHONY: doc
doc:
ldoc \
--dir=$(doc) \
--project=$(release_name) \
--title="$(release_name) Reference" \
mods/$(mod_name)
.PHONY: gh-pages
gh-pages:
git subtree push --prefix doc/ github gh-pages
.PHONY: release
release:
# Prepare the directory structure.
mkdir -p $(release)/
mkdir -p $(release)/$(release_name)/
mkdir -p $(release)/$(release_name)/mods/
# Copy the mods.
cp -R $(mods)/$(mod_name) $(release)/$(release_name)/mods/
# Copy the files.
cp LICENSE $(release)/$(release_name)/
cp README $(release)/$(release_name)/
tar -c --xz -C $(release) -f $(release)/$(release_name).tar.xz $(release_name)/
tar -c --gz -C $(release) -f $(release)/$(release_name).tar.gz $(release_name)/
cd $(release); zip -r -9 $(release_name).zip $(release_name); cd -
.SILENT .PHONY: test
test: $(test)/*.lua
$(foreach file,$^,lua $(file);)