MERGED: Define and use $httptopdir for the haddock docs locations
authorIan Lynagh <igloo@earth.li>
Sat, 3 Nov 2007 18:00:23 +0000 (18:00 +0000)
committerIan Lynagh <igloo@earth.li>
Sat, 3 Nov 2007 18:00:23 +0000 (18:00 +0000)
Sun Oct 28 05:35:52 PDT 2007  Ian Lynagh <igloo@earth.li>

compiler/main/Packages.lhs
libraries/Makefile

index 1402db1..0b77983 100644 (file)
@@ -268,9 +268,12 @@ mungePackagePaths top_dir ps = map munge_pkg ps
   munge_paths = map munge_path
 
   munge_path p 
-         | Just p' <- maybePrefixMatch "$topdir" p = top_dir ++ p'
+         | Just p' <- maybePrefixMatch "$topdir"     p =            top_dir ++ p'
+         | Just p' <- maybePrefixMatch "$httptopdir" p = toHttpPath top_dir ++ p'
          | otherwise                               = p
 
+  toHttpPath p = "file:///" ++ p
+
 
 -- -----------------------------------------------------------------------------
 -- Modify our copy of the package database based on a package flag
index 06ce2b2..0d5e9c3 100644 (file)
@@ -103,7 +103,7 @@ ilibdir     = $$topdir
 ilibexecdir = $$topdir
 idatadir    = $$topdir
 idocdir     = $$topdir/doc/libraries/$$pkgid
-ihtmldir    = $$topdir/doc/libraries/$$pkgid
+ihtmldir    = $$httptopdir/doc/libraries/$$pkgid
 html_installed_root = $(prefix)/doc/libraries
 else
 # On non-Windows we can just give absolute paths all the time, and