fix required GHC version
[haskell/symantic-parser.git] / Makefile
index 4672113b0e648fc32ae90733d5a4aa08c6401f62..5837f8b6689b4a9cb0b7144b161c8b1eacf6eb38 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,32 @@
+cabal = $(shell find . -maxdepth 1 -name '*.cabal' -print -quit)
+package = $(notdir ./$(cabal:.cabal=))
+all: build
+build:
+       cabal build
+clean:
+       cabal clean
 repl:
        cabal repl
 
 t:
+       cabal test --test-show-details always --test-options "--color always --size-cutoff 100000"
+t/repl:
+       cabal repl --enable-tests symantic-parser-test
+t/prof:
        cabal test --enable-profiling --enable-library-coverage --enable-coverage --test-show-details always
+t/accept:
+       cabal test --test-show-details always --test-options "--accept --color always --size-cutoff 100000"
 
 doc:
        cabal haddock --haddock-css ocean --haddock-hyperlink-source
+
+tag:
+       name=$$(sed -ne 's/^name: *\(.*\)/\1/p' "$(cabal)"); \
+       version=$$(sed -ne 's/^version: *\(.*\)/\1/p' "$(cabal)"); \
+       git tag --merged | grep -Fqx "$$name-$$version" || \
+       git tag -f -s -m "$$name v$$version" $$name-$$version
+
+tar:
+       cabal sdist
+upload:
+       LANG=C cabal upload .