-BIN = dist/build/email-validator/email-validator
+PN = email-validator
+BIN = dist/build/$(PN)/$(PN)
TESTSUITE_BIN = dist/build/testsuite/testsuite
.PHONY : test dist hlint
-$(BIN): src/*.hs
+$(BIN): $(PN).cabal src/*.hs
runghc Setup.hs clean
runghc Setup.hs configure --user
runghc Setup.hs build
-profile: src/*.hs
+profile: $(PN).cabal src/*.hs
runghc Setup.hs clean
runghc Setup.hs configure --user --enable-executable-profiling
runghc Setup.hs build
doc: src/*.hs
runghc Setup.hs configure --user
- runghc Setup.hs hscolour --executables
- runghc Setup.hs haddock --internal \
- --executables \
- --hyperlink-source
+ runghc Setup.hs hscolour --all
+ runghc Setup.hs haddock --all \
+ --hyperlink-source \
+ --haddock-options="--ignore-all-exports"
clean:
runghc Setup.hs clean
-$(TESTSUITE_BIN): src/*.hs test/TestSuite.hs
- runghc Setup.hs configure --user --flags=${FLAGS} --enable-tests
+$(TESTSUITE_BIN): $(PN).cabal src/*.hs test/*.hs
+ runghc Setup.hs configure --user --enable-tests
runghc Setup.hs build
test: $(BIN) $(TESTSUITE_BIN)