summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2007-11-03 18:08:03 +0000
committerIan Lynagh <igloo@earth.li>2007-11-03 18:08:03 +0000
commitd8ca7c9ed01c99475367520dcd4906571355a4a1 (patch)
tree01863ae04c1a44b216296d7b788c4552ba1f5e05 /libraries
parent6ff892eeed99b4be0760899398c7ae138983a51a (diff)
downloadhaskell-d8ca7c9ed01c99475367520dcd4906571355a4a1.tar.gz
MERGED: Set interfacedir (using $topdir, not $httptopdir)
Mon Oct 29 10:48:25 PDT 2007 Ian Lynagh <igloo@earth.li>
Diffstat (limited to 'libraries')
-rw-r--r--libraries/Makefile33
-rw-r--r--libraries/installPackage.hs39
2 files changed, 39 insertions, 33 deletions
diff --git a/libraries/Makefile b/libraries/Makefile
index 0d5e9c3f1b..e9f90d37d7 100644
--- a/libraries/Makefile
+++ b/libraries/Makefile
@@ -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.
-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.
-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
@@ -238,6 +240,7 @@ stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).%: %/setup/Setup
--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 \
@@ -350,7 +353,7 @@ $(foreach SUBDIR,$(SUBDIRS),install.library.$(SUBDIR)): \
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.%
diff --git a/libraries/installPackage.hs b/libraries/installPackage.hs
index c255103f36..4f5b5baee8 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' }