#
################################################################################
-#
-# What parts to build: An fptools build tree does not have to be built
-# all in one go. By setting the list of ProjectsToBuild in build.mk you can
-# control which projects are built.
-#
-# Caution: the projects are built in the order given here, so if some
-# projects use others you must list them in the correct order.
-#
-# Generally: * glafp-utils should be first
-# * happy next
-# * ghc next
-# then it's up to you
-
+# build the libs first if we're bootstrapping from .hc files
ifeq "$(GhcWithHscBuiltViaC)" "YES"
-# need hslibs/lang first if we're bootstrapping
-ProjectsToBuild = glafp-utils hslibs ghc
+AllProjects = glafp-utils hslibs ghc green-card happy hdirect hood nofib
else
-ProjectsToBuild = glafp-utils ghc hslibs
+AllProjects = glafp-utils ghc hslibs green-card happy hdirect hood nofib
endif
+
#
-# Make a distinction between building and installing
+# (OPTIONAL) set ProjectsToBuild to a list of projects to be built. If this
+# list is empty, then all projects present in the source tree will be built.
#
-ProjectsToInstall = glafp-utils ghc hslibs
+ProjectsToBuild =
+
+#
+# set ProjectsDontInstall to a list of projects which are normally built but
+# not installed.
+#
+ProjectsDontInstall = glafp-utils nofib
#
# Should the various project tests directories be built?
# GhcWithHscBuiltViaC - build GHC compiler proper (\`hsc') from .hc files?
GhcWithHscBuiltViaC=@BootingFromHc@
+# Build a compiler that will build *unregisterised* libraries and
+# binaries by default. Unregisterised code is supposed to compile and
+# run without any support for architecture-specific assembly mangling,
+# register assignment or tail-calls, and is therefore a good way to get
+# started when porting GHC to new architectures.
+#
+# If this is set to NO, you can still use the unregisterised way
+# (way 'u') to get unregisterised code, but the default way will be
+# registerised.
+#
+# NOTE: this is not the same as building the compiler itself
+# unregisterised. That's done by either (a) bootstrapping with a
+# compiler that was built with GhcUnregisterized=YES, or (b)
+# bootstrapping with a compiler that has way 'u' libraries, and the
+# flag '-unreg' is added to GhcHcOpts above.
+#
+GhcUnregisterised=NO
+
# Build a compiler with a native code generator backend
# (as well as a C backend)
#
GhcWithNativeCodeGen=NO
endif
-# Include GHCi in the compiler
-ifneq "$(findstring $(HostOS_CPP), linux solaris freebsd netbsd openbsd)" ""
-GhcWithInterpreter=YES
-else
+# Include GHCi in the compiler. Default to NO for the time being.
+
+# ifneq "$(findstring $(HostOS_CPP), linux solaris freebsd netbsd openbsd)" ""
+# GhcWithInterpreter=YES
+# else
GhcWithInterpreter=NO
-endif
+# endif
#
# Building various ways?
GhcRtsHcOpts=-O2
GhcRtsCcOpts=-O2 -optc-fomit-frame-pointer
+# If you intend to bootstrap GHCi using this compiler...
+# GhcRtsHcOpts += -optc-DGHCI
+# GhcRtsCcOpts += -DGHCI
+
# Include the front panel code? Needs GTK+.
GhcRtsWithFrontPanel = NO
# setting the TMPDIR env var would have no effect in the build tree.
DEFAULT_TMPDIR = /tmp
+ifeq "$(TARGETPLATFORM)" "i386-unknown-cygwin32"
+DEFAULT_TMPDIR = C:/TEMP
+endif
+ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
+DEFAULT_TMPDIR = C:/TEMP
+endif
# FPTOOLS_TOP: the top of the fptools hierarchy, absolute path.
FPTOOLS_TOP_ABS = @hardtop@
+ifeq "$(TARGETPLATFORM)" "i386-unknown-cygwin32"
+FPTOOLS_TOP_ABS = $(patsubst /cygdrive/%/,%:/,@hardtop@)
+endif
+ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
+FPTOOLS_TOP_ABS = $(patsubst /cygdrive/%/,%:/,@hardtop@)
+endif
#
# Installation directories, we don't use half of these,
GREENCARD_PREFIX = $(FPTOOLS_TOP)/green-card/src/
UNLIT_PREFIX = $(FPTOOLS_TOP)/ghc/utils/unlit/
-STAT2RESID_PREFIX = $(FPTOOLS_TOP)/ghc/utils/stat2resid/
HP2PS_PREFIX = $(FPTOOLS_TOP)/ghc/utils/hp2ps/
HSTAGS_PREFIX = $(FPTOOLS_TOP)/ghc/utils/hstags/
-
+HSC2HS_PREFIX = $(FPTOOLS_TOP)/ghc/utils/hsc2hs/
#-----------------------------------------------------------------------------
# Haskell compilers and mkdependHS
# Stuff from fptools/ghc/utils
#
UNLIT = $(UNLIT_PREFIX)unlit$(EXE_SUFFIX)
-STAT2RESID = $(STAT2RESID_PREFIX)stat2resid
HP2PS = $(HP2PS_PREFIX)hp2ps$(EXE_SUFFIX)
-HSCPP = $(HSCPP_PREFIX)hscpp
HSTAGS = $(HSTAGS_PREFIX)hstags
+HSC2HS = $(HSC2HS_PREFIX)hsc2hs-inplace
#
# Options for the compiling different `ways'. Various projects within