From 2396ec2904bde0b129a8a34e674d3ac2fffabf74 Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Sat, 27 Jul 2024 08:46:00 +0700 Subject: [PATCH] Makefile: Use `cabal doctest` --- Makefile | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 447f3a88fe2..d06395a9da8 100644 --- a/Makefile +++ b/Makefile @@ -5,12 +5,9 @@ CABALBUILD := cabal build CABALRUN := cabal run -# The newer and prefered way to call the doctest tool is: -# $ cabal repl --with-ghc=doctest -# SEE: https://github.com/haskell/cabal/issues/8504 -# There is but one caveat, we have to avoid allow-newer. +# We have to avoid allow-newer. # SEE: https://github.com/haskell/cabal/issues/6859 -DOCTEST := cabal repl --with-ghc=doctest --repl-options="-w" --ghc-options="-Wwarn" --allow-newer=False +DOCTEST := cabal doctest --allow-newer=False # default rules @@ -107,11 +104,11 @@ ghcid-cli : .PHONY: doctest doctest : - $(DOCTEST) Cabal-syntax - $(DOCTEST) Cabal-described - $(DOCTEST) --build-depends=QuickCheck Cabal - $(DOCTEST) cabal-install-solver - $(DOCTEST) cabal-install + cd Cabal-syntax && $(DOCTEST) + cd Cabal-described && $(DOCTEST) + cd Cabal && $(DOCTEST) + cd cabal-install-solver && $(DOCTEST) + cd cabal-install && $(DOCTEST) # This is not run as part of validate.sh (we need hackage-security, which is tricky to get). .PHONY: doctest-cli @@ -120,7 +117,7 @@ doctest-cli : .PHONY: doctest-install doctest-install: - cabal install doctest --overwrite-policy=always --ignore-project + cabal install doctest --overwrite-policy=always --ignore-project --flag cabal-doctest # tests