-
Notifications
You must be signed in to change notification settings - Fork 31
/
Makefile
47 lines (29 loc) · 872 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
47
# The package gen_js_api is released under the terms of an MIT-like license.
# See the attached LICENSE file.
# Copyright 2015 by LexiFi.
.PHONY: all examples test test-promote clean install uninstall doc reindent publish
all:
dune build @install @DEFAULT
examples:
dune build @examples/DEFAULT
doc:
dune build @doc
test:
dune build @runtest
test-promote:
dune build @runtest --auto-promote
clean:
dune clean
PREFIX := $$(opam config var prefix)
install:
opam-installer --prefix $(PREFIX) gen_js_api.install
uninstall:
opam-installer -u --prefix $(PREFIX) gen_js_api.install
reindent:
git ls-files *.ml *.mli | grep -v expected | xargs ocp-indent -i
VERSION := $$(opam show . | grep "^version" | sort -u | sed 's/version *//')
publish: all
echo "Publishing v$(VERSION) ..."
git tag -a v$(VERSION)
git push origin v$(VERSION)
opam publish