MERGED: Set interfacedir (using $topdir, not $httptopdir)
authorIan Lynagh <igloo@earth.li>
Sat, 3 Nov 2007 18:08:03 +0000 (18:08 +0000)
committerIan Lynagh <igloo@earth.li>
Sat, 3 Nov 2007 18:08:03 +0000 (18:08 +0000)
Mon Oct 29 10:48:25 PDT 2007  Ian Lynagh <igloo@earth.li>

libraries/Makefile
libraries/installPackage.hs

index 0d5e9c3..e9f90d3 100644 (file)
@@ -97,24 +97,26 @@ ifeq "$(RelocatableBuild)" "YES"
 # 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.
 # 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
-ihtmldir    = $$httptopdir/doc/libraries/$$pkgid
+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
 else
 # On non-Windows we can just give absolute paths all the time, and
 # thus obey the htmldir that we are given.
 html_installed_root = $(prefix)/doc/libraries
 else
 # On non-Windows we can just give absolute paths all the time, and
 # thus obey the htmldir that we are given.
-iprefix     = $(prefix)
-ibindir     = $(bindir)
-ilibdir     = $(libdir)
-ilibexecdir = $(libexecdir)
-idatadir    = $(datadir)
-idocdir     = $(docdir)/libraries/$$pkgid
-ihtmldir    = $(htmldir)/libraries/$$pkgid
+iprefix             = $(prefix)
+ibindir             = $(bindir)
+ilibdir             = $(libdir)
+ilibexecdir         = $(libexecdir)
+idatadir            = $(datadir)
+idocdir             = $(docdir)/libraries/$$pkgid
+iinterfacedir       = $(htmldir)/libraries/$$pkgid
+ihtmldir            = $(htmldir)/libraries/$$pkgid
 html_installed_root = $(htmldir)/libraries
 endif
 
 html_installed_root = $(htmldir)/libraries
 endif
 
@@ -238,6 +240,7 @@ stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).%: %/setup/Setup
                   --libexecdir=/NONEXISTANT \
                   --datadir=/NONEXISTANT \
                   --docdir=/NONEXISTANT \
                   --libexecdir=/NONEXISTANT \
                   --datadir=/NONEXISTANT \
                   --docdir=/NONEXISTANT \
+                          --interfacedir=/NONEXISTANT \
                   --htmldir=/NONEXISTANT \
                   --with-compiler=../../compiler/stage1/ghc-inplace \
                   --with-hc-pkg=../../utils/ghc-pkg/ghc-pkg-inplace \
                   --htmldir=/NONEXISTANT \
                   --with-compiler=../../compiler/stage1/ghc-inplace \
                   --with-hc-pkg=../../utils/ghc-pkg/ghc-pkg-inplace \
@@ -350,7 +353,7 @@ $(foreach SUBDIR,$(SUBDIRS),install.library.$(SUBDIR)): \
 install.library.%: installPackage/installPackage ifBuildable/ifBuildable
        if ifBuildable/ifBuildable $*; then \
          cd $* && \
 install.library.%: installPackage/installPackage ifBuildable/ifBuildable
        if ifBuildable/ifBuildable $*; then \
          cd $* && \
-         ../installPackage/installPackage '$(GHC_PKG_PROG)' '$(DESTDIR)$(libdir)/package.conf' '$(DESTDIR)' '$(prefix)' '$(iprefix)' '$(ibindir)' '$(ilibdir)' '$(ilibexecdir)' '$(idatadir)' '$(idocdir)' '$(ihtmldir)' ; \
+         ../installPackage/installPackage '$(GHC_PKG_PROG)' '$(DESTDIR)$(libdir)/package.conf' '$(DESTDIR)' '$(prefix)' '$(iprefix)' '$(ibindir)' '$(ilibdir)' '$(ilibexecdir)' '$(idatadir)' '$(idocdir)' '$(ihtmldir)' '$(iinterfacedir)' ; \
        fi
 
 .PHONY: binary-dist binary-dist.library.%
        fi
 
 .PHONY: binary-dist binary-dist.library.%
index c255103..4f5b5ba 100644 (file)
@@ -15,7 +15,7 @@ main
        case args of
            ghcpkg : ghcpkgconf : destdir : topdir :
                     iprefix : ibindir : ilibdir : ilibexecdir :
        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
                     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
                            _ -> 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
            _ ->
                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
      -> 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) {
        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
               -- 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
                          }
               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
                          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' }
                         }
               lbi_reg = lbi { installDirTemplates = i_reg,
                               withPrograms = progs' }