util/hscolour_srcs
-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/quickcheck-2.1.0.3/html/QuickCheck.haddock
-DOCS += -i /usr/share/doc/hmatrix-0.11.0.4/html/hmatrix.haddock
-DOCS += -i /usr/share/doc/hunit-1.2.0.3/html/HUnit.haddock
+DOCS := -i /usr/share/doc/ghc-*/html/libraries/base-*/base.haddock
+DOCS += -i /usr/share/doc/ghc-*/html/libraries/ghc-prim-*/ghc-prim.haddock
+DOCS += -i /usr/share/doc/ghc-*/html/libraries/haskell98-*/haskell98.haddock
+DOCS += -i /usr/share/doc/storable-complex-*/html/storable-complex.haddock
+DOCS += -i /usr/share/doc/quickcheck-*/html/QuickCheck.haddock
+DOCS += -i /usr/share/doc/hmatrix-*/html/hmatrix.haddock
+DOCS += -i /usr/share/doc/hunit-*/html/HUnit.haddock
+
+
+HTMLS := /usr/share/doc/ghc-*/html/libraries/base-*/*.html
+HTMLS += /usr/share/doc/ghc-*/html/libraries/ghc-prim-*/*.html
+HTMLS += /usr/share/doc/ghc-*/html/libraries/haskell98-*/*.html
+HTMLS += /usr/share/doc/quickcheck-*/html/*.html
+HTMLS += /usr/share/doc/hunit-*/html/*.html
+HTMLS += /usr/share/doc/storable-complex-*/html/*.html
+HTMLS += /usr/share/doc/hmatrix-*/html/*.html
+
+HSCOLOUR_SRCS := /usr/share/doc/ghc-*/html/libraries/base-*/src/*
+HSCOLOUR_SRCS += /usr/share/doc/ghc-*/html/libraries/ghc-prim-*/src/*
+HSCOLOUR_SRCS += /usr/share/doc/ghc-*/html/libraries/haskell98-*/src/*
+HSCOLOUR_SRCS += /usr/share/doc/hmatrix-*/html/src/*
doc: src_html
+ cp -n $(HTMLS) ./doc/html/
+ cp -n $(HSCOLOUR_SRCS) ./doc/html/src/
haddock $(DOCS) --html --use-unicode \
--odir=doc/html/ --title="spline3" \
--source-module="src/%{MODULE/.//}.html" \