2020-09-26 12:02:53 +02:00
|
|
|
# Frontend to dune.
|
|
|
|
|
2021-01-01 18:07:06 +01:00
|
|
|
# No implicit rules
|
|
|
|
MAKEFLAGS += --no-builtin-rules
|
|
|
|
.SUFFIXES:
|
|
|
|
|
2021-01-01 16:39:33 +01:00
|
|
|
DIRS=$(shell ls */README.org | sed "s|/README.org||g")
|
2021-01-01 18:35:37 +01:00
|
|
|
DOCS=$(patsubst %, docs/%.html, $(DIRS)) docs/index.html
|
2021-01-01 16:39:33 +01:00
|
|
|
|
2021-01-01 18:07:06 +01:00
|
|
|
.PHONY: default build install uninstall test clean doc
|
2020-09-26 12:02:53 +02:00
|
|
|
|
2021-01-01 18:35:37 +01:00
|
|
|
default: doc build
|
2021-01-01 16:39:33 +01:00
|
|
|
|
2021-01-01 18:35:37 +01:00
|
|
|
docs/%.html: %/*.org %/lib/*.ml %/lib/*.mli %/test/*.ml
|
2021-01-01 16:39:33 +01:00
|
|
|
- ./bin/tangle.sh $*
|
|
|
|
|
2021-01-04 23:15:27 +01:00
|
|
|
docs/top.html: */*.org */lib/*.ml */lib/*.mli
|
|
|
|
- ./bin/tangle.sh top
|
|
|
|
|
2021-01-01 16:39:33 +01:00
|
|
|
doc: $(DOCS)
|
2020-09-26 12:02:53 +02:00
|
|
|
|
2021-01-01 17:05:25 +01:00
|
|
|
build: doc
|
2020-09-26 12:02:53 +02:00
|
|
|
dune build
|
|
|
|
|
|
|
|
test:
|
|
|
|
dune runtest -f
|
|
|
|
|
|
|
|
install:
|
|
|
|
dune install
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
dune uninstall
|
|
|
|
|
|
|
|
clean:
|
|
|
|
dune clean
|
|
|
|
# Optionally, remove all files/folders ignored by git as defined
|
|
|
|
# in .gitignore (-X).
|
|
|
|
git clean -dfXq
|