aboutsummaryrefslogtreecommitdiff
path: root/Makefile.dune
blob: e04982650f5bcefadb895db27b176674a0584a32 (plain)
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
# -*- mode: makefile -*-
# Dune Makefile for Coq

.PHONY: help voboot states world apidoc

# use DUNEOPT=--display=short for a more verbose build
# DUNEOPT=--display=short

BUILD_CONTEXT=_build/default

help:
	@echo "Welcome to Coq's Dune-based build system. Targets are:"
	@echo "  - states:  build a minimal functional coqtop"
	@echo "  - world:   build all binaries and libraries"
	@echo "  - release: build Coq in release mode"
	@echo "  - apidoc:  build ML API documentation"
	@echo "  - clean:   remove build directory and autogenerated files"
	@echo "  - help:    show this message"

voboot:
	dune build $(DUNEOPT) @vodeps
	dune exec coq_dune $(BUILD_CONTEXT)/.vfiles.d

states: voboot
	dune build $(DUNEOPT) theories/Init/Prelude.vo

world: voboot
	dune build $(DUNEOPT) @install

release: voboot
	dune build $(DUNEOPT) -p coq

apidoc:
        # Ugly workaround for https://github.com/ocaml/odoc/issues/148
	mv checker/dune checker/dune.disabled || true
	dune build $(DUNEOPT) @doc
	mv checker/dune.disabled checker/dune || true

clean:
	dune clean

# Other common dev targets
#
# dune build coq.install
# dune build ide/coqide.install

# Packaging / OPAM targets:
#
# dune -p coq @install
# dune -p coqide @install