820d73f345
Problem: We need to add stylish config to settle code style for our project. Makefile to simplify its building. Also we need to check our project for trailing whitespaces so we need to add the corresponding script to be used later in CI. Solution: Add - stylish-haskell config - Makefile - `check_trailing_whitespace` script
31 lines
534 B
Makefile
31 lines
534 B
Makefile
SITTER ?= tree-sitter
|
|
|
|
DIRS := grammar/pascaligo grammar/reasonligo grammar/camligo
|
|
|
|
PACKAGE := squirrel
|
|
|
|
STACK_DEV_OPTIONS = --fast --ghc-options -Wwarn --file-watch
|
|
|
|
.DEFAULT_GOAL := all
|
|
|
|
all: build
|
|
|
|
FORCE:
|
|
|
|
generate: $(DIRS)
|
|
|
|
$(DIRS): FORCE
|
|
# $(SITTER) generate # Generation is manual for now
|
|
mkdir -p $(PACKAGE)/vendor/$@
|
|
cp $@/src/parser.c vendor/$@/parser.c
|
|
cp -r $@/src/tree_sitter vendor/$@/tree_sitter
|
|
|
|
clean:
|
|
$(RM) vendor/*
|
|
stack clean
|
|
|
|
build:
|
|
stack build $(STACK_DEV_OPTIONS)
|
|
|
|
.PHONY: all clean generate build FORCE
|