doc: rename type variable `able` to `syn`
[haskell/symantic-base.git] / Makefile
index 8954475a4b420254a3baeec54f5a5aa615bfc033..71184c315f23067dfd1760d4cefbbd7f8264b88e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,12 @@
-override GHCID_OPTIONS += --no-height-limit --reverse-errors 
-override REPL_OPTIONS += -ignore-dot-ghci
-
 cabal := $(wildcard *.cabal)
 package := $(notdir ./$(cabal:.cabal=))
 version := $(shell sed -ne 's/^version: *\(.*\)/\1/p' $(cabal))
 project := $(patsubst %.cabal,%,$(cabal))
 cabal_builddir ?= dist-newstyle
 
+override REPL_OPTIONS += -ignore-dot-ghci
+override GHCID_OPTIONS += --no-height-limit --reverse-errors --color=always --warnings --restart $(cabal)
+
 all: build
 build:
        cabal build $(CABAL_BUILD_FLAGS)
@@ -20,9 +20,20 @@ ghcid:
 doc:
        cabal haddock --haddock-css ocean --haddock-hyperlink-source
 
-tag:
-       git tag --merged | grep -Fqx "$(package)-$(version)" || \
-       git tag -f -s -m "$(package) v$(version)" $(package)-$(version)
+.PHONY: ChangeLog.md
+ChangeLog.md:
+       ! git tag --merged | grep -Fqx $(package)-$(version)
+       git diff --exit-code
+       git tag -f $(package)-$(version)
+       git-chglog --output $@.new --tag-filter-pattern '$(package)-.*' $(package)-$(version)
+       touch $@
+       cat $@ >>$@.new
+       mv -f $@.new $@
+       git tag -d $(package)-$(version)
+       git add '$@'
+       git commit -m 'doc: update `$@`'
+tag: build ChangeLog.md
+       git tag -s -m $(package)-$(version) $(package)-$(version)
 
 tar:
        git diff --exit-code