#
XMLDocWays=
-# Should we build haddock docs?
-HADDOCK_DOCS = YES
-# And HsColour the sources?
-HSCOLOUR_SRCS = YES
-
# Should we build latex docs?
LATEX_DOCS = NO
# system needs to do other special magic if you are
# doing object-file splitting
+ArchSupportsSplitObjs=$(strip $(if $(filter $(TargetArch_CPP),i386 x86_64 powerpc sparc),YES,NO))
+
# lazy test, so that $(GhcUnregisterised) can be set in build.mk
-SplitObjs=$(strip $(if $(filter $(TargetArch_CPP),i386 x86_64 powerpc sparc),\
- $(if $(filter YES,$(BootingFromHC)),\
- NO,\
- $(if $(filter NO,$(GhcUnregisterised)),\
- YES,\
- NO)),\
- NO))
+SupportsSplitObjs=$(strip $(if $(filter YES,$(ArchSupportsSplitObjs)),\
+ $(if $(filter NO,$(BootingFromHc)),\
+ $(if $(filter NO,$(GhcUnregisterised)),\
+ YES,\
+ NO),\
+ NO),\
+ NO))
+
+# By default, enable SplitObjs for the libraries if this build supports it
+SplitObjs=$(SupportsSplitObjs)
# Math library
LIBM=@LIBM@
#
GHC_ALEX_OPTS = -g
+# Should we build haddock docs?
+HADDOCK_DOCS = YES
+# And HsColour the sources?
+ifeq "$(HSCOLOUR)" ""
+HSCOLOUR_SRCS = NO
+else
+HSCOLOUR_SRCS = YES
+endif
+
#
# Options for compiling in different `ways'.
#