aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ghc.mk8
-rw-r--r--haddock.cabal26
-rw-r--r--resources/html/Classic.theme/haskell_icon.gif (renamed from html/Classic.theme/haskell_icon.gif)bin911 -> 911 bytes
-rw-r--r--resources/html/Classic.theme/minus.gif (renamed from html/Classic.theme/minus.gif)bin56 -> 56 bytes
-rw-r--r--resources/html/Classic.theme/plus.gif (renamed from html/Classic.theme/plus.gif)bin59 -> 59 bytes
-rw-r--r--resources/html/Classic.theme/xhaddock.css (renamed from html/Classic.theme/xhaddock.css)0
-rw-r--r--resources/html/Ocean.std-theme/hslogo-16.png (renamed from html/Ocean.std-theme/hslogo-16.png)bin1684 -> 1684 bytes
-rw-r--r--resources/html/Ocean.std-theme/minus.gif (renamed from html/Ocean.std-theme/minus.gif)bin56 -> 56 bytes
-rw-r--r--resources/html/Ocean.std-theme/ocean.css (renamed from html/Ocean.std-theme/ocean.css)0
-rw-r--r--resources/html/Ocean.std-theme/plus.gif (renamed from html/Ocean.std-theme/plus.gif)bin59 -> 59 bytes
-rw-r--r--resources/html/Ocean.std-theme/synopsis.png (renamed from html/Ocean.std-theme/synopsis.png)bin11327 -> 11327 bytes
-rw-r--r--resources/html/frames.html (renamed from html/frames.html)0
-rw-r--r--resources/html/haddock-util.js (renamed from html/haddock-util.js)0
-rw-r--r--resources/latex/haddock.sty (renamed from latex/haddock.sty)0
-rw-r--r--tests/html-tests/runtests.hs8
15 files changed, 22 insertions, 20 deletions
diff --git a/ghc.mk b/ghc.mk
index 3742565c..3af63818 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -13,11 +13,11 @@ $(INPLACE_BIN)/$(utils/haddock_dist_PROG): $(INPLACE_LIB)/html $(INPLACE_LIB)/la
$(INPLACE_LIB)/html:
$(call removeTrees,$@)
- "$(CP)" -R utils/haddock/html $@
+ "$(CP)" -R utils/haddock/resources/html $@
$(INPLACE_LIB)/latex:
$(call removeTrees,$@)
- "$(CP)" -R utils/haddock/latex $@
+ "$(CP)" -R utils/haddock/resources/latex $@
endif
@@ -41,12 +41,12 @@ install_utils/haddock_data:
$(foreach i,$(sort $(dir $(utils/haddock_dist_DATA_FILES))), \
$(call make-command,$(call INSTALL_DIR,"$(DESTDIR)$(ghclibdir)/$i")))
$(foreach i,$(utils/haddock_dist_DATA_FILES), \
- $(call make-command,$(call INSTALL_DATA,$(INSTALL_OPTS),utils/haddock/$i,"$(DESTDIR)$(ghclibdir)/$(dir $i)")))
+ $(call make-command,$(call INSTALL_DATA,$(INSTALL_OPTS),utils/haddock/resources/$i,"$(DESTDIR)$(ghclibdir)/$(dir $i)")))
.PHONY: install_utils/haddock_link
install_utils/haddock_link:
$(call removeFiles,"$(DESTDIR)$(bindir)/haddock")
$(LN_S) $(utils/haddock_dist_INSTALL_SHELL_WRAPPER_NAME) "$(DESTDIR)$(bindir)/haddock"
-BINDIST_EXTRAS += $(addprefix utils/haddock/,$(utils/haddock_dist_DATA_FILES))
+BINDIST_EXTRAS += $(addprefix utils/haddock/resources/,$(utils/haddock_dist_DATA_FILES))
diff --git a/haddock.cabal b/haddock.cabal
index 88c18cd3..846d7c6a 100644
--- a/haddock.cabal
+++ b/haddock.cabal
@@ -33,19 +33,19 @@ extra-source-files:
-- the test-suite stanzas don't get picked up by `cabal sdist`.
tests/html-tests/runtests.hs
-data-files:
- html/frames.html
- html/haddock-util.js
- html/Classic.theme/haskell_icon.gif
- html/Classic.theme/minus.gif
- html/Classic.theme/plus.gif
- html/Classic.theme/xhaddock.css
- html/Ocean.std-theme/hslogo-16.png
- html/Ocean.std-theme/minus.gif
- html/Ocean.std-theme/ocean.css
- html/Ocean.std-theme/plus.gif
- html/Ocean.std-theme/synopsis.png
- latex/haddock.sty
+data-dir: resources
+data-files: html/frames.html
+ html/haddock-util.js
+ html/Classic.theme/haskell_icon.gif
+ html/Classic.theme/minus.gif
+ html/Classic.theme/plus.gif
+ html/Classic.theme/xhaddock.css
+ html/Ocean.std-theme/hslogo-16.png
+ html/Ocean.std-theme/minus.gif
+ html/Ocean.std-theme/ocean.css
+ html/Ocean.std-theme/plus.gif
+ html/Ocean.std-theme/synopsis.png
+ latex/haddock.sty
flag in-ghc-tree
description: Are we in a GHC tree?
diff --git a/html/Classic.theme/haskell_icon.gif b/resources/html/Classic.theme/haskell_icon.gif
index 10589f91..10589f91 100644
--- a/html/Classic.theme/haskell_icon.gif
+++ b/resources/html/Classic.theme/haskell_icon.gif
Binary files differ
diff --git a/html/Classic.theme/minus.gif b/resources/html/Classic.theme/minus.gif
index 1deac2fe..1deac2fe 100644
--- a/html/Classic.theme/minus.gif
+++ b/resources/html/Classic.theme/minus.gif
Binary files differ
diff --git a/html/Classic.theme/plus.gif b/resources/html/Classic.theme/plus.gif
index 2d15c141..2d15c141 100644
--- a/html/Classic.theme/plus.gif
+++ b/resources/html/Classic.theme/plus.gif
Binary files differ
diff --git a/html/Classic.theme/xhaddock.css b/resources/html/Classic.theme/xhaddock.css
index 40ea0d06..40ea0d06 100644
--- a/html/Classic.theme/xhaddock.css
+++ b/resources/html/Classic.theme/xhaddock.css
diff --git a/html/Ocean.std-theme/hslogo-16.png b/resources/html/Ocean.std-theme/hslogo-16.png
index 0ff8579f..0ff8579f 100644
--- a/html/Ocean.std-theme/hslogo-16.png
+++ b/resources/html/Ocean.std-theme/hslogo-16.png
Binary files differ
diff --git a/html/Ocean.std-theme/minus.gif b/resources/html/Ocean.std-theme/minus.gif
index 1deac2fe..1deac2fe 100644
--- a/html/Ocean.std-theme/minus.gif
+++ b/resources/html/Ocean.std-theme/minus.gif
Binary files differ
diff --git a/html/Ocean.std-theme/ocean.css b/resources/html/Ocean.std-theme/ocean.css
index 42238709..42238709 100644
--- a/html/Ocean.std-theme/ocean.css
+++ b/resources/html/Ocean.std-theme/ocean.css
diff --git a/html/Ocean.std-theme/plus.gif b/resources/html/Ocean.std-theme/plus.gif
index 2d15c141..2d15c141 100644
--- a/html/Ocean.std-theme/plus.gif
+++ b/resources/html/Ocean.std-theme/plus.gif
Binary files differ
diff --git a/html/Ocean.std-theme/synopsis.png b/resources/html/Ocean.std-theme/synopsis.png
index 85fb86ec..85fb86ec 100644
--- a/html/Ocean.std-theme/synopsis.png
+++ b/resources/html/Ocean.std-theme/synopsis.png
Binary files differ
diff --git a/html/frames.html b/resources/html/frames.html
index 1b4e38d4..1b4e38d4 100644
--- a/html/frames.html
+++ b/resources/html/frames.html
diff --git a/html/haddock-util.js b/resources/html/haddock-util.js
index 9a6fccf7..9a6fccf7 100644
--- a/html/haddock-util.js
+++ b/resources/html/haddock-util.js
diff --git a/latex/haddock.sty b/resources/latex/haddock.sty
index 6e031a98..6e031a98 100644
--- a/latex/haddock.sty
+++ b/resources/latex/haddock.sty
diff --git a/tests/html-tests/runtests.hs b/tests/html-tests/runtests.hs
index 28bf2f7e..759f7495 100644
--- a/tests/html-tests/runtests.hs
+++ b/tests/html-tests/runtests.hs
@@ -1,5 +1,6 @@
import Prelude hiding (mod)
import Control.Monad
+import Control.Applicative
import Data.List
import Data.Maybe
import Distribution.InstalledPackageInfo
@@ -19,8 +20,9 @@ import System.FilePath
import System.Process (ProcessHandle, runProcess, waitForProcess)
-packageRoot, haddockPath, testSuiteRoot, testDir, outDir :: FilePath
+packageRoot, dataDir, haddockPath, testSuiteRoot, testDir, outDir :: FilePath
packageRoot = "."
+dataDir = packageRoot </> "resources"
haddockPath = packageRoot </> "dist" </> "build" </> "haddock" </> "haddock"
testSuiteRoot = packageRoot </> "tests" </> "html-tests"
testDir = testSuiteRoot </> "tests"
@@ -48,8 +50,8 @@ test = do
let mods' = map (testDir </>) mods
- env_ <- getEnvironment
- let env = Just (("haddock_datadir", packageRoot) : env_)
+ -- add haddock_datadir to environment for subprocesses
+ env <- Just . (:) ("haddock_datadir", dataDir) <$> getEnvironment
putStrLn ""
putStrLn "Haddock version: "