Commit 97fa508d authored by patrickdoc's avatar patrickdoc Committed by Andrey Mokhov

Implement documentation building (#413)

* Implement documentation building

* Clean up for merge
parent 101d7875
......@@ -10,12 +10,12 @@ ar = @ArCmd@
cc = @CC@
happy = @HappyCmd@
hs-cpp = @HaskellCPPCmd@
hscolour = @HSCOLOUR@
ld = @LdCmd@
make = @MakeCmd@
nm = @NmCmd@
objdump = @ObjdumpCmd@
ranlib = @REAL_RANLIB_CMD@
sphinx-build = @SPHINXBUILD@
system-ar = @AR_STAGE0@
system-cc = @CC_STAGE0@
system-ghc = @WithGhc@
......@@ -24,6 +24,7 @@ tar = @TarCmd@
patch = @PatchCmd@
perl = @PerlCmd@
ln-s = @LN_S@
xelatex = @XELATEX@
# Information about builders:
#============================
......
......@@ -77,7 +77,9 @@ executable hadrian
, Settings.Builders.HsCpp
, Settings.Builders.Ld
, Settings.Builders.Make
, Settings.Builders.Sphinx
, Settings.Builders.Tar
, Settings.Builders.Xelatex
, Settings.Default
, Settings.Flavours.Development
, Settings.Flavours.Performance
......
{-# LANGUAGE InstanceSigs #-}
module Builder (
-- * Data types
ArMode (..), CcMode (..), GhcMode (..), GhcPkgMode (..), Builder (..),
ArMode (..), CcMode (..), GhcMode (..), GhcPkgMode (..), HaddockMode (..),
SphinxMode (..), TarMode (..), Builder (..),
-- * Builder properties
builderProvenance, systemBuilderPath, builderPath, isSpecified, needBuilder,
......@@ -57,6 +58,32 @@ instance Binary GhcPkgMode
instance Hashable GhcPkgMode
instance NFData GhcPkgMode
-- | Haddock can be used in two different modes:
-- * Generate documentation for a single package
-- * Generate an index page for a collection of packages
data HaddockMode = BuildPackage | BuildIndex deriving (Eq, Generic, Show)
instance Binary HaddockMode
instance Hashable HaddockMode
instance NFData HaddockMode
-- | Sphinx can be used in three different modes:
-- * Convert RST to HTML
-- * Convert RST to LaTeX
-- * Convert RST to Man pages
data SphinxMode = Html | Latex | Man deriving (Eq, Generic, Show)
instance Binary SphinxMode
instance Hashable SphinxMode
instance NFData SphinxMode
-- | Tar can be used to create an archive or extract from it.
data TarMode = Create | Extract deriving (Eq, Generic, Show)
instance Binary TarMode
instance Hashable TarMode
instance NFData TarMode
-- | A 'Builder' is an external command invoked in a separate process via 'cmd'.
-- @Ghc Stage0@ is the bootstrapping compiler.
-- @Ghc StageN@, N > 0, is the one built in stage (N - 1).
......@@ -71,12 +98,10 @@ data Builder = Alex
| GenPrimopCode
| Ghc GhcMode Stage
| GhcCabal
| GhcCabalHsColour -- synonym for 'GhcCabal hscolour'
| GhcPkg GhcPkgMode Stage
| Haddock
| Haddock HaddockMode
| Happy
| Hpc
| HsColour
| HsCpp
| Hsc2Hs
| Ld
......@@ -86,8 +111,10 @@ data Builder = Alex
| Patch
| Perl
| Ranlib
| Tar
| Sphinx SphinxMode
| Tar TarMode
| Unlit
| Xelatex
deriving (Eq, Generic, Show)
instance Binary Builder
......@@ -105,10 +132,9 @@ builderProvenance = \case
Ghc _ Stage0 -> Nothing
Ghc _ stage -> context (pred stage) ghc
GhcCabal -> context Stage0 ghcCabal
GhcCabalHsColour -> builderProvenance $ GhcCabal
GhcPkg _ Stage0 -> Nothing
GhcPkg _ _ -> context Stage0 ghcPkg
Haddock -> context Stage2 haddock
Haddock _ -> context Stage2 haddock
Hpc -> context Stage1 hpcBin
Hsc2Hs -> context Stage0 hsc2hs
Unlit -> context Stage0 unlit
......@@ -171,6 +197,15 @@ instance H.Builder Builder where
Make dir -> cmd Shell echo path ["-C", dir] buildArgs
Xelatex -> do
unit $ cmd Shell [Cwd output] [path] buildArgs
unit $ cmd Shell [Cwd output] [path] buildArgs
unit $ cmd Shell [Cwd output] [path] buildArgs
unit $ cmd Shell [Cwd output] ["makeindex"]
(input -<.> "idx")
unit $ cmd Shell [Cwd output] [path] buildArgs
cmd Shell [Cwd output] [path] buildArgs
_ -> cmd echo [path] buildArgs
-- TODO: Some builders are required only on certain platforms. For example,
......@@ -179,7 +214,6 @@ instance H.Builder Builder where
-- test this feature.
isOptional :: Builder -> Bool
isOptional = \case
HsColour -> True
Objdump -> True
_ -> False
......@@ -196,7 +230,6 @@ systemBuilderPath builder = case builder of
Ghc _ Stage0 -> fromKey "system-ghc"
GhcPkg _ Stage0 -> fromKey "system-ghc-pkg"
Happy -> fromKey "happy"
HsColour -> fromKey "hscolour"
HsCpp -> fromKey "hs-cpp"
Ld -> fromKey "ld"
Make _ -> fromKey "make"
......@@ -205,7 +238,9 @@ systemBuilderPath builder = case builder of
Patch -> fromKey "patch"
Perl -> fromKey "perl"
Ranlib -> fromKey "ranlib"
Tar -> fromKey "tar"
Sphinx _ -> fromKey "sphinx-build"
Tar _ -> fromKey "tar"
Xelatex -> fromKey "xelatex"
_ -> error $ "No entry for " ++ show builder ++ inCfg
where
inCfg = " in " ++ quote configFile ++ " file."
......
......@@ -109,10 +109,10 @@ pkgSetupConfigFile context = do
-- | Path to the haddock file of a given 'Context', e.g.:
-- @_build/stage1/libraries/array/doc/html/array/array.haddock@.
pkgHaddockFile :: Context -> Action FilePath
pkgHaddockFile context@Context {..} = do
path <- buildPath context
pkgHaddockFile Context {..} = do
root <- buildRoot
let name = pkgName package
return $ path -/- "doc/html" -/- name -/- name <.> "haddock"
return $ root -/- "docs/html/libraries" -/- name -/- name <.> "haddock"
-- | Path to the library file of a given 'Context', e.g.:
-- @_build/stage1/libraries/array/build/libHSarray-0.5.1.0.a@.
......
......@@ -9,6 +9,7 @@ import qualified CommandLine
import qualified Environment
import qualified Rules
import qualified Rules.Clean
import qualified Rules.Documentation
import qualified Rules.Install
import qualified Rules.SourceDist
import qualified Rules.Selftest
......@@ -38,6 +39,7 @@ main = do
rules :: Rules ()
rules = do
Rules.buildRules
Rules.Documentation.documentationRules
Rules.Clean.cleanRules
Rules.Install.installRules
Rules.oracleRules
......
module Rules.Documentation (buildPackageDocumentation, haddockDependencies) where
module Rules.Documentation (
-- * Rules
buildPackageDocumentation, documentationRules,
-- * Utilities
haddockDependencies
) where
import Base
import Context
......@@ -10,9 +16,102 @@ import Settings
import Target
import Utilities
-- | Build all documentation
documentationRules :: Rules ()
documentationRules = do
buildHtmlDocumentation
buildPdfDocumentation
buildDocumentationArchives
"docs" ~> do
root <- buildRoot
let html = htmlRoot -/- "index.html"
archives = map pathArchive docPaths
pdfs = map pathPdf $ docPaths \\ [ "libraries" ]
need $ map (root -/-) $ [html] ++ archives ++ pdfs
-- TODO: Add support for Documentation Packages so we can
-- run the builders without this hack.
docPackage :: Package
docPackage = hsLibrary "Documentation" "docs"
docPaths :: [FilePath]
docPaths = [ "libraries", "users_guide", "Haddock" ]
docRoot :: FilePath
docRoot = "docs"
htmlRoot :: FilePath
htmlRoot = docRoot -/- "html"
pdfRoot :: FilePath
pdfRoot = docRoot -/- "pdfs"
archiveRoot :: FilePath
archiveRoot = docRoot -/- "archives"
pathPdf :: FilePath -> FilePath
pathPdf path = pdfRoot -/- path <.> ".pdf"
pathIndex :: FilePath -> FilePath
pathIndex path = htmlRoot -/- path -/- "index.html"
pathArchive :: FilePath -> FilePath
pathArchive path = archiveRoot -/- path <.> "html.tar.xz"
-- TODO: Replace this with pkgPath when support is added
-- for Documentation Packages.
pathPath :: FilePath -> FilePath
pathPath "users_guide" = "docs/users_guide"
pathPath "Haddock" = "utils/haddock/doc"
pathPath _ = ""
----------------------------------------------------------------------
-- HTML
-- | Build all HTML documentation
buildHtmlDocumentation :: Rules ()
buildHtmlDocumentation = do
mapM_ buildSphinxHtml $ docPaths \\ [ "libraries" ]
buildLibraryDocumentation
"//" ++ htmlRoot -/- "index.html" %> \file -> do
root <- buildRoot
need $ map ((root -/-) . pathIndex) docPaths
copyFileUntracked "docs/index.html" file
-----------------------------
-- Sphinx
-- | Compile a Sphinx ReStructured Text package to HTML
buildSphinxHtml :: FilePath -> Rules ()
buildSphinxHtml path = do
"//" ++ htmlRoot -/- path -/- "index.html" %> \file -> do
let dest = takeDirectory file
context = vanillaContext Stage0 docPackage
build $ target context (Sphinx Html) [pathPath path] [dest]
-----------------------------
-- Haddock
-- | Build the haddocks for GHC's libraries
buildLibraryDocumentation :: Rules ()
buildLibraryDocumentation = do
"//" ++ htmlRoot -/- "libraries/index.html" %> \file -> do
haddocks <- allHaddocks
need haddocks
let libDocs = filter (\x -> takeFileName x /= "ghc.haddock") haddocks
context = vanillaContext Stage2 docPackage
build $ target context (Haddock BuildIndex) libDocs [file]
allHaddocks :: Action [FilePath]
allHaddocks = do
pkgs <- stagePackages Stage1
sequence [ pkgHaddockFile $ vanillaContext Stage1 pkg
| pkg <- pkgs, isLibrary pkg, isHsPackage pkg ]
haddockHtmlLib :: FilePath
haddockHtmlLib = "inplace/lib/html/haddock-util.js"
-- | Find the haddock files for the dependencies of the current library
haddockDependencies :: Context -> Action [FilePath]
haddockDependencies context = do
path <- buildPath context
......@@ -25,23 +124,55 @@ haddockDependencies context = do
-- files in the Shake database seems fragile and unnecessary.
buildPackageDocumentation :: Context -> Rules ()
buildPackageDocumentation context@Context {..} = when (stage == Stage1) $ do
"//" ++ contextDir context ++ "//*.haddock" %> \file -> do
srcs <- hsSources context
-- Js and Css files for haddock output
when (package == haddock) $ haddockHtmlLib %> \_ -> do
let dir = takeDirectory haddockHtmlLib
liftIO $ removeFiles dir ["//*"]
copyDirectory "utils/haddock/haddock-api/resources/html" dir
-- Per-package haddocks
"//" ++ pkgName package <.> "haddock" %> \file -> do
haddocks <- haddockDependencies context
srcs <- hsSources context
need $ srcs ++ haddocks ++ [haddockHtmlLib]
-- Build Haddock documentation
-- TODO: pass the correct way from Rules via Context
dynamicPrograms <- dynamicGhcPrograms <$> flavour
let haddockWay = if dynamicPrograms then dynamic else vanilla
build $ target (context {way = haddockWay}) Haddock srcs [file]
build $ target (context {way = haddockWay}) (Haddock BuildPackage)
srcs [file]
when (package == haddock) $ haddockHtmlLib %> \_ -> do
let dir = takeDirectory haddockHtmlLib
liftIO $ removeFiles dir ["//*"]
copyDirectory "utils/haddock/haddock-api/resources/html" dir
----------------------------------------------------------------------
-- PDF
-- | Build all PDF documentation
buildPdfDocumentation :: Rules ()
buildPdfDocumentation = mapM_ buildSphinxPdf docPaths
-- | Compile a Sphinx ReStructured Text package to LaTeX
buildSphinxPdf :: FilePath -> Rules ()
buildSphinxPdf path = do
"//" ++ path <.> "pdf" %> \file -> do
let context = vanillaContext Stage0 docPackage
withTempDir $ \dir -> do
build $ target context (Sphinx Latex) [pathPath path] [dir]
build $ target context Xelatex [path <.> "tex"] [dir]
copyFileUntracked (dir -/- path <.> "pdf") file
----------------------------------------------------------------------
-- Archive
-- | Build archives of documentation
buildDocumentationArchives :: Rules ()
buildDocumentationArchives = mapM_ buildArchive docPaths
-- # Make the haddocking depend on the library .a file, to ensure
-- # that we wait until the library is fully built before we haddock it
-- $$($$($1_PACKAGE)-$$($1_$2_VERSION)_HADDOCK_FILE) : $$($1_$2_$$(HADDOCK_WAY)_LIB)
-- endif
buildArchive :: FilePath -> Rules ()
buildArchive path = do
"//" ++ pathArchive path %> \file -> do
root <- buildRoot
let context = vanillaContext Stage0 docPackage
src = root -/- pathIndex path
need [src]
build $ target context (Tar Create) [takeDirectory src] [file]
......@@ -104,7 +104,7 @@ gmpRules = do
withTempDir $ \dir -> do
let tmp = unifyPath dir
need [tarball]
build $ target gmpContext Tar [tarball] [tmp]
build $ target gmpContext (Tar Extract) [tarball] [tmp]
let patch = gmpBase -/- "gmpsrc.patch"
patchName = takeFileName patch
......
......@@ -210,9 +210,6 @@ installPackages = do
quietly $ copyDirectoryContentsUntracked (Not excluded)
installDistDir (installDistDir -/- "build")
whenM (isSpecified HsColour) $
build $ target context GhcCabalHsColour [cabalFile] []
pref <- setting InstallPrefix
unit $ cmd ghcCabalInplace [ "copy"
, pkgPath pkg
......
......@@ -88,7 +88,7 @@ libffiRules = do
removeDirectory (root -/- libname)
-- TODO: Simplify.
actionFinally (do
build $ target libffiContext Tar [tarball] [root]
build $ target libffiContext (Tar Extract) [tarball] [root]
moveDirectory (root -/- libname) libffiPath) $
removeFiles root [libname <//> "*"]
......
......@@ -19,7 +19,7 @@ sourceDistRules = do
dropTarXz = dropExtension . dropExtension
treePath = "sdistprep/ghc" -/- dropTarXz tarName
prepareTree treePath
runBuilderWithCmdOptions [Cwd "sdistprep/ghc"] Tar
runBuilderWithCmdOptions [Cwd "sdistprep/ghc"] (Tar Create)
["cJf", ".." -/- tarName, dropTarXz tarName]
["cJf", ".." -/- tarName] [dropTarXz tarName]
"GIT_COMMIT_ID" %> \fname ->
......
......@@ -31,7 +31,7 @@ testRules = do
top <- topDirectory
compiler <- builderPath $ Ghc CompileHs Stage2
ghcPkg <- builderPath $ GhcPkg Update Stage1
haddock <- builderPath Haddock
haddock <- builderPath (Haddock BuildPackage)
threads <- shakeThreads <$> getShakeOptions
debugged <- ghcDebugged <$> flavour
ghcWithNativeCodeGenInt <- fromEnum <$> ghcWithNativeCodeGen
......
module Settings.Builders.GhcCabal (
ghcCabalBuilderArgs, ghcCabalHsColourBuilderArgs
ghcCabalBuilderArgs
) where
import Hadrian.Haskell.Cabal
......@@ -21,7 +21,6 @@ ghcCabalBuilderArgs = builder GhcCabal ? do
, withStaged (GhcPkg Update)
, bootPackageDatabaseArgs
, libraryArgs
, with HsColour
, configureArgs
, bootPackageConstraints
, withStaged $ Cc CompileC
......@@ -32,13 +31,6 @@ ghcCabalBuilderArgs = builder GhcCabal ? do
, verbosity < Chatty ? pure [ "-v0", "--configure-option=--quiet"
, "--configure-option=--disable-option-checking" ] ]
ghcCabalHsColourBuilderArgs :: Args
ghcCabalHsColourBuilderArgs = builder GhcCabalHsColour ? do
srcPath <- pkgPath <$> getPackage
top <- expr topDirectory
path <- getBuildPath
pure [ "hscolour", srcPath, top -/- path ]
-- TODO: Isn't vanilla always built? If yes, some conditions are redundant.
-- TODO: Need compiler_stage1_CONFIGURE_OPTS += --disable-library-for-ghci?
libraryArgs :: Args
......@@ -110,7 +102,6 @@ withBuilderKey b = case b of
Alex -> "--with-alex="
Happy -> "--with-happy="
GhcPkg _ _ -> "--with-ghc-pkg="
HsColour -> "--with-hscolour="
_ -> error $ "withBuilderKey: not supported builder " ++ show b
-- Expression 'with Alex' appends "--with-alex=/path/to/alex" and needs Alex.
......
......@@ -14,50 +14,50 @@ versionToInt s = case map read . words $ replaceEq '.' ' ' s of
_ -> error "versionToInt: cannot parse version."
haddockBuilderArgs :: Args
haddockBuilderArgs = withHsPackage $ \cabalFile -> builder Haddock ? do
output <- getOutput
pkg <- getPackage
path <- getBuildPath
version <- expr $ pkgVersion cabalFile
synopsis <- expr $ pkgSynopsis cabalFile
deps <- getPkgDataList Deps
haddocks <- expr . haddockDependencies =<< getContext
hVersion <- expr $ pkgVersion (unsafePkgCabalFile haddock) -- TODO: improve
ghcOpts <- haddockGhcArgs
mconcat
[ arg $ "--odir=" ++ takeDirectory output
, arg "--verbosity=0"
, arg "--no-tmp-comp-dir"
, arg $ "--dump-interface=" ++ output
, arg "--html"
, arg "--hoogle"
, arg $ "--title=" ++ pkgName pkg ++ "-" ++ version ++ ": " ++ synopsis
, arg $ "--prologue=" ++ path -/- "haddock-prologue.txt"
, arg $ "--optghc=-D__HADDOCK_VERSION__=" ++ show (versionToInt hVersion)
, map ("--hide=" ++) <$> getPkgDataList HiddenModules
, pure [ "--read-interface=../" ++ dep
++ ",../" ++ dep ++ "/src/%{MODULE/./-}.html\\#%{NAME},"
++ haddock | (dep, haddock) <- zip deps haddocks ]
, pure [ "--optghc=" ++ opt | opt <- ghcOpts ]
, isSpecified HsColour ?
pure [ "--source-module=src/%{MODULE/./-}.html"
, "--source-entity=src/%{MODULE/./-}.html\\#%{NAME}" ]
, getInputs
, arg "+RTS"
, arg $ "-t" ++ path -/- "haddock.t"
, arg "--machine-readable"
, arg "-RTS" ]
haddockBuilderArgs = withHsPackage $ \cabalFile -> mconcat
[ builder (Haddock BuildIndex) ? do
output <- getOutput
inputs <- getInputs
mconcat
[ arg "--gen-index"
, arg "--gen-contents"
, arg "-o", arg $ takeDirectory output
, arg "-t", arg "Haskell Hierarchical Libraries"
, arg "-p", arg "libraries/prologue.txt"
, pure [ "--read-interface="
++ (takeFileName . takeDirectory) haddock
++ "," ++ haddock | haddock <- inputs ] ]
-- From ghc.mk:
-- # -----------------------------------------------
-- # Haddock-related bits
-- # Build the Haddock contents and index
-- ifeq "$(HADDOCK_DOCS)" "YES"
-- libraries/dist-haddock/index.html: $(haddock_INPLACE) $(ALL_HADDOCK_FILES)
-- cd libraries && sh gen_contents_index --intree
-- ifeq "$(phase)" "final"
-- $(eval $(call all-target,library_doc_index,libraries/dist-haddock/index.html))
-- endif
-- INSTALL_LIBRARY_DOCS += libraries/dist-haddock/*
-- endif
, builder (Haddock BuildPackage) ? do
output <- getOutput
pkg <- getPackage
path <- getBuildPath
version <- expr $ pkgVersion cabalFile
synopsis <- expr $ pkgSynopsis cabalFile
deps <- getPkgDataList DepNames
haddocks <- expr . haddockDependencies =<< getContext
hVersion <- expr $ pkgVersion (unsafePkgCabalFile haddock) -- TODO: improve
ghcOpts <- haddockGhcArgs
mconcat
[ arg $ "--odir=" ++ takeDirectory output
, arg "--verbosity=0"
, arg "--no-tmp-comp-dir"
, arg $ "--dump-interface=" ++ output
, arg "--html"
, arg "--hyperlinked-source"
, arg "--hoogle"
, arg $ "--title=" ++ pkgName pkg ++ "-" ++ version
++ ": " ++ synopsis
, arg $ "--prologue=" ++ path -/- "haddock-prologue.txt"
, arg $ "--optghc=-D__HADDOCK_VERSION__="
++ show (versionToInt hVersion)
, map ("--hide=" ++) <$> getPkgDataList HiddenModules
, pure [ "--read-interface=../" ++ dep
++ ",../" ++ dep ++ "/src/%{MODULE}.html#%{NAME},"
++ haddock | (dep, haddock) <- zip deps haddocks ]
, pure [ "--optghc=" ++ opt | opt <- ghcOpts ]
, getInputs
, arg "+RTS"
, arg $ "-t" ++ path -/- "haddock.t"
, arg "--machine-readable"
, arg "-RTS" ] ]
module Settings.Builders.Sphinx (sphinxBuilderArgs) where
import Settings.Builders.Common
sphinxBuilderArgs :: Args
sphinxBuilderArgs = do
outPath <- getOutput
mconcat [ builder (Sphinx Html) ? mconcat
[ arg "-b", arg "html"
, arg "-d", arg $ outPath -/- ".doctrees-html"
, arg =<< getInput
, arg outPath ]
, builder (Sphinx Latex) ? mconcat
[ arg "-b", arg "latex"
, arg "-d", arg $ outPath -/- ".doctrees-latex"
, arg =<< getInput
, arg outPath ]
, builder (Sphinx Man) ? mconcat
[ arg "-b", arg "latex"
, arg "-d", arg $ outPath -/- ".doctrees-man"
, arg =<< getInput
, arg outPath ] ]
......@@ -3,8 +3,18 @@ module Settings.Builders.Tar (tarBuilderArgs) where
import Settings.Builders.Common
tarBuilderArgs :: Args
tarBuilderArgs = builder Tar ? mconcat [ arg "-xf"
, input "*.gz" ? arg "--gzip"
, input "*.bz2" ? arg "--bzip2"
, arg =<< getInput
, arg "-C", arg =<< getOutput ]
tarBuilderArgs = do
mconcat [ builder (Tar Create) ? mconcat
[ arg "-c"
, output "//*.gz" ? arg "--gzip"
, output "//*.bz2" ? arg "--bzip2"
, output "//*.xz" ? arg "--xz"
, arg "-f", arg =<< getOutput
, getInputs ]
, builder (Tar Extract) ? mconcat
[ arg "-x"
, input "*.gz" ? arg "--gzip"
, input "*.bz2" ? arg "--bzip2"
, input "*.xz" ? arg "--xz"
, arg "-f", arg =<< getInput
, arg "-C", arg =<< getOutput ] ]
module Settings.Builders.Xelatex (xelatexBuilderArgs) where
import Settings.Builders.Common
xelatexBuilderArgs :: Args
xelatexBuilderArgs = builder Xelatex ? mconcat [ arg "-halt-on-error"
, arg =<< getInput ]
......@@ -27,7 +27,9 @@ import Settings.Builders.Hsc2Hs
import Settings.Builders.HsCpp
import Settings.Builders.Ld
import Settings.Builders.Make
import Settings.Builders.Sphinx
import Settings.Builders.Tar
import Settings.Builders.Xelatex
import Settings.Packages.Base
import Settings.Packages.Cabal
import Settings.Packages.Compiler
......@@ -148,7 +150,6 @@ defaultBuilderArgs = mconcat
, ghcBuilderArgs
, ghcCbuilderArgs
, ghcCabalBuilderArgs
, ghcCabalHsColourBuilderArgs
, ghcMBuilderArgs
, ghcPkgBuilderArgs
, haddockBuilderArgs
......@@ -157,7 +158,9 @@ defaultBuilderArgs = mconcat
, hsCppBuilderArgs
, ldBuilderArgs
, makeBuilderArgs
, tarBuilderArgs ]
, sphinxBuilderArgs
, tarBuilderArgs
, xelatexBuilderArgs ]
-- TODO: Disable warnings for Windows specifics.
-- TODO: Move this elsewhere?
......
......@@ -43,4 +43,4 @@ compilerPackageArgs = package compiler ? do
, ghcProfiled <$> flavour ?
notStage0 ? arg "--ghc-pkg-option=--force" ]
, builder Haddock ? arg ("--optghc=-I" ++ path) ]
, builder (Haddock BuildPackage) ? arg ("--optghc=-I" ++ path) ]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment