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 \
18 $(BIN): $(PN).cabal $(SRCS)
19 runghc Setup.hs configure --user
20 runghc Setup.hs build --ghc-options="${HCFLAGS}"
22 doc: $(PN).cabal $(SRCS)
23 runghc Setup.hs haddock --all \
25 --haddock-options="--ignore-all-exports"
31 TESTSUITE_BIN = dist/build/testsuite/testsuite
32 DOCTESTS_BIN = dist/build/doctests/doctests
33 TEST_SRCS := $(shell find test/ -type f -name '*.hs')
35 $(TESTSUITE_BIN): $(PN).cabal $(SRCS) $(TEST_SRCS)
36 runghc Setup.hs configure --user --enable-tests --prefix=/
37 runghc Setup.hs build --ghc-options="${HCFLAGS}"
40 $(DOCTESTS_BIN): $(PN).cabal $(SRCS) $(TEST_SRCS)
41 runghc Setup.hs configure --user --enable-tests
42 runghc Setup.hs build --ghc-options="${HCFLAGS}"
44 check: $(BIN) $(TESTSUITE_BIN) $(DOCTESTS_BIN)
53 runghc Setup.hs configure
54 TAR_OPTIONS="--format=ustar" runghc Setup.hs sdist
57 hlint --ignore="Use camelCase" \
58 --ignore="Redundant bracket" \
64 find ./ -name '*.prof' -delete
65 find ./ -name '*.o' -delete
66 find ./ -name '*.hi' -delete