]> gitweb.michael.orlitzky.com - spline3.git/blobdiff - makefile
Define an export list in Misc, clean up imports.
[spline3.git] / makefile
index 236c495dc7f61abb94bd803e481972f436b1e6be..850626fdc4261e8c46133b28d1c1fd3dd07baa50 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1,10 +1,22 @@
-.PHONY : test publish_doc doc src_html hlint
+BIN           = dist/build/spline3/spline3
+DOCTESTS_BIN  = dist/build/doctests/doctests
+TESTSUITE_BIN = dist/build/testsuite/testsuite
 
-spline3: src/*.hs
+.PHONY : test publish_doc doc dist hlint
+
+$(BIN): src/*.hs
        runghc Setup.hs clean
        runghc Setup.hs configure --user --flags=${FLAGS}
        runghc Setup.hs build
 
+$(DOCTESTS_BIN): src/*.hs test/Doctests.hs
+       runghc Setup.hs configure --user --flags=${FLAGS} --enable-tests
+       runghc Setup.hs build
+
+$(TESTSUITE_BIN): src/*.hs test/TestSuite.hs
+       runghc Setup.hs configure --user --flags=${FLAGS} --enable-tests
+       runghc Setup.hs build
+
 llvm: src/*.hs
        FLAGS="llvm" make
 
@@ -21,14 +33,16 @@ clean:
        rm -f *.prof
        rm -rf .hpc
 
-test:
-       runghc -i"src" test/TestSuite.hs
+test: $(BIN) $(DOCTESTS_BIN) $(TESTSUITE_BIN)
+       runghc Setup.hs test
 
-src_html:
-       util/hscolour_srcs
+dist:
+       runghc Setup.hs configure
+       runghc Setup.hs sdist
 
 # Neither 'haddock' nor 'hscolour' seem to work properly.
-doc: src_html
+doc: src/*.hs
+       runghc Setup.hs configure --user --flags=${FLAGS}
        runghc Setup.hs hscolour --executables
        runghc Setup.hs haddock --internal    \
                                --executables \