2 GHC_WARNINGS += -fwarn-hi-shadowing
3 GHC_WARNINGS += -fwarn-missing-signatures
4 GHC_WARNINGS += -fwarn-name-shadowing
5 GHC_WARNINGS += -fwarn-orphans
6 GHC_WARNINGS += -fwarn-type-defaults
7 GHC_WARNINGS += -fwarn-tabs
8 GHC_WARNINGS += -fwarn-incomplete-record-updates
9 GHC_WARNINGS += -fwarn-monomorphism-restriction
10 GHC_WARNINGS += -fwarn-unused-do-bind
14 GHC_OPTS := $(GHC_WARNINGS) \
20 -fno-spec-constr-count \
24 .PHONY : test publish_doc doc src_html hlint
27 ghc -O2 $(GHC_OPTS) src/*.hs
31 test_src: src/Tests/*.hs
32 ghc -O2 $(GHC_OPTS) src/*.hs src/Tests/*.hs
35 ghc -O2 $(GHC_OPTS) -prof -auto-all src/*.hs
45 runghc -i"src" test/TestSuite.hs
52 DOCS := -i /usr/share/doc/ghc-*/html/libraries/base-*/base.haddock
53 DOCS += -i /usr/share/doc/ghc-*/html/libraries/ghc-prim-*/ghc-prim.haddock
54 DOCS += -i /usr/share/doc/ghc-*/html/libraries/haskell98-*/haskell98.haddock
55 DOCS += -i /usr/share/doc/storable-complex-*/html/storable-complex.haddock
56 DOCS += -i /usr/share/doc/quickcheck-*/html/QuickCheck.haddock
57 DOCS += -i /usr/share/doc/hmatrix-*/html/hmatrix.haddock
58 DOCS += -i /usr/share/doc/hunit-*/html/HUnit.haddock
61 HTMLS := /usr/share/doc/ghc-*/html/libraries/base-*/*.html
62 HTMLS += /usr/share/doc/ghc-*/html/libraries/ghc-prim-*/*.html
63 HTMLS += /usr/share/doc/ghc-*/html/libraries/haskell98-*/*.html
64 HTMLS += /usr/share/doc/quickcheck-*/html/*.html
65 HTMLS += /usr/share/doc/hunit-*/html/*.html
66 HTMLS += /usr/share/doc/storable-complex-*/html/*.html
67 HTMLS += /usr/share/doc/hmatrix-*/html/*.html
69 HSCOLOUR_SRCS := /usr/share/doc/ghc-*/html/libraries/base-*/src/*
70 HSCOLOUR_SRCS += /usr/share/doc/ghc-*/html/libraries/ghc-prim-*/src/*
71 HSCOLOUR_SRCS += /usr/share/doc/ghc-*/html/libraries/haskell98-*/src/*
72 HSCOLOUR_SRCS += /usr/share/doc/hmatrix-*/html/src/*
75 cp -n $(HTMLS) ./doc/html/
76 cp -n $(HSCOLOUR_SRCS) ./doc/html/src/
77 haddock $(DOCS) --html --use-unicode \
78 --odir=doc/html/ --title="spline3" \
79 --source-module="src/%{MODULE/.//}.html" \
80 --source-entity="src/%{MODULE/.//}.html#%{NAME}" \
81 src/*.hs src/Tests/*.hs
83 SSH_USER=root@michael.orlitzky.com
84 PUBLIC_DOCDIR=/var/www/orlitzky.com/michael/public/spline3/
86 rsync -avz -e ssh ./doc/html/ $(SSH_USER):$(PUBLIC_DOCDIR)
89 hlint --ignore="Use camelCase" \
90 --ignore="Redundant bracket" \