-
Notifications
You must be signed in to change notification settings - Fork 30
/
Makefile
59 lines (49 loc) · 1.07 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
#
# Build and install code generators and runtime support for generated parsers.
#
# Building and installing support for specific programming languages is done in
# a second phase, in lang/
#
# Generate this with ./configure
include config.mk
PROJECT_ROOT = $(shell pwd)
.PHONY: build
build:
dune build
test -e bin || ln -s _build/install/default/bin .
# Full development setup.
#
# Note that the tree-sitter runtime library must be installed in advance,
# prior to calling ./configure.
#
.PHONY: setup
setup:
./scripts/install-tree-sitter-cli
opam install --deps-only -y .
# Keep things like node_modules that are worth keeping around
.PHONY: clean
clean:
rm -rf bin
dune clean
make -C tests clean
make -C lang clean
.PHONY: distclean
distclean:
# remove everything that's git-ignored
git clean -dfX
.PHONY: test
test: build
$(MAKE) unit
$(MAKE) -C tests
$(MAKE) -C lang build
$(MAKE) -C lang test
# Run unit tests only.
.PHONY: unit
unit: build
./_build/default/src/test/test.exe
.PHONY: install
install:
dune install
.PHONY: ci
ci:
docker build -t ocaml-tree-sitter .