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 --enable-executable-profiling --prefix=/
15 doc: $(PN).cabal $(SRCS)
16 runghc Setup.hs configure --user --prefix=/
17 runghc Setup.hs hscolour --executables
18 runghc Setup.hs haddock --internal \
26 TESTSUITE_BIN = dist/build/testsuite/testsuite
27 TEST_SRCS := $(shell find test/ -type f -name '*.hs')
28 $(TESTSUITE_BIN): $(PN).cabal $(SRCS) $(TEST_SRCS)
29 runghc Setup.hs configure --user --enable-tests --prefix=/
32 test: $(BIN) $(TESTSUITE_BIN)
40 runghc Setup.hs configure --prefix=/
44 hlint --ignore="Use camelCase" \
45 --ignore="Redundant bracket" \
61 XMLS := $(shell find schemagen/ -type f -name '*.xml')
62 XMLTYPES := $(shell find schemagen/ -mindepth 1 -maxdepth 1 -type d)
63 DTDS := $(addsuffix .dtd, $(XMLTYPES))
65 # We have to depend on *every* XML file here, since pattern matching
66 # and path globs don't play well together. The use of "%" on the right
67 # is a trick to make the ".dtd"-less path available in the rule via
68 # $<. Its use is legitimate since we do sort of depend on the
70 $(DTDS): %.dtd: % $(XMLS)
71 schema-learn $</*.xml > $@