forked from ocaml/dune
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
84 lines (60 loc) · 1.74 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
PREFIX_ARG := $(if $(PREFIX),--prefix $(PREFIX),)
LIBDIR_ARG := $(if $(LIBDIR),--libdir $(LIBDIR),)
INSTALL_ARGS := $(PREFIX_ARG) $(LIBDIR_ARG)
BIN := ./_boot/default/bin/main_dune.exe
-include Makefile.dev
default: boot.exe
./boot.exe
release: boot.exe
./boot.exe --release
boot.exe: bootstrap.ml
ocaml bootstrap.ml
install:
$(BIN) install $(INSTALL_ARGS) dune --build-dir _boot
uninstall:
$(BIN) uninstall $(INSTALL_ARGS) dune --build-dir _boot
reinstall: uninstall reinstall
test:
$(BIN) runtest
test-js:
$(BIN) build @runtest-js
test-coq:
$(BIN) build @runtest-coq
test-all:
$(BIN) build @runtest @runtest-js @runtest-coq
check:
$(BIN) build @check
promote:
$(BIN) promote
accept-corrections: promote
all-supported-ocaml-versions:
$(BIN) build @install @runtest --workspace dune-workspace.dev --root .
clean:
rm -f ./boot.exe $(wildcard ./bootstrap.cmi ./bootstrap.cmo ./bootstrap.exe)
$(BIN) clean || true
rm -rf _boot
distclean: clean
rm -f src/setup.ml
doc:
cd doc && sphinx-build . _build
livedoc:
cd doc && sphinx-autobuild . _build \
-p 8888 -q --host $(shell hostname) -r '\.#.*'
update-jbuilds: $(BIN)
$(BIN) build @doc/runtest --auto-promote
# If the first argument is "run"...
ifeq (dune,$(firstword $(MAKECMDGOALS)))
# use the rest as arguments for "run"
RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
# ...and turn them into do-nothing targets
$(eval $(RUN_ARGS):;@:)
endif
dune: $(BIN)
$(BIN) $(RUN_ARGS)
.PHONY: default install uninstall reinstall clean test doc
.PHONY: promote accept-corrections opam-release dune check
opam-release:
dune-release distrib --skip-build --skip-lint --skip-tests
dune-release publish distrib --verbose
dune-release opam pkg
dune-release opam submit