CABAL := $(shell find . -name '*.cabal' -print -quit)
-HS := $(shell find . -name '*.hs')
+QUICKCHECK_TESTS = 1000
+QUICKCHECK_MAXSIZE = 100
+TEST_FLAGS = --quickcheck-tests $(QUICKCHECK_TESTS) --quickcheck-max-size $(QUICKCHECK_MAXSIZE)
all: build
.PHONY: test
test:
! grep -q '^Test-Suite\>' $(CABAL) || \
- { stack $(STACK_FLAGS) test $(STACK_TEST_FLAGS); }
+ { stack $(STACK_FLAGS) test --test-arguments "$(TEST_FLAGS)" $(STACK_TEST_FLAGS); }
clean:
stack $(STACK_FLAGS) clean $(STACK_CLEAN_FLAGS)
%/fast: override STACK_BUILD_FLAGS+=--fast
%/fast: override STACK_HADDOCK_FLAGS+=--fast
%/fast: override STACK_TEST_FLAGS+=--fast
+%/fast: override QUICKCHECK_TESTS=100
+%/fast: override QUICKCHECK_MAXSIZE=100
%/fast: %
%.html/view: %.html
sensible-browser $*.html
-HLint.hs: $(HS)
+HLint.hs: $(shell find . -name '*.hs' -not -name 'HLint.hs')
sed -i -e '/^-- BEGIN: generated hints/,/^-- END: Generated by hlint/d' HLint.hs
echo '-- BEGIN: generated hints' >> HLint.hs
hlint --find . | grep '^'infix | sort -u >> HLint.hs
echo '-- END: generated hints' >> HLint.hs
-lint: HLint.hs $(HS)
+lint: HLint.hs
if hlint --quiet --report=hlint.html -XNoCPP \
$(shell cabal-cargs --format=ghc --only=default_extensions --sourcefile=$(CABAL)) $(HLINT_FLAGS) .; \
then rm -f hlint.html; \
git tag --merged | grep -Fqx "$$name-$$version" || \
git tag -f -s -m "$$name v$$version" $$name-$$version
+tar:
+ LANG=C stack $(STACK_FLAGS) sdist $(STACK_SDIST_FLAGS)
upload:
- LANG=C stack $(STACK_FLAGS) sdist --sign
- LANG=C stack $(STACK_FLAGS) upload .
+ LANG=C stack $(STACK_FLAGS) upload $(STACK_UPLOAD_FLAGS) .
.PHONY: stats
stats: