]> Git — Sourcephile - haskell/symantic-base.git/blob - Makefile
doc: fix nesting of titles
[haskell/symantic-base.git] / Makefile
1 override REPL_OPTIONS += -ignore-dot-ghci
2 override GHCID_OPTIONS += --no-height-limit --reverse-errors
3
4 cabal := $(wildcard *.cabal)
5 package := $(notdir ./$(cabal:.cabal=))
6 version := $(shell sed -ne 's/^version: *\(.*\)/\1/p' $(cabal))
7 project := $(patsubst %.cabal,%,$(cabal))
8
9 all: build
10 build:
11 cabal build $(CABAL_BUILD_FLAGS)
12 clean c:
13 cabal clean
14 repl:
15 cabal repl $(CABAL_REPL_FLAGS) $(project)
16 ghcid:
17 ghcid $(GHCID_OPTIONS) -c 'cabal repl $(CABAL_REPL_FLAGS) $(project) $(addprefix --repl-options ,$(REPL_OPTIONS))'
18
19 doc:
20 cabal haddock --haddock-css ocean --haddock-hyperlink-source
21
22 tag:
23 git tag --merged | grep -Fqx "$(package)-$(version)" || \
24 git tag -f -s -m "$(package) v$(version)" $(package)-$(version)
25
26 tar:
27 reuse lint
28 cabal sdist
29 cabal haddock --haddock-for-hackage --enable-doc
30 upload: LANG=C
31 upload: tar
32 cabal upload $(CABAL_UPLOAD_FLAGS) dist-newstyle/sdist/$(package)-$(version).tar.gz
33 cabal upload $(CABAL_UPLOAD_FLAGS) --documentation dist-newstyle/$(package)-$(version)-docs.tar.gz
34 %/publish: CABAL_UPLOAD_FLAGS+=--publish
35 %/publish: %
36
37 publish: upload/publish
38
39 nix-build:
40 nix -L build
41 nix-relock:
42 nix flake update --recreate-lock-file
43 nix-repl:
44 nix -L develop --command cabal repl $(CABAL_REPL_FLAGS)
45 nix-shell:
46 nix -L develop