]> gitweb.michael.orlitzky.com - dead/lwn-epub.git/blobdiff - makefile
Include the makefile in the tarball.
[dead/lwn-epub.git] / makefile
index ec658b07233d557c7bc4e2297927025376f6c5c0..69ab48da868135449a441e044dbc5511ba0bf570 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1,31 +1,33 @@
-.PHONY : test publish_doc doc src_html hlint
+.PHONY : test dist
 
 # There's onlt one '$' in the awk script, but we have to double-money
 # it for make.
-PN  := $(shell grep 'name:' *.cabal | awk '{ print $$2 }')
-BIN := dist/build/$(PN)/$(PN)
+PN   = $(shell grep 'name:' *.cabal | awk '{ print $$2 }')
+BIN  = dist/build/$(PN)/$(PN)
+TESTSUITE_BIN = dist/build/testsuite/testsuite
+SRCS = $(shell find src/ -name '*.hs')
 
-$(BIN): src/*.hs
+$(BIN): $(SRCS)
        runghc Setup.hs clean
        runghc Setup.hs configure --user --flags=${FLAGS}
        runghc Setup.hs build
 
+$(TESTSUITE_BIN): src/*.hs test/TestSuite.hs
+       runghc Setup.hs configure --user --flags=${FLAGS} --enable-tests
+       runghc Setup.hs build
+
 clean:
        runghc Setup.hs clean
        rm -f dist/
        rm -f *.prof
        rm -rf .hpc
 
+install: $(BIN)
+       runghc Setup.hs install
 
-# Neither 'haddock' nor 'hscolour' seem to work properly.
-doc: src_html
-       runghc Setup.hs hscolour --executables
-       runghc Setup.hs haddock --internal    \
-                               --executables \
-                               --hyperlink-source
-
-dist/build/autogen: $(BIN)
-
+dist:
+       runghc Setup.hs configure
+       runghc Setup.hs sdist
 
-test: dist/build/autogen
-       runghc -i"src" -i"dist/build/autogen" test/TestSuite.hs
+test: $(BIN) $(TESTSUITE_BIN)
+       runghc Setup.hs test