-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
41 lines (32 loc) · 1.11 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
.PHONY: default
default: build
.PHONY: build
build: ## Build the source
dune build @install @examples
.PHONY: test
test: ## Run tests
dune runtest --force
.PHONY: promote-ppx-output
promote-ppx-output: MAKEFILE_DIR=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
promote-ppx-output: ## Promotes the current output of the ppx unit tests to be the new expected output.
dune runtest --force || true # Without the 'true' Make will abort.
cp $(MAKEFILE_DIR)_build/default/tests/test_ppx/test_ppx.result.reformatted.ml \
$(MAKEFILE_DIR)tests/test_ppx/test_ppx.expected.ml
.PHONY: format
format: ## Run OCamlformat on the source
dune build @fmt --auto-promote
.PHONY: clean
clean: ## Clean the source tree
dune clean
.PHONY: tag
tag: ## Tag the current release
dune-release tag
.PHONY: distrib
distrib: ## Create a distribution tarball
dune-release distrib
.PHONY: publish
publish: ## Put the release on GitHub
dune-release publish distrib
.PHONY: help
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'