X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=libraries%2FinstallPackage.hs;h=4f5b5baee8b1d82e050e2b4be0cb661abaa4aa31;hb=a4d1f3a5a560ee8f4cbf32e2d6a9e9d158c8d8ee;hp=6e5914dfae7895d2d6eb5dfad094224455d2dd75;hpb=6b2adb8d5052aa2a5dd4000beacc1f3b402257a6;p=ghc-hetmet.git diff --git a/libraries/installPackage.hs b/libraries/installPackage.hs index 6e5914d..4f5b5ba 100644 --- a/libraries/installPackage.hs +++ b/libraries/installPackage.hs @@ -15,7 +15,7 @@ main case args of ghcpkg : ghcpkgconf : destdir : topdir : iprefix : ibindir : ilibdir : ilibexecdir : - idatadir : idocdir : ihtmldir : + idatadir : idocdir : ihtmldir : iinterfacedir : args' -> let verbosity = case args' of [] -> normal @@ -27,16 +27,17 @@ main _ -> error ("Bad arguments: " ++ show args) in doit verbosity ghcpkg ghcpkgconf destdir topdir iprefix ibindir ilibdir ilibexecdir idatadir - idocdir ihtmldir + idocdir ihtmldir iinterfacedir _ -> error "Missing arguments" doit :: Verbosity -> FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> FilePath - -> FilePath -> FilePath + -> FilePath -> FilePath -> FilePath -> IO () doit verbosity ghcpkg ghcpkgconf destdir topdir - iprefix ibindir ilibdir ilibexecdir idatadir idocdir ihtmldir = + iprefix ibindir ilibdir ilibexecdir idatadir + idocdir ihtmldir iinterfacedir = do let userHooks = simpleUserHooks copyto = if null destdir then NoCopyDest else CopyTo destdir copyFlags = (emptyCopyFlags copyto) { @@ -68,13 +69,14 @@ doit verbosity ghcpkg ghcpkgconf destdir topdir -- When coying, we need to actually give a concrete -- directory to copy to rather than "$topdir" toPathTemplate' = toPathTemplate . replaceTopdir topdir - i_copy = i { prefixDirTemplate = toPathTemplate' iprefix, - binDirTemplate = toPathTemplate' ibindir, - libDirTemplate = toPathTemplate' ilibdir, - libexecDirTemplate = toPathTemplate' ilibexecdir, - dataDirTemplate = toPathTemplate' idatadir, - docDirTemplate = toPathTemplate' idocdir, - htmlDirTemplate = toPathTemplate' ihtmldir + i_copy = i { prefixDirTemplate = toPathTemplate' iprefix, + binDirTemplate = toPathTemplate' ibindir, + libDirTemplate = toPathTemplate' ilibdir, + libexecDirTemplate = toPathTemplate' ilibexecdir, + dataDirTemplate = toPathTemplate' idatadir, + docDirTemplate = toPathTemplate' idocdir, + htmlDirTemplate = toPathTemplate' ihtmldir, + interfaceDirTemplate = toPathTemplate' iinterfacedir } lbi_copy = lbi { installDirTemplates = i_copy } -- When we run GHC we give it a $topdir that includes the @@ -89,13 +91,14 @@ doit verbosity ghcpkg ghcpkgconf destdir topdir programLocation = UserSpecified ghcpkg } progs' = updateProgram prog progs - i_reg = i { prefixDirTemplate = toPathTemplate iprefix, - binDirTemplate = toPathTemplate ibindir, - libDirTemplate = toPathTemplate ilibdir, - libexecDirTemplate = toPathTemplate ilibexecdir, - dataDirTemplate = toPathTemplate idatadir, - docDirTemplate = toPathTemplate idocdir, - htmlDirTemplate = toPathTemplate ihtmldir + i_reg = i { prefixDirTemplate = toPathTemplate iprefix, + binDirTemplate = toPathTemplate ibindir, + libDirTemplate = toPathTemplate ilibdir, + libexecDirTemplate = toPathTemplate ilibexecdir, + dataDirTemplate = toPathTemplate idatadir, + docDirTemplate = toPathTemplate idocdir, + htmlDirTemplate = toPathTemplate ihtmldir, + interfaceDirTemplate = toPathTemplate iinterfacedir } lbi_reg = lbi { installDirTemplates = i_reg, withPrograms = progs' } @@ -105,6 +108,8 @@ doit verbosity ghcpkg ghcpkgconf destdir topdir replaceTopdir :: FilePath -> FilePath -> FilePath replaceTopdir topdir ('$':'t':'o':'p':'d':'i':'r':p) = topdir ++ p +replaceTopdir topdir ('$':'h':'t':'t':'p':'t':'o':'p':'d':'i':'r':p) + = topdir ++ p replaceTopdir _ p = p -- Get the build info, merging the setup-config and buildinfo files.