Skip to content

Commit b3fca1b

Browse files
authored
feat(build): add parser build to makefile (#104)
`make` builds the `parser/vimdoc.so` for Neovim, `make all` runs tests as before.
1 parent 15c2fdc commit b3fca1b

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

Makefile

+19-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
2+
.PHONY: build
3+
4+
build: parser/vimdoc.so
5+
6+
parser/vimdoc.so: src/parser.c
7+
$(RM) $@
8+
mkdir -p parser
9+
$(CC) -o $@ -Isrc $^ -shared -fPIC -Os
10+
11+
src/parser.c: grammar.js
12+
tree-sitter generate
13+
14+
.PHONY: all
115
all:
2-
npm run build
316
npm run test
17+
18+
.PHONY: run
19+
run: all
20+
tree-sitter build-wasm
21+
tree-sitter web-ui

0 commit comments

Comments
 (0)