]> Git — Sourcephile - haskell/symantic-parser.git/blob - Makefile
add more Nix conveniencies
[haskell/symantic-parser.git] / Makefile
1 cabal = $(wildcard *.cabal)
2 package = $(notdir ./$(cabal:.cabal=))
3 all: build
4 build:
5 cabal build
6 clean:
7 cabal clean
8 repl:
9 cabal repl
10
11 t:
12 cabal test -fdump-splice --test-show-details always --test-options "--color always --size-cutoff 100000"
13 t/repl:
14 cabal repl --enable-tests symantic-parser-test
15 t/prof:
16 cabal test --enable-profiling --enable-library-coverage --enable-coverage --test-show-details always
17 t/accept:
18 cabal test --test-show-details always --test-options "--accept --color always --size-cutoff 100000"
19 t/splices: t
20 shopt -s globstar; $$EDITOR dist-newstyle/build/**/t/**/*.dump-splices
21
22 doc:
23 cabal haddock --haddock-css ocean --haddock-hyperlink-source
24
25 tag:
26 name=$$(sed -ne 's/^name: *\(.*\)/\1/p' "$(cabal)"); \
27 version=$$(sed -ne 's/^version: *\(.*\)/\1/p' "$(cabal)"); \
28 git tag --merged | grep -Fqx "$$name-$$version" || \
29 git tag -f -s -m "$$name v$$version" $$name-$$version
30
31 tar:
32 cabal sdist
33 upload:
34 LANG=C cabal upload .
35
36 nix-build:
37 nix -L build
38 nix-relock:
39 nix flake update --recreate-lock-file
40 nix-repl:
41 nix -L develop --command cabal repl
42 nix-shell:
43 nix -L develop