Early error when crosscompiling + haddock/docs
authorThomas Miedema <thomasmiedema@gmail.com>
Tue, 9 Feb 2016 10:06:13 +0000 (11:06 +0100)
committerBen Gamari <ben@smart-cactus.org>
Tue, 9 Feb 2016 10:06:24 +0000 (11:06 +0100)
commit04fb7813ab489b1d70a73351836950825b2ce4f7
treeb2dc315e19d7f1091302b85f8dc991a851978fd4
parent4ec61411930495fc109be27993c176fd7aaf486d
Early error when crosscompiling + haddock/docs

When CrossCompiling=YES or Stage1Only=YES, building the haddocks and the
User's Guide should be skipped, because haddock and mkUserGuidePart
depend on the GHC API.
See Note [No stage2 packages when CrossCompiling or Stage1Only] for
details.

There are several places in the build system where the variables
HADDOCK_DOCS and BUILD_SPHINX_* are checked. Instead of also checking
for the variables CrossCompiling or Stage1Only in all those places,
`make` will now exit with a nice error message when the user requests
the impossible.

Reviewers: rwbarton, austin, bgamari

Reviewed By: bgamari

Differential Revision: https://phabricator.haskell.org/D1882
15 files changed:
ghc.mk
mk/flavours/bench-cross.mk
mk/flavours/bench-llvm.mk
mk/flavours/bench.mk
mk/flavours/devel1.mk
mk/flavours/devel2.mk
mk/flavours/perf-cross.mk
mk/flavours/perf-llvm.mk
mk/flavours/perf.mk
mk/flavours/prof.mk
mk/flavours/quick-cross.mk
mk/flavours/quick-llvm.mk
mk/flavours/quick.mk
mk/flavours/quickest.mk
mk/flavours/validate.mk