make: add clean rule for ease of switching dev/master branches

pull/361/head
Yuya Nishihara 2022-07-07 23:34:48 +07:00
parent c7c7c2749a
commit 4bc26974c1
1 changed files with 13 additions and 0 deletions

@ -5,6 +5,7 @@ TREE_SITTER = node_modules/.bin/tree-sitter
help:
@echo 'Make targets:'
@echo ' generate - generate parser sources'
@echo ' clean - remove build directory and intermediate files'
@echo ' tests - run all tests'
@echo ' fetch-examples - fetch example repositories'
@echo ' parse-examples - parse example files'
@ -36,6 +37,18 @@ src/typescript-scanner.h: \
cat $<; \
) > $@
.PHONY: clean
clean:
$(RM) -R build target
$(RM) \
queries/highlights-javascript.scm \
queries/highlights-typescript.scm \
src/grammar.json \
src/node-types.json \
src/parser.c \
src/tree_sitter/parser.h \
src/typescript-scanner.h
.PHONY: tests
tests:
$(TREE_SITTER) test $(TESTFLAGS)