-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
25 lines (18 loc) · 1.21 KB
/
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
default : fmt tidy test book
fmt :
find . -name \*.go | xargs gofmt -w
tidy :
go mod tidy
test :
go test ./...
book : doc/book/bachdoc/builtin/null.md doc/book/bachdoc/builtin/io.md doc/book/bachdoc/builtin/logic.md doc/book/bachdoc/builtin/math.md doc/book/bachdoc/builtin/text.md doc/book/bachdoc/builtin/arr.md doc/book/bachdoc/builtin/obj.md doc/book/bachdoc/builtin/types.md doc/book/bachdoc/builtin/values.md doc/book/bachdoc/builtin/regexp.md doc/book/bachdoc/builtin/control.md doc/book/bachdoc/examples/simple-types.md doc/book/bachdoc/examples/array-types.md doc/book/bachdoc/examples/object-types.md doc/book/bachdoc/examples/union-types.md doc/book/bachdoc/examples/num-literals.md doc/book/bachdoc/examples/str-literals.md doc/book/bachdoc/examples/arr-literals.md doc/book/bachdoc/examples/obj-literals.md
mdbook build doc/book
doc/book/bachdoc/builtin/%.md : builtin/%.go bachdoc/main.go
mkdir -p "$$(dirname $@)"
go run bachdoc/main.go builtin $* > $@
doc/book/bachdoc/examples/%.md : interpreter/examples.go bachdoc/main.go
mkdir -p "$$(dirname $@)"
go run bachdoc/main.go examples $* > $@
deploy : book
if [ -z $$DPLDEST ]; then echo DPLDEST is unset; exit 1; fi
rsync -Pahz doc/book/book/ $$DPLDEST/