machine: remove horizonStack and experiment with alwaysRaise
[haskell/symantic-parser.git] / Makefile
index 5735b7a930e6532adabd49b583d7b9db5d1c2d65..b6ffc10eeedddb69d4a4a7011e163296ecaacbc6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,11 @@
-override RTS_OPTIONS += -L100
-override TEST_OPTIONS += --color always --size-cutoff 1000000 $(addprefix -p ,$t)
-override GHC_PROF_OPTIONS += -eventlog -fprof-auto -fprof-auto-calls
 override BENCHMARK_OPTIONS += --output benchmarks/html/$(version).html --match glob $b
+override GHCID_OPTIONS += --no-height-limit --reverse-errors 
+override GHC_PROF_OPTIONS += -eventlog -fprof-auto -fprof-cafs
+#-fprof-auto-calls
 override REPL_OPTIONS += -ignore-dot-ghci
+override RTS_OPTIONS += -L100
+override TEST_OPTIONS += --color always --size-cutoff 1000000 $(addprefix -p ,$t)
+override CABAL_TEST_FLAGS += -j
 
 cabal := $(wildcard *.cabal)
 package := $(notdir ./$(cabal:.cabal=))
@@ -17,18 +20,18 @@ clean c:
 repl:
        cabal repl $(CABAL_REPL_FLAGS) $(project)
 ghcid:
-       ghcid -c 'cabal repl $(CABAL_REPL_FLAGS) $(project) --repl-options "$(REPL_OPTIONS)"' --reverse-errors
+       ghcid $(GHCID_OPTIONS) --command 'cabal repl -fno-code $(CABAL_REPL_FLAGS) $(project) $(addprefix --repl-options ,$(REPL_OPTIONS))'
 .PHONY: parsers
 parsers:
        cabal build $(CABAL_BUILD_FLAGS) $(project):parsers
 parsers/repl:
        cabal repl $(CABAL_REPL_FLAGS) $(project):parsers
 parsers/ghcid:
-       ghcid -c 'cabal repl $(CABAL_REPL_FLAGS) $(project):parsers --repl-options "$(REPL_OPTIONS)"' --reverse-errors
+       ghcid $(GHCID_OPTIONS) --command 'cabal repl -fno-code $(CABAL_REPL_FLAGS) $(project):parsers $(addprefix --repl-options ,$(REPL_OPTIONS))'
 parsers/prof-th:
-       cabal v2-build lib:$(project) --enable-profiling $(GHC_PROF_OPTIONS) --write-ghc-environment-files=always
+       cabal v2-build lib:$(project) --enable-profiling $(addprefix --ghc-options ,$(GHC_PROF_OPTIONS)) --write-ghc-environment-files=always
        cabal build $(CABAL_BUILD_FLAGS) $(project):parsers \
-        --enable-profiling $(GHC_PROF_OPTIONS) \
+        --enable-profiling $(addprefix --ghc-options ,$(GHC_PROF_OPTIONS)) \
         --ghc-options "$(addprefix -opti,+RTS $(RTS_OPTIONS))"
 
 .PHONY: tests
@@ -41,17 +44,17 @@ tests/prof-heap: $(project)-test.eventlog.html
 $(project)-test.eventlog $(project)-test.prof:
        cabal test $(CABAL_TEST_FLAGS) \
         --test-show-details always --test-options "$(TEST_OPTIONS) +RTS $(RTS_OPTIONS)" \
-        --enable-profiling $(GHC_PROF_OPTIONS) || true
+        --enable-profiling $(addprefix --ghc-options ,$(GHC_PROF_OPTIONS)) || true
 tests/prof-th:
-       cabal v2-build lib:$(project) --enable-profiling $(GHC_PROF_OPTIONS) --write-ghc-environment-files=always
+       cabal v2-build lib:$(project) --enable-profiling $(addprefix --ghc-options ,$(GHC_PROF_OPTIONS)) --write-ghc-environment-files=always
        cabal test $(CABAL_TEST_FLAGS) \
         --test-show-details always --test-options "$(TEST_OPTIONS) +RTS $(RTS_OPTIONS)" \
-        --enable-profiling $(GHC_PROF_OPTIONS) \
+        --enable-profiling $(addprefix --ghc-options ,$(GHC_PROF_OPTIONS)) \
         --ghc-options "$(addprefix -opti,+RTS $(RTS_OPTIONS))"
-tests/repl:
-       cabal repl $(CABAL_REPL_FLAGS) --enable-tests $(project)-test
-tests/ghcid:
-       ghcid -c 'cabal repl $(CABAL_REPL_FLAGS) $(project):tests --test-options "$(TEST_OPTIONS)"' --reverse-errors
+t/repl tests/repl:
+       cabal repl $(CABAL_REPL_FLAGS) $(CABAL_TEST_FLAGS) --enable-tests $(project)-test
+t/ghcid tests/ghcid:
+       ghcid $(GHCID_OPTIONS) --command 'cabal repl $(CABAL_REPL_FLAGS) $(CABAL_TEST_FLAGS) $(project):tests' --test ":main $(TEST_OPTIONS)"
 
 %/accept: TEST_OPTIONS += --accept
 %/accept: %