Add support for hlint
This commit is contained in:
parent
bb2a99b806
commit
799e804dab
2 changed files with 20 additions and 14 deletions
18
Makefile
18
Makefile
|
|
@ -1,4 +1,4 @@
|
|||
.PHONY: default all install watch clean build release distclean
|
||||
.PHONY: default all install watch clean build release distclean lint
|
||||
default: all
|
||||
|
||||
all: build
|
||||
|
|
@ -6,30 +6,34 @@ all: build
|
|||
build: builddir build/bin/annotator
|
||||
|
||||
GHCFLAGS = -iapp -isrc -Wall -O2 -outputdir build/.obj
|
||||
BUILDDIR = build
|
||||
DESTDIR = ~/.local
|
||||
BINDIR = ${DESTDIR}/bin
|
||||
DOCDIR = ${DESTDIR}/share/doc/annotator
|
||||
|
||||
builddir:
|
||||
mkdir -p build/bin build/.obj
|
||||
mkdir -p $(BUILDDIR)/bin $(BUILDDIR)/.obj $(BUILDDIR)/ci $(BUILDDIR)/dist
|
||||
|
||||
build/bin/annotator: app/Main.hs src/*.hs
|
||||
$(BUILDDIR)/bin/annotator: app/Main.hs src/*.hs
|
||||
ghc --make $(GHCFLAGS) $< -o $@
|
||||
|
||||
watch:
|
||||
@git ls-files src app Makefile | entr make -s build install
|
||||
|
||||
lint:
|
||||
@-hlint -g --cc > $(BUILDDIR)/ci/hlint.report.json
|
||||
|
||||
clean:
|
||||
@rm -rf build
|
||||
@rm -rf $(BUILDDIR)
|
||||
@find . -name "*.hi" -delete
|
||||
@find . -name "*.fix" -delete
|
||||
|
||||
distclean: clean
|
||||
@rm -rf dist
|
||||
|
||||
install: build/bin/annotator
|
||||
@install -D -t ${BINDIR} $<
|
||||
@install -D -t ${DOCDIR} README.md
|
||||
install: $(BUILDDIR)/bin/annotator
|
||||
@install -m 0755 -D -t ${BINDIR} $<
|
||||
@install -m 0644 -D -t ${DOCDIR} README.md
|
||||
|
||||
release: script/make-release
|
||||
@$<
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue