Opened 5 months ago

Last modified 5 months ago

#8558 new feature request

Build xhtml and haddock only when `HADDOCK_DOCS=YES`

Reported by: nomeata Owned by:
Priority: normal Milestone:
Component: Build System Version: 7.6.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

In order to save contributor’s time, and in order to run the test suite faster, I suggest to not builds haddock and its dependencies (xhtml, anything else?) if HADDOCK_DOCS=YES is specified.

The change is rather simple:

diff --git a/ghc.mk b/ghc.mk
index dd91a82..b0f93a0 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -437,7 +437,9 @@ REGULAR_INSTALL_PACKAGES += compiler
 endif
 REGULAR_INSTALL_PACKAGES += $(addprefix libraries/,$(PACKAGES_STAGE2))
 
+ifeq "$(HADDOCK_DOCS)" "YES"
 PACKAGES_STAGE1 += xhtml
+endif
 ifeq "$(Windows_Target)" "NO"
 ifneq "$(TargetOS_CPP)" "ios"
 PACKAGES_STAGE1 += terminfo
@@ -652,8 +654,10 @@ BUILD_DIRS += libraries/integer-gmp/gmp
 BUILD_DIRS += libraries/integer-gmp/mkGmpDerivedConstants
 endif
 
+ifeq "$(HADDOCK_DOCS)" "YES"
 BUILD_DIRS += utils/haddock
 BUILD_DIRS += utils/haddock/doc
+endif
 BUILD_DIRS += compiler
 BUILD_DIRS += utils/hsc2hs
 BUILD_DIRS += utils/ghc-pkg

and it does not affect validate runs, as validate has HADDOCK_DOCS set to YES.

If this is introduced, I suggest to annotate these two with a tag in packages, so that one can run ./sync-all get --no-haddock, similar to --no-dph.

Change History (1)

comment:1 Changed 5 months ago by hvr

I suggest to not builds haddock and its dependencies (xhtml, anything else?) if HADDOCK_DOCS=YES is specified.

There's a negation-typo in there, right?

Your proposal looks good to me.

However, wrt to the package-tag suggestion: I think the tag column in packages makes the build-system a bit more complicated just to save cloning/syncing a few small repositories; and as a side-effect of #8545 I was planing to get rid of the package-tags altogether.

Note: See TracTickets for help on using tickets.