Skip to content

Commit 25a6c1e

Browse files
committed
Use REPL_WITH_DOCTEST when necessary
- Rename DOCTEST to CABAL_DOCTEST
1 parent c15f8ba commit 25a6c1e

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
CABALBUILD := cabal build
66
CABALRUN := cabal run
77

8-
DOCTEST := cabal doctest
8+
CABAL_DOCTEST := cabal doctest
9+
REPL_WITH_DOCTEST := cabal repl --with-compiler=doctest --build-depends=QuickCheck --verbose=0 --repl-options='-w -Wdefault -Wno-inconsistent-flags'
910

1011
# default rules
1112

@@ -164,8 +165,10 @@ DOCTEST_PACKAGES := \
164165
DOCTEST_TARGETS := $(addprefix doctest-, $(DOCTEST_PACKAGES))
165166

166167
doctest-%: ## Run doctests for a specific package.
167-
@echo "Running doctests for $*:"
168-
@$(DOCTEST) $*
168+
@echo "Running doctests for $*:" && cd $* && $(CABAL_DOCTEST) $*
169+
170+
doctest-cabal-testsuite: ## Run doctests for a specific package.
171+
@echo "Running doctests for cabal-testsuite:" && $(REPL_WITH_DOCTEST) cabal-testsuite
169172

170173
doctest-PACKAGENAME: ## Run doctests for a single package (replace PACKAGENAME).
171174
@echo 'Please use one of the following targets:'

0 commit comments

Comments
 (0)