-
Notifications
You must be signed in to change notification settings - Fork 330
/
Makefile
74 lines (56 loc) · 1.99 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
.DEFAULT_GOAL := all
.PHONY: all
all:
opam exec -- dune build --root .
.PHONY: deps
deps: create_switch ## Install development dependencies
opam install -y ocamlformat=0.26.2 ocaml-lsp-server
opam install -y --deps-only --with-test --with-doc .
.PHONY: create_switch
create_switch: ## Create switch and pinned opam repo
opam switch create . 5.2.0 --no-install --repos pin=git+https://github.com/ocaml/opam-repository#c45f5bab71d3589f41f9603daca5acad14df0ab0
.PHONY: switch
switch: deps ## Create an opam switch and install development dependencies
.PHONY: lock
lock: ## Generate a lock file
opam lock -y .
.PHONY: build
build: ## Build the project, including non installable libraries and executables
opam exec -- dune build --root .
.PHONY: playground
playground:
make build -C playground
.PHONY: install
install: all ## Install the packages on the system
opam exec -- dune install --root .
.PHONY: start
start: all ## Run the produced executable
opam exec -- dune exec src/ocamlorg_web/bin/main.exe
.PHONY: test
test: ## Run the unit tests
opam exec -- dune build --root . @runtest
.PHONY: clean
clean: ## Clean build artifacts and other generated files
opam exec -- dune clean --root .
.PHONY: doc
doc: ## Generate odoc documentation
opam exec -- dune build --root . @doc
.PHONY: fmt
fmt: ## Format the codebase with ocamlformat
opam exec -- dune build --root . --auto-promote @fmt
.PHONY: watch
watch: ## Watch for the filesystem and rebuild on every change
opam exec -- dune build @run -w --force --no-buffer
.PHONY: utop
utop: ## Run a REPL and link with the project's libraries
opam exec -- dune utop --root . . -- -implicit-bindings
.PHONY: scrape
scrape: ## Generate the po files
opam exec -- dune exec --root . tool/ood-gen/bin/scrape.exe planet
opam exec -- dune exec --root . tool/ood-gen/bin/scrape.exe video
.PHONY: docker
docker: ## Generate docker container
docker build -f Dockerfile . -t ocamlorg:latest
.PHONY: linkcheck
linkcheck:
opam exec -- dune exec --root . olinkcheck md data