1 # There's only one '$' in the awk script, but we have to double-money
3 PN = $(shell grep 'name:' *.cabal | awk '{ print $$2 }')
4 BIN = dist/build/$(PN)/$(PN)
5 DOCTESTS_BIN = dist/build/doctests/doctests
6 SRCS = $(shell find src/ -name '*.hs')
8 .PHONY : test publish_doc doc dist hlint
10 $(BIN): $(PN).cabal $(SRCS)
11 runghc Setup.hs configure --user
14 $(DOCTESTS_BIN): $(SRCS) test/Doctests.hs
15 runghc Setup.hs configure --user --enable-tests
19 profile: $(PN).cabal $(SRCS)
20 runghc Setup.hs configure --user --enable-executable-profiling
30 test: $(BIN) $(DOCTESTS_BIN)
35 runghc Setup.hs configure --user --flags=${FLAGS}
36 runghc Setup.hs hscolour --all
37 runghc Setup.hs haddock --all \
38 --haddock-options="--ignore-all-exports"
41 hlint --ignore="Use camelCase" \
42 --ignore="Redundant bracket" \