build: update flake inputs
[haskell/symantic-document.git] / Makefile
index 1f9a76bf7e742a06ca903483c35449ead9d017bb..4bb36f6cc7405f4933f26a31a26d1dbc2e6e6585 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-override GHCID_OPTIONS += --no-height-limit --reverse-errors 
+override GHCID_OPTIONS += --no-height-limit --reverse-errors --color=always
 override REPL_OPTIONS += -ignore-dot-ghci
 
 cabal := $(wildcard *.cabal)
@@ -21,15 +21,15 @@ ghcid:
 t tests:
        cabal test $(CABAL_TEST_FLAGS) \
         --test-show-details always --test-options "$(TEST_OPTIONS)"
-tests/prof-time: $(project)-test.eventlog.json
-tests/prof-heap: $(project)-test.eventlog.html
+tests/prof-time: $(project)-tests.eventlog.json
+tests/prof-heap: $(project)-tests.eventlog.html
 .PHONY: $(project)-test.eventlog
 $(project)-test.eventlog $(project)-test.prof:
        cabal test $(CABAL_TEST_FLAGS) \
         --test-show-details always --test-options "$(TEST_OPTIONS) +RTS $(RTS_OPTIONS)" \
         --enable-profiling $(addprefix --ghc-options ,$(GHC_PROF_OPTIONS)) || true
 t/repl tests/repl:
-       cabal repl $(CABAL_REPL_FLAGS) $(CABAL_TEST_FLAGS) --enable-tests $(project)-test
+       cabal repl $(CABAL_REPL_FLAGS) $(CABAL_TEST_FLAGS) --enable-tests $(project)-tests
 t/ghcid tests/ghcid:
        ghcid $(GHCID_OPTIONS) --command 'cabal repl $(CABAL_REPL_FLAGS) $(CABAL_TEST_FLAGS) $(project):tests' --test ":main $(TEST_OPTIONS)"
 
@@ -49,9 +49,20 @@ t/ghcid tests/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: ChangeLog.md
+       git tag -s -m $(package)-$(version) $(package)-$(version)
 
 tar:
        git diff --exit-code
@@ -68,15 +79,6 @@ upload: tar tag
        
 publish: upload/publish
 
-nix-build:
-       nix -L build
-nix-relock:
-       nix flake update --recreate-lock-file
-nix-repl:
-       nix -L develop --command cabal repl $(CABAL_REPL_FLAGS)
-nix-shell:
-       nix -L develop
-
 .PHONY: .hlint.yaml
 .hlint.yaml: $(shell find src -name '*.hs' -not -name 'HLint.hs')
        sed -i -e '/^# BEGIN: generated hints/,/^# END: generated hints/d' $@