[project @ 2001-01-31 10:12:08 by simonmar]
[ghc-hetmet.git] / mk / config.mk.in
index 4390373..2fac7c3 100644 (file)
@@ -97,29 +97,24 @@ exeext=@exeext@
 #
 ################################################################################
 
-#
-# 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?
@@ -164,6 +159,24 @@ GhcHcOpts=-O -Rghc-timing
 # 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)
 #
@@ -247,6 +260,10 @@ StripLibraries=NO
 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
 
@@ -372,10 +389,22 @@ NoFibHcOpts = -O
 # 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,