-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject.zsh
More file actions
71 lines (59 loc) · 1.26 KB
/
project.zsh
File metadata and controls
71 lines (59 loc) · 1.26 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package=pkgxx
version="$(grep "^version = " main.moon | head -n 1 | cut -d \" -f 2)"
variables=(LUA_VERSION 5.1)
# Valid values: moon, script. Set to “moon” to compile to Lua.
moon=script
for i in pkgxx/*.moon pkgxx.moon; do
if [[ "$moon" == moon ]]; then
i="${i%.moon}.lua"
fi
targets+=($i)
type[$i]=$moon
auto[$i]=true
case "$i" in
pkgxx.lua|pkgxx.moon)
install[$i]='$(SHAREDIR)/lua/$(LUA_VERSION)' ;;
*)
install[$i]='$(SHAREDIR)/lua/$(LUA_VERSION)/pkgxx' ;;
esac
done
for i in modules/*.moon; do
if [[ "$moon" == moon ]]; then
i="${i%.moon}.lua"
fi
targets+=($i)
type[$i]=$moon
auto[$i]=true
install[$i]='$(SHAREDIR)/pkgxx'
done
if [[ $moon == moon ]]; then
# main.moon -> main.in -> main.lua
targets+=(main.lua main.in)
type[main.in]=script
type[main.lua]=$moon
sources[main.in]="main.moon"
sources[main.lua]="main.in"
auto[main.in]=true
install[main.in]=-
nodist[main.in]=true
filename[main.lua]="pkgxx"
else
targets+=(main)
type[main]=script
sources[main]="main.moon"
filename[main]=pkgxx
fi
for i in doc/*.[0-9].md; do
targets+=(${i%.md})
type[${i%.md}]=man
sources[${i%.md}]="$i"
done
dist=(
**/*.moon
# Build system.
project.zsh Makefile
# Documentation.
doc/css/ldoc.{css,ltp}
doc/examples/*.moon
README.md
)