2 BIN = dist/build/$(PN)/$(PN)
3 SRCS := $(shell find src/ -type f -name '*.hs')
7 $(BIN): $(PN).cabal $(SRCS)
8 runghc Setup.hs configure --user --prefix=/
11 profile: $(PN).cabal $(SRCS)
12 runghc Setup.hs configure --user \
13 --enable-executable-profiling \
17 doc: $(PN).cabal $(SRCS)
18 runghc Setup.hs configure --user --prefix=/
19 runghc Setup.hs hscolour --all
20 runghc Setup.hs haddock --all \
22 --haddock-options="--ignore-all-exports"
28 TESTSUITE_BIN = dist/build/testsuite/testsuite
29 TEST_SRCS := $(shell find test/ -type f -name '*.hs')
30 $(TESTSUITE_BIN): $(PN).cabal $(SRCS) $(TEST_SRCS)
31 runghc Setup.hs configure --user --enable-tests --prefix=/
34 test: $(BIN) $(TESTSUITE_BIN)
42 runghc Setup.hs configure --prefix=/
46 hlint --ignore="Use camelCase" \
47 --ignore="Redundant bracket" \
57 find ./ -name '*.prof' -delete
58 find ./ -name '*.o' -delete
59 find ./ -name '*.hi' -delete
66 XMLS := $(shell find schemagen/ -type f -name '*.xml')
67 XMLTYPES := $(shell find schemagen/ -mindepth 1 -maxdepth 1 -type d)
68 DTDS := $(addsuffix .dtd, $(XMLTYPES))
70 # We have to depend on *every* XML file here, since pattern matching
71 # and path globs don't play well together. The use of "%" on the right
72 # is a trick to make the ".dtd"-less path available in the rule via
73 # $<. Its use is legitimate since we do sort of depend on the
75 $(DTDS): %.dtd: % $(XMLS)
76 schema-learn $</*.xml > $@