]> Git — Sourcephile - haskell/symantic-base.git/blob - Makefile
Merge Dityped and Typed; Dityped is not necessary for dimap to work
[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 cabal sdist
28 cabal haddock --haddock-for-hackage --enable-doc
29 upload: LANG=C
30 upload: tar
31 cabal upload $(CABAL_UPLOAD_FLAGS) dist-newstyle/sdist/$(package)-$(version).tar.gz
32 cabal upload $(CABAL_UPLOAD_FLAGS) --documentation dist-newstyle/$(package)-$(version)-docs.tar.gz
33 %/publish: CABAL_UPLOAD_FLAGS+=--publish
34 %/publish: %
35
36 publish: upload/publish
37
38 nix-build:
39 nix -L build
40 nix-relock:
41 nix flake update --recreate-lock-file
42 nix-repl:
43 nix -L develop --command cabal repl $(CABAL_REPL_FLAGS)
44 nix-shell:
45 nix -L develop