+# -----------------------------------------------------------------------------
+
+ifeq "$(RelocatableBuild)" "YES"
+# On Windows we want to make moveable bindists, but we need to tell
+# ghc-pkg where the haddock docs are. Therefore we completely ignore
+# where the user tells us to put the haddock documentation and put it
+# somewhere whose relative location we know. When installing we need
+# to give Cabal a real path, though.
+iprefix = $$topdir
+ibindir = $$topdir
+ilibdir = $$topdir
+ilibexecdir = $$topdir
+idatadir = $$topdir
+idocdir = $$topdir/doc/libraries/$$pkgid
+iinterfacedir = $$topdir/doc/libraries/$$pkgid
+ihtmldir = $$httptopdir/doc/libraries/$$pkgid
+html_installed_root = $(prefix)/doc/libraries