-
Notifications
You must be signed in to change notification settings - Fork 124
/
Makefile
70 lines (58 loc) · 1.6 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
OPAM_LIB := $(shell opam config var lib 2>/dev/null)
OPAM_STUBS := $(shell opam config var stublibs 2>/dev/null)
.PHONY: all
all: build
.PHONY: build
build:
dune build @install
.PHONY: test
test:
dune runtest -j 1 --no-buffer -p owl
.PHONY: clean
clean:
dune clean
.PHONY: install
install: build
dune install
[ -f "$(OPAM_LIB)/stubslibs/dllowl_stubs.so" ] \
&& mv "$(OPAM_LIB)/stubslibs/dllowl_stubs.so" \
"$(OPAM_STUBS)/dllowl_stubs.so" || true
[ -f "$(OPAM_LIB)/stubslibs/dllowl_opencl_stubs.so" ] \
&& mv "$(OPAM_LIB)/stubslibs/dllowl_opencl_stubs.so" \
"$(OPAM_STUBS)/dllowl_opencl_stubs.so" || true
$(RM) -d $(OPAM_LIB)/stubslibs || true
.PHONY: uninstall
uninstall:
dune uninstall
$(RM) $(OPAM_STUBS)/dllowl_stubs.so
$(RM) $(OPAM_STUBS)/dllowl_opencl_stubs.so
.PHONY: doc
doc:
dune build @doc
# cat docs/mathjax.js docs/highlight.pack.js >> _build/default/_doc/_html/highlight.pack.js
cp -r _build/default/_doc/_html/* docs
.PHONY: distclean cleanall
distclean cleanall:
dune uninstall && dune clean
$(RM) -r $(find . -name .merlin)
$(RM) $(OPAM_STUBS)/dllowl_stubs.so
$(RM) $(OPAM_STUBS)/dllowl_opencl_stubs.so
PKGS=owl-base,owl,owl-zoo,owl-top
.PHONY: release
release:
make install # as package distrib steps rely on owl-base etc
opam install --yes dune-release
dune-release tag
dune-release distrib
dune-release publish
dune-release opam pkg -p owl-base
dune-release opam pkg -p owl
dune-release opam pkg -p owl-zoo
dune-release opam pkg -p owl-top
dune-release opam submit -p $(PKGS)
.PHONY: format
format:
dune build @fmt --auto-promote
.PHONY: cloc
loc:
cloc src/