machine: improve comments
[haskell/symantic-parser.git] / Makefile
index c8a11de086923df1cc27aac9e94cf11fa02443d6..a88860925883c99a784c6a9fa09e3276ed5f7990 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -10,20 +10,21 @@ repl:
        cabal repl
 
 t:
-       cabal test --test-show-details always --test-options "--color always --size-cutoff 1000000 $${p:+-p $$p}"
-t/accept:
-       cabal test --test-show-details always --test-options "--accept --color always $${p:+-p $$p}"
+       cabal test $(TESTFLAGS) --test-show-details always --test-options "$(TESTOPTIONS) --color always --size-cutoff 1000000 $${p:+-p $$p}"
+%/accept: TESTOPTIONS+=--accept
+%/accept: %
+       
+%/cover: TESTFLAGS+=--enable-coverage
+%/cover: %
+       
+t/prof: OPTIFLAGS?=-xc
 t/prof:
-       cabal test --enable-profiling -fprof-auto -fprof-auto-calls --test-show-details always --test-options "$${p:+-p $$p} +RTS -p -L100 -hc"
-t/cover:
-       cabal test --enable-profiling --enable-library-coverage --enable-coverage --test-show-details always --test-options "$${p:+-p $$p}"
-t/prof-th:
-       cabal v2-build lib:symantic-parser --enable-debug --enable-profiling --write-ghc-environment-files=always
-       ghc -prof -fprof-auto -eventlog -debug -fexternal-interpreter -opti+RTS -opti-p -opti-L100 -opti-ls -opti-hy --make -XHaskell2010 -XNoImplicitPrelude -itest test/Main.hs -Wall -ddump-splices
+       cabal v2-build lib:symantic-parser --enable-profiling --write-ghc-environment-files=always
+       cabal test $(TESTFLAGS) --enable-profiling -fprof-auto -fprof-auto-calls \
+        --test-show-details always --test-options "$(TESTOPTIONS) $${p:+-p $$p}" \
+        --ghc-options "-opti+RTS -opti-p -opti-L100 -opti-ls $(addprefix -opti,$(OPTIFLAGS))"
 t/repl:
        cabal repl --enable-tests symantic-parser-test
-t/splices: t
-       shopt -s globstar; $$EDITOR dist-newstyle/build/**/t/**/*.dump-splices
 
 doc:
        cabal haddock --haddock-css ocean --haddock-hyperlink-source