From: sven.panne@aedion.de Date: Sun, 9 Sep 2007 12:49:22 +0000 (+0000) Subject: Yet another attempt to get the paths for the installed documentation correct X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=d5796081409525eec5751e7ef2192a94d2e61c5a Yet another attempt to get the paths for the installed documentation correct MERGE TO STABLE --- diff --git a/docs/index.html b/docs/index.html index d1eb67a..0038348 100644 --- a/docs/index.html +++ b/docs/index.html @@ -30,7 +30,7 @@
  • - Libraries + Libraries

    Documentation for the libraries that come with GHC. diff --git a/libraries/Makefile b/libraries/Makefile index 5089813..ae92be9 100644 --- a/libraries/Makefile +++ b/libraries/Makefile @@ -91,8 +91,6 @@ space=$(empty) $(empty) # ----------------------------------------------------------------------------- -libraryhtmldir = $(htmldir)/libraries - ifneq "$(DOING_BIN_DIST)" "YES" CONFIGURE_OPTS = @@ -219,9 +217,7 @@ stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).%: %/setup/Setup $(CONFIGURE_OPTS) \ --prefix='$$topdir' \ --datadir='$(datadir)' \ - --datasubdir='$$pkgid' \ --libsubdir='$(libsubdir)' \ - --docdir='$(libraryhtmldir)' \ --with-compiler=../../compiler/stage1/ghc-inplace$ \ --with-hc-pkg=../../utils/ghc-pkg/ghc-pkg-inplace$ \ --with-hsc2hs=../../utils/hsc2hs/hsc2hs-inplace \ @@ -300,17 +296,17 @@ endif .PHONY: install install-docs install.library.% -DESTlibraryhtmldir = $(DESTDIR)$(libraryhtmldir)/html +libraryhtmldir = $(htmldir)/libraries install: $(foreach SUBDIR,$(SUBDIRS),install.library.$(SUBDIR)) ifeq "$(HADDOCK_DOCS)" "YES" - $(INSTALL_DIR) $(DESTlibraryhtmldir) - $(INSTALL_DATA) index.html doc-index.html $(DESTlibraryhtmldir) - $(INSTALL_SCRIPT) gen_contents_index $(DESTlibraryhtmldir) + $(INSTALL_DIR) $(DESTDIR)$(libraryhtmldir) + $(INSTALL_DATA) index.html doc-index.html $(DESTDIR)$(libraryhtmldir) + $(INSTALL_SCRIPT) gen_contents_index $(DESTDIR)$(libraryhtmldir) # Hacks: - $(INSTALL_DATA) $(DESTlibraryhtmldir)/base/*.css $(DESTlibraryhtmldir) - $(INSTALL_DATA) $(DESTlibraryhtmldir)/base/*.js $(DESTlibraryhtmldir) - $(INSTALL_DATA) $(DESTlibraryhtmldir)/base/*.gif $(DESTlibraryhtmldir) + $(INSTALL_DATA) $(DESTDIR)$(libraryhtmldir)/base/*.css $(DESTDIR)$(libraryhtmldir) + $(INSTALL_DATA) $(DESTDIR)$(libraryhtmldir)/base/*.js $(DESTDIR)$(libraryhtmldir) + $(INSTALL_DATA) $(DESTDIR)$(libraryhtmldir)/base/*.gif $(DESTDIR)$(libraryhtmldir) endif # Cabal doesn't let us ask to install docs only, so do nothing here @@ -324,7 +320,7 @@ $(foreach SUBDIR,$(SUBDIRS),install.library.$(SUBDIR)): \ install.library.%: installPackage/installPackage ifBuildable/ifBuildable if ifBuildable/ifBuildable $*; then \ cd $* && \ - ../installPackage/installPackage "$(DESTDIR)" "$(prefix)" "$(datadir)" "$(libraryhtmldir)" "$(GHC_PKG_PROG)" "$(DESTDIR)$(libdir)/package.conf" ; \ + ../installPackage/installPackage "$(DESTDIR)" "$(prefix)" "$(datadir)" "$(libraryhtmldir)/$*" "$(libraryhtmldir)" "$(GHC_PKG_PROG)" "$(DESTDIR)$(libdir)/package.conf" ; \ fi .PHONY: binary-dist binary-dist.library.% diff --git a/libraries/installPackage.hs b/libraries/installPackage.hs index 01bde47..965ef52 100644 --- a/libraries/installPackage.hs +++ b/libraries/installPackage.hs @@ -13,7 +13,7 @@ main :: IO () main = do args <- getArgs case args of - destdir : pref : idatadir : idocdir : ghcpkg : ghcpkgconf : args' -> + destdir : pref : idatadir : idocdir : ihtmldir : ghcpkg : ghcpkgconf : args' -> let verbosity = case args' of [] -> normal ['-':'v':v] -> @@ -22,15 +22,15 @@ main _ -> Just v in flagToVerbosity m _ -> error ("Bad arguments: " ++ show args) - in doit destdir pref idatadir idocdir ghcpkg ghcpkgconf + in doit destdir pref idatadir idocdir ihtmldir ghcpkg ghcpkgconf verbosity _ -> error "Missing arguments" -doit :: FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> FilePath +doit :: FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> FilePath -> Verbosity -> IO () -doit destdir pref idatadir idocdir ghcpkg ghcpkgconf verbosity = +doit destdir pref idatadir idocdir ihtmldir ghcpkg ghcpkgconf verbosity = do let userHooks = simpleUserHooks copyto = if null destdir then NoCopyDest else CopyTo destdir copyFlags = (emptyCopyFlags copyto) { @@ -63,7 +63,8 @@ doit destdir pref idatadir idocdir ghcpkg ghcpkgconf verbosity = -- directory to copy to rather than "$topdir" i_copy = i { prefixDirTemplate = toPathTemplate pref, dataDirTemplate = toPathTemplate idatadir, - docDirTemplate = toPathTemplate idocdir + docDirTemplate = toPathTemplate idocdir, + htmlDirTemplate = toPathTemplate ihtmldir } lbi_copy = lbi { installDirTemplates = i_copy } -- When we run GHC we give it a $topdir that includes the