[commit: ghc] master: Early error when crosscompiling + haddock/docs (04fb781)

git at git.haskell.org git at git.haskell.org
Tue Feb 9 14:41:12 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/04fb7813ab489b1d70a73351836950825b2ce4f7/ghc

>---------------------------------------------------------------

commit 04fb7813ab489b1d70a73351836950825b2ce4f7
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Tue Feb 9 11:06:13 2016 +0100

    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


>---------------------------------------------------------------

04fb7813ab489b1d70a73351836950825b2ce4f7
 ghc.mk                     | 23 +++++++++++++++++++----
 mk/flavours/bench-cross.mk |  1 -
 mk/flavours/bench-llvm.mk  |  1 -
 mk/flavours/bench.mk       |  1 -
 mk/flavours/devel1.mk      |  1 -
 mk/flavours/devel2.mk      |  1 -
 mk/flavours/perf-cross.mk  |  1 -
 mk/flavours/perf-llvm.mk   |  1 -
 mk/flavours/perf.mk        |  1 -
 mk/flavours/prof.mk        |  1 -
 mk/flavours/quick-cross.mk |  1 -
 mk/flavours/quick-llvm.mk  |  1 -
 mk/flavours/quick.mk       |  1 -
 mk/flavours/quickest.mk    |  1 -
 mk/flavours/validate.mk    |  1 -
 15 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/ghc.mk b/ghc.mk
index 8257cf0..8f4aaba 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -195,6 +195,24 @@ $(error HSCOLOUR_SRCS=YES, but HSCOLOUR_CMD is empty. \
 endif
 endif
 
+ifeq "$(HADDOCK_DOCS)" "YES"
+ifneq "$(CrossCompiling) $(Stage1Only)" "NO NO"
+$(error Can not build haddock docs when CrossCompiling or Stage1Only. \
+  Set HADDOCK_DOCS=NO in your mk/build.mk file. \
+  See Note [No stage2 packages when CrossCompiling or Stage1Only])
+endif
+endif
+
+ifneq "$(BUILD_SPHINX_HTML) $(BUILD_SPHINX_PDF)" "NO NO"
+# The User's Guide requires mkUserGuidePart, which uses the GHC API.
+ifneq "$(CrossCompiling) $(Stage1Only)" "NO NO"
+$(error Can not build User's Guide when CrossCompiling or Stage1Only. \
+  Set BUILD_SPHINX_HTML=NO, BUILD_SPHINX_PDF=NO in your \
+  mk/build.mk file. \
+  See Note [No stage2 packages when CrossCompiling or Stage1Only])
+endif
+endif
+
 endif # CLEANING
 
 # -----------------------------------------------------------------------------
@@ -691,7 +709,7 @@ ifeq "$(HADDOCK_DOCS)" "NO"
 BUILD_DIRS := $(filter-out utils/haddock,$(BUILD_DIRS))
 BUILD_DIRS := $(filter-out utils/haddock/doc,$(BUILD_DIRS))
 endif
-ifeq "$(BUILD_SPHINX_HTML) $(BUILD_SPHINX_PDF)" "NO NO NO"
+ifeq "$(BUILD_SPHINX_HTML) $(BUILD_SPHINX_PDF)" "NO NO"
 # Don't to build this little utility if we're not building the User's Guide.
 BUILD_DIRS := $(filter-out utils/mkUserGuidePart,$(BUILD_DIRS))
 endif
@@ -711,11 +729,8 @@ endif
 ifneq "$(CrossCompiling) $(Stage1Only)" "NO NO"
 # See Note [No stage2 packages when CrossCompiling or Stage1Only].
 # See Note [Stage1Only vs stage=1] in mk/config.mk.in.
-BUILD_DIRS := $(filter-out utils/haddock,$(BUILD_DIRS))
-BUILD_DIRS := $(filter-out utils/haddock/doc,$(BUILD_DIRS))
 BUILD_DIRS := $(filter-out utils/ghctags,$(BUILD_DIRS))
 BUILD_DIRS := $(filter-out utils/check-api-annotations,$(BUILD_DIRS))
-BUILD_DIRS := $(filter-out utils/mkUserGuidePart,$(BUILD_DIRS))
 endif
 endif # CLEANING
 
diff --git a/mk/flavours/bench-cross.mk b/mk/flavours/bench-cross.mk
index 69447a2..15b359e 100644
--- a/mk/flavours/bench-cross.mk
+++ b/mk/flavours/bench-cross.mk
@@ -6,7 +6,6 @@ BUILD_PROF_LIBS    = NO
 SplitObjs          = NO
 HADDOCK_DOCS       = NO
 BUILD_SPHINX_HTML  = NO
-BUILD_SPHINX_PS    = NO
 BUILD_SPHINX_PDF   = NO
 BUILD_MAN          = NO
 
diff --git a/mk/flavours/bench-llvm.mk b/mk/flavours/bench-llvm.mk
index e07c1f3..2da8ddb 100644
--- a/mk/flavours/bench-llvm.mk
+++ b/mk/flavours/bench-llvm.mk
@@ -6,6 +6,5 @@ BUILD_PROF_LIBS    = NO
 SplitObjs          = NO
 HADDOCK_DOCS       = NO
 BUILD_SPHINX_HTML  = NO
-BUILD_SPHINX_PS    = NO
 BUILD_SPHINX_PDF   = NO
 BUILD_MAN          = NO
diff --git a/mk/flavours/bench.mk b/mk/flavours/bench.mk
index 1368c47..ad77219 100644
--- a/mk/flavours/bench.mk
+++ b/mk/flavours/bench.mk
@@ -6,6 +6,5 @@ BUILD_PROF_LIBS    = NO
 SplitObjs          = NO
 HADDOCK_DOCS       = NO
 BUILD_SPHINX_HTML  = NO
-BUILD_SPHINX_PS    = NO
 BUILD_SPHINX_PDF   = NO
 BUILD_MAN          = NO
diff --git a/mk/flavours/devel1.mk b/mk/flavours/devel1.mk
index 8489c0f..ea730c9 100644
--- a/mk/flavours/devel1.mk
+++ b/mk/flavours/devel1.mk
@@ -6,7 +6,6 @@ BUILD_PROF_LIBS    = NO
 SplitObjs          = NO
 HADDOCK_DOCS       = NO
 BUILD_SPHINX_HTML  = NO
-BUILD_SPHINX_PS    = NO
 BUILD_SPHINX_PDF   = NO
 BUILD_MAN          = NO
 
diff --git a/mk/flavours/devel2.mk b/mk/flavours/devel2.mk
index 1f073ed..c86624a 100644
--- a/mk/flavours/devel2.mk
+++ b/mk/flavours/devel2.mk
@@ -6,7 +6,6 @@ BUILD_PROF_LIBS    = NO
 SplitObjs          = NO
 HADDOCK_DOCS       = NO
 BUILD_SPHINX_HTML  = NO
-BUILD_SPHINX_PS    = NO
 BUILD_SPHINX_PDF   = NO
 BUILD_MAN          = NO
 
diff --git a/mk/flavours/perf-cross.mk b/mk/flavours/perf-cross.mk
index 9540f8c..669b51a 100644
--- a/mk/flavours/perf-cross.mk
+++ b/mk/flavours/perf-cross.mk
@@ -6,7 +6,6 @@ BUILD_PROF_LIBS    = YES
 #SplitObjs
 HADDOCK_DOCS       = NO
 BUILD_SPHINX_HTML  = NO
-BUILD_SPHINX_PS    = NO
 BUILD_SPHINX_PDF   = NO
 BUILD_MAN          = NO
 
diff --git a/mk/flavours/perf-llvm.mk b/mk/flavours/perf-llvm.mk
index 4a93d6b..cd3d4f4 100644
--- a/mk/flavours/perf-llvm.mk
+++ b/mk/flavours/perf-llvm.mk
@@ -6,5 +6,4 @@ BUILD_PROF_LIBS    = YES
 #SplitObjs
 #HADDOCK_DOCS
 #BUILD_SPHINX_HTML
-#BUILD_SPHINX_PS
 #BUILD_SPHINX_PDF
diff --git a/mk/flavours/perf.mk b/mk/flavours/perf.mk
index c94b860..06fcc24 100644
--- a/mk/flavours/perf.mk
+++ b/mk/flavours/perf.mk
@@ -6,5 +6,4 @@ BUILD_PROF_LIBS    = YES
 #SplitObjs
 #HADDOCK_DOCS
 #BUILD_SPHINX_HTML
-#BUILD_SPHINX_PS
 #BUILD_SPHINX_PDF
diff --git a/mk/flavours/prof.mk b/mk/flavours/prof.mk
index 684ffb0..67f89e6 100644
--- a/mk/flavours/prof.mk
+++ b/mk/flavours/prof.mk
@@ -6,7 +6,6 @@ BUILD_PROF_LIBS    = YES
 SplitObjs          = NO
 HADDOCK_DOCS       = NO
 BUILD_SPHINX_HTML  = NO
-BUILD_SPHINX_PS    = NO
 BUILD_SPHINX_PDF   = NO
 BUILD_MAN          = NO
 
diff --git a/mk/flavours/quick-cross.mk b/mk/flavours/quick-cross.mk
index b10dbc5..92347ca 100644
--- a/mk/flavours/quick-cross.mk
+++ b/mk/flavours/quick-cross.mk
@@ -6,7 +6,6 @@ BUILD_PROF_LIBS    = NO
 SplitObjs          = NO
 HADDOCK_DOCS       = NO
 BUILD_SPHINX_HTML  = NO
-BUILD_SPHINX_PS    = NO
 BUILD_SPHINX_PDF   = NO
 BUILD_MAN          = NO
 
diff --git a/mk/flavours/quick-llvm.mk b/mk/flavours/quick-llvm.mk
index 84a8034..0a63f5f 100644
--- a/mk/flavours/quick-llvm.mk
+++ b/mk/flavours/quick-llvm.mk
@@ -6,6 +6,5 @@ BUILD_PROF_LIBS    = NO
 SplitObjs          = NO
 HADDOCK_DOCS       = NO
 BUILD_SPHINX_HTML  = NO
-BUILD_SPHINX_PS    = NO
 BUILD_SPHINX_PDF   = NO
 BUILD_MAN          = NO
diff --git a/mk/flavours/quick.mk b/mk/flavours/quick.mk
index 0e045ae..9f1e2e2 100644
--- a/mk/flavours/quick.mk
+++ b/mk/flavours/quick.mk
@@ -6,6 +6,5 @@ BUILD_PROF_LIBS    = NO
 SplitObjs          = NO
 HADDOCK_DOCS       = NO
 BUILD_SPHINX_HTML  = NO
-BUILD_SPHINX_PS    = NO
 BUILD_SPHINX_PDF   = NO
 BUILD_MAN          = NO
diff --git a/mk/flavours/quickest.mk b/mk/flavours/quickest.mk
index ba95632..69c0385 100644
--- a/mk/flavours/quickest.mk
+++ b/mk/flavours/quickest.mk
@@ -6,6 +6,5 @@ BUILD_PROF_LIBS    = NO
 SplitObjs          = NO
 HADDOCK_DOCS       = NO
 BUILD_SPHINX_HTML  = NO
-BUILD_SPHINX_PS    = NO
 BUILD_SPHINX_PDF   = NO
 BUILD_MAN          = NO
diff --git a/mk/flavours/validate.mk b/mk/flavours/validate.mk
index cb38bd5..1d18641 100644
--- a/mk/flavours/validate.mk
+++ b/mk/flavours/validate.mk
@@ -7,7 +7,6 @@ BUILD_PROF_LIBS    = NO
 SplitObjs          = NO
 HADDOCK_DOCS       = YES
 BUILD_SPHINX_HTML  = YES
-BUILD_SPHINX_PS    = NO
 BUILD_SPHINX_PDF   = NO
 
 ifeq "$(ValidateHpc)" "YES"



More information about the ghc-commits mailing list