]> Git — Sourcephile - haskell/symantic-parser.git/blob - Makefile
test: add Nandlang parser
[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 --enable-library-coverage --enable-coverage --test-show-details always
18 t/repl:
19 cabal repl --enable-tests symantic-parser-test
20 t/splices: t
21 shopt -s globstar; $$EDITOR dist-newstyle/build/**/t/**/*.dump-splices
22
23 doc:
24 cabal haddock --haddock-css ocean --haddock-hyperlink-source
25
26 tag:
27 git tag --merged | grep -Fqx "$(package)-$(version)" || \
28 git tag -f -s -m "$(package) v$(version)" $(package)-$(version)
29
30 tar:
31 cabal sdist
32 cabal haddock --haddock-for-hackage --enable-doc
33 upload: LANG=C
34 upload: tar
35 cabal upload $(CABAL_UPLOAD_FLAGS) dist-newstyle/sdist/$(package)-$(version).tar.gz
36 cabal upload $(CABAL_UPLOAD_FLAGS) --documentation dist-newstyle/$(package)-$(version)-docs.tar.gz
37 %/publish: CABAL_UPLOAD_FLAGS+=--publish
38 %/publish: %
39
40 publish: upload/publish
41
42 nix-build:
43 nix -L build
44 nix-relock:
45 nix flake update --recreate-lock-file
46 nix-repl:
47 nix -L develop --command cabal repl
48 nix-shell:
49 nix -L develop