-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
40 lines (27 loc) · 884 Bytes
/
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
all: build test
OPTS?=--profile=release
build:
@dune build @install $(OPTS)
test:
@dune runtest --no-buffer --force $(OPTS)
test-autopromote:
@dune runtest --no-buffer --force $(OPTS) --auto-promote
clean:
@dune clean
format:
@dune build @fmt --auto-promote
format-check:
@dune build @fmt --ignore-promoted-rules
doc:
@dune build @doc
WATCH?= @install @runtest
watch:
@dune build $(OPTS) $(WATCH) -w
.PHONY: benchs tests build watch
VERSION=$(shell awk '/^version:/ {print $$2}' tiny_httpd.opam)
update_next_tag:
@echo "update version to $(VERSION)..."
sed --follow-symlinks -i "s/NEXT_VERSION/$(VERSION)/g" $(wildcard src/**.ml) $(wildcard src/**.mli) \
$(wildcard src/**/*.ml) $(wildcard src/**/*.mli)
sed --follow-symlinks -i "s/NEXT_RELEASE/$(VERSION)/g" $(wildcard src/**.ml) $(wildcard src/**.mli) \
$(wildcard src/**/*.ml) $(wildcard src/**/*.mli)