-DOCS := -i /usr/share/doc/ghc-6.12.3/html/libraries/base-4.2.0.2/base.haddock
-DOCS += -i /usr/share/doc/storable-complex-0.2.1/html/storable-complex.haddock
-DOCS += -i /usr/share/doc/hmatrix-0.10.0.1/html/hmatrix.haddock
+dist/doc: $(PN).cabal $(SRCS)
+ runghc Setup.hs configure --user --prefix=/ --flags=${FLAGS}
+ runghc Setup.hs hscolour --all
+ runghc Setup.hs haddock --all \
+ --hyperlink-source \
+ --haddock-options="--ignore-all-exports"