2 BIN = dist/build/$(PN)/$(PN)
3 SRCS = $(shell find src/ -type f -name '*.hs')
5 # Append these warnings to the HCFLAGS environment variable that gets
6 # passed as options to GHC. We want to see the warnings while developing
7 # but don't want them hard-coded in the cabal file for end users.
8 HCFLAGS += -Weverything \
9 -Wno-implicit-prelude \
12 -Wno-all-missed-specialisations \
13 -Wno-prepositive-qualified-module \
14 -Wno-missing-safe-haskell-mode \
15 -Wno-missing-deriving-strategies \
21 $(BIN): $(PN).cabal $(SRCS)
22 runghc Setup.hs configure --user
23 runghc Setup.hs build --ghc-options="${HCFLAGS}"
25 doc: $(PN).cabal $(SRCS)
26 runghc Setup.hs haddock --all \
28 --haddock-options="--ignore-all-exports"
34 TESTSUITE_BIN = dist/build/testsuite/testsuite
35 DOCTESTS_BIN = dist/build/doctests/doctests
36 TEST_SRCS := $(shell find test/ -type f -name '*.hs')
38 $(TESTSUITE_BIN): $(PN).cabal $(SRCS) $(TEST_SRCS)
39 runghc Setup.hs configure --user --enable-tests --prefix=/
40 runghc Setup.hs build --ghc-options="${HCFLAGS}"
43 $(DOCTESTS_BIN): $(PN).cabal $(SRCS) $(TEST_SRCS)
44 runghc Setup.hs configure --user --enable-tests
45 runghc Setup.hs build --ghc-options="${HCFLAGS}"
47 check: $(BIN) $(TESTSUITE_BIN) $(DOCTESTS_BIN)
56 runghc Setup.hs configure
57 TAR_OPTIONS="--format=ustar" runghc Setup.hs sdist
60 hlint --ignore="Use camelCase" \
61 --ignore="Redundant bracket" \
67 find ./ -name '*.prof' -delete
68 find ./ -name '*.o' -delete
69 find ./ -name '*.hi' -delete