#
XMLDocWays=
-# Should we build haddock docs?
-HADDOCK_DOCS = YES
-# And HsColour the sources?
-HSCOLOUR_SRCS = YES
-
# Should we build latex docs?
LATEX_DOCS = NO
#
# Target platforms supported:
# i386, powerpc
-# sparc has bitrotted
# AIX is not supported
-ArchSupportsNCG=$(strip $(patsubst $(HostArch_CPP), YES, $(findstring $(HostArch_CPP), i386 x86_64 powerpc)))
+ArchSupportsNCG=$(strip $(patsubst $(HostArch_CPP), YES, $(findstring $(HostArch_CPP), i386 x86_64 powerpc sparc)))
OsSupportsNCG=$(strip $(patsubst $(HostOS_CPP), YES, $(patsubst aix,,$(HostOS_CPP))))
# lazy test, because $(GhcUnregisterised) might be set in build.mk later.
# 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@
BIN_DIST_DIR=$(BIN_DIST_TOPDIR_ABS)/$(BIN_DIST_NAME)
BIN_DIST_NAME=ghc-$(ProjectVersion)
-BIN_DIST_TAR=$(FPTOOLS_TOP_ABS)/$(BIN_DIST_NAME)-$(TARGETPLATFORM).tar
+BIN_DIST_TAR=$(BIN_DIST_NAME)-$(TARGETPLATFORM).tar
BIN_DIST_TAR_BZ2=$(BIN_DIST_TAR).bz2
BIN_DIST_PREP_DIR=$(FPTOOLS_TOP_ABS)/bindist-prep
BIN_DIST_PREP=$(BIN_DIST_PREP_DIR)/$(BIN_DIST_NAME)
#
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'.
#