]> Git — Sourcephile - haskell/symantic-parser.git/blob - Makefile
nix: update nixpkgs to use cabal-install 3.4
[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 -fdump-splices --test-show-details always --test-options "--color always --size-cutoff 100000"
14 t/accept:
15 cabal test --test-show-details always --test-options "--accept --color always --size-cutoff 100000"
16 t/prof:
17 cabal test --enable-profiling -fprof-auto -fprof-auto-calls --test-show-details always --test-options "+RTS -p -L100 -hc"
18 t/cover:
19 cabal test --enable-profiling --enable-library-coverage --enable-coverage --test-show-details always
20 t/prof-th:
21 cabal v2-build lib:symantic-parser --enable-debug --enable-profiling --write-ghc-environment-files=always
22 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
23 t/repl:
24 cabal repl --enable-tests symantic-parser-test
25 t/splices: t
26 shopt -s globstar; $$EDITOR dist-newstyle/build/**/t/**/*.dump-splices
27
28 doc:
29 cabal haddock --haddock-css ocean --haddock-hyperlink-source
30
31 tag:
32 git tag --merged | grep -Fqx "$(package)-$(version)" || \
33 git tag -f -s -m "$(package) v$(version)" $(package)-$(version)
34
35 tar:
36 cabal sdist
37 cabal haddock --haddock-for-hackage --enable-doc
38 upload: LANG=C
39 upload: tar
40 cabal upload $(CABAL_UPLOAD_FLAGS) dist-newstyle/sdist/$(package)-$(version).tar.gz
41 cabal upload $(CABAL_UPLOAD_FLAGS) --documentation dist-newstyle/$(package)-$(version)-docs.tar.gz
42 %/publish: CABAL_UPLOAD_FLAGS+=--publish
43 %/publish: %
44
45 publish: upload/publish
46
47 nix-build:
48 nix -L build
49 nix-relock:
50 nix flake update --recreate-lock-file
51 nix-repl:
52 nix -L develop --command cabal repl
53 nix-shell:
54 nix -L develop