ocaml-containers/Makefile
2018-01-14 17:43:56 -06:00

44 lines
1.1 KiB
Makefile

# OASIS_START
# DO NOT EDIT (digest: 4c293511860bb966e727ba6f0ecc8197)
all: build test
build:
jbuilder build @install
test:
jbuilder runtest --no-buffer
clean:
jbuilder clean
doc:
jbuilder build @doc
BENCH_TARGETS=run_benchs.exe run_bench_hash.exe
benchs:
jbuilder build $(addprefix bench/, $(BENCH_TARGETS))
examples:
jbuilder build examples/id_sexp.exe
VERSION=$(shell awk '/^version:/ {print $$2}' containers.opam)
update_next_tag:
@echo "update version to $(VERSION)..."
sed -i "s/NEXT_VERSION/$(VERSION)/g" src/*.ml src/*.mli
sed -i "s/NEXT_RELEASE/$(VERSION)/g" src/*.ml src/*.mli
watch:
while find src/ benchs/ -print0 | xargs -0 inotifywait -e delete_self -e modify ; do \
echo "============ at `date` ==========" ; \
make all; \
done
reindent:
@which ocp-indent || ( echo "require ocp-indent" ; exit 1 )
@find src '(' -name '*.ml' -or -name '*.mli' ')' -type f -print0 | xargs -0 echo "reindenting: "
@find src '(' -name '*.ml' -or -name '*.mli' ')' -type f -print0 | xargs -0 ocp-indent -i
.PHONY: all test clean build doc update_next_tag watch