]> Git — Sourcephile - haskell/symantic-parser.git/blob - Makefile
machine: fix mayRaise analysis of catch
[haskell/symantic-parser.git] / Makefile
1 cabal = $(wildcard *.cabal)
2 package = $(notdir ./$(cabal:.cabal=))
3 version = $(shell sed -ne 's/^version: *\(.*\)/\1/p' $(cabal))
4 all: build
5 build:
6 cabal build
7 clean c:
8 cabal clean
9 repl:
10 cabal repl
11
12 t:
13 cabal test $(TESTFLAGS) --test-show-details always --test-options "$(TESTOPTIONS) --color always --size-cutoff 1000000 $${p:+-p $$p}"
14 %/accept: TESTOPTIONS+=--accept
15 %/accept: %
16
17 %/cover: TESTFLAGS+=--enable-coverage
18 %/cover: %
19
20 t/prof: OPTIFLAGS?=-xc
21 t/prof:
22 cabal v2-build lib:symantic-parser --enable-profiling --write-ghc-environment-files=always
23 cabal test $(TESTFLAGS) --enable-profiling -fprof-auto -fprof-auto-calls \
24 --test-show-details always --test-options "$(TESTOPTIONS) $${p:+-p $$p}" \
25 --ghc-options "-opti+RTS -opti-p -opti-L100 -opti-ls $(addprefix -opti,$(OPTIFLAGS))"
26 t/repl:
27 cabal repl --enable-tests symantic-parser-test
28
29 doc:
30 cabal haddock --haddock-css ocean --haddock-hyperlink-source
31
32 tag:
33 git tag --merged | grep -Fqx "$(package)-$(version)" || \
34 git tag -f -s -m "$(package) v$(version)" $(package)-$(version)
35
36 tar:
37 cabal sdist
38 cabal haddock --haddock-for-hackage --enable-doc
39 upload: LANG=C
40 upload: tar
41 cabal upload $(CABAL_UPLOAD_FLAGS) dist-newstyle/sdist/$(package)-$(version).tar.gz
42 cabal upload $(CABAL_UPLOAD_FLAGS) --documentation dist-newstyle/$(package)-$(version)-docs.tar.gz
43 %/publish: CABAL_UPLOAD_FLAGS+=--publish
44 %/publish: %
45
46 publish: upload/publish
47
48 nix-build:
49 nix -L build
50 nix-relock:
51 nix flake update --recreate-lock-file
52 nix-repl:
53 nix -L develop --command cabal repl
54 nix-shell:
55 nix -L develop