2 BIN = dist/build/$(PN)/$(PN)
3 SRCS := $(shell find src/ -type f -name '*.hs')
5 BIN = dist/build/spline3/spline3
6 DOCTESTS_BIN = dist/build/doctests/doctests
7 TESTSUITE_BIN = dist/build/testsuite/testsuite
9 # Append these warnings to the HCFLAGS environment variable that gets
10 # passed as options to GHC. We want to see the warnings while developing
11 # but don't want them hard-coded in the cabal file for end users.
12 HCFLAGS += -Weverything \
13 -Wno-implicit-prelude \
16 -Wno-all-missed-specialisations \
17 -Wno-prepositive-qualified-module \
18 -Wno-missing-safe-haskell-mode \
19 -Wno-missing-deriving-strategies \
23 .PHONY : test doc dist hlint
25 $(BIN): $(PN).cabal $(SRCS)
26 runghc Setup.hs configure --user --prefix=/
27 runghc Setup.hs build --ghc-options="${HCFLAGS}"
29 $(DOCTESTS_BIN): $(SRCS) test/Doctests.hs
30 runghc Setup.hs configure --user --prefix=/ --enable-tests
31 runghc Setup.hs build --ghc-options="${HCFLAGS}"
33 $(TESTSUITE_BIN): $(SRCS) test/TestSuite.hs
34 runghc Setup.hs configure --user --prefix=/ --enable-tests
35 runghc Setup.hs build --ghc-options="${HCFLAGS}"
43 check: $(PN).cabal $(TESTSUITE_BIN) $(DOCTESTS_BIN) $(BIN)
47 runghc Setup.hs configure --prefix=/
48 TAR_OPTIONS="--format=ustar" runghc Setup.hs sdist
52 dist/doc: $(PN).cabal $(SRCS)
53 runghc Setup.hs configure --user --prefix=/
54 runghc Setup.hs haddock --all \
56 --haddock-options="--ignore-all-exports"
59 hlint --ignore="Use camelCase" \
60 --ignore="Redundant bracket" \