-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
49 lines (39 loc) · 1.33 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
OCAMLBUILD=ocamlbuild -j 0 -use-ocamlfind -classic-display \
-plugin-tag 'package(cppo_ocamlbuild)'
build:
cp pkg/META.in pkg/META
ocaml pkg/build.ml native=true native-dynlink=true utop=true
run: build
rlwrap ocaml \
$(shell ocamlfind query -predicates byte,toploop -r -a-format \
findlib compiler-libs.common unix gen uutf uunf uucp) \
_build/src/m17n.cma _build/src/m17n_toploop.cmo
run_utop: build
utop \
$(shell ocamlfind query -predicates byte,toploop -r -a-format \
compiler-libs.common gen uutf uunf uucp) \
_build/src/m17n.cma _build/src/m17n_utop.cmo
test: build
rm -rf _build/src_test
$(OCAMLBUILD) \
src_test/test_m17n.byte --
gen:
[ -e src_gen/confusables.txt ] || \
wget http://www.unicode.org/Public/security/7.0.0/confusables.txt \
-O src_gen/confusables.txt
$(OCAMLBUILD) \
src_gen/gen_confusables.native -- \
src_gen/confusables.txt src/m17n_confusable_gen.ml
clean:
ocamlbuild -clean
.PHONY: build test clean
VERSION := $$(opam query --version)
NAME_VERSION := $$(opam query --name-version)
ARCHIVE := $$(opam query --archive)
release:
git tag -a v$(VERSION) -m "Version $(VERSION)."
git push origin v$(VERSION)
opam publish prepare $(NAME_VERSION) $(ARCHIVE)
opam publish submit $(NAME_VERSION)
rm -rf $(NAME_VERSION)
.PHONY: release