[project @ 2000-04-14 15:55:00 by rrt]
[ghc-hetmet.git] / mk / config.mk.in
index 8f00761..c52eeda 100644 (file)
@@ -190,9 +190,13 @@ GhcWithNativeCodeGen=$(shell if (test x$(findstring $(HostArch_CPP),i386 alpha s
 BuildingParallel=$(subst mp,YES,$(filter mp,$(WAYS)))
 BuildingGranSim=$(subst mg,YES,$(filter mg,$(WAYS)))
 
-#---------------------------------------------------------------
+# Include compiler support for letting the compiler (optionally) report
+# your compilation to a central server for generation of fun stats.
 #
-# Variables that control how the prelude libraries and runtime system are built
+GhcReportCompiles=NO
+
+#------------------------------------------------------------------------------
+# Options for GHC's Prelude
 
 # What extra ways to build the libraries in
 # In addition to the normal sequential way, the default is to also build
@@ -211,20 +215,54 @@ endif
 #      -O is pretty desirable, otherwise no inlining of prelude
 #              things (incl "+") happens when compiling with this compiler
 
-ifeq "$(GhcWithHscBuiltViaC)" "YES"
 GhcLibHcOpts=-O
-else
-GhcLibHcOpts=-O -split-objs -odir $*
+
+
+# Win32 only: Enable the RTS and libraries to be built as DLLs
+# Don't split object files for libs if we're building DLLs
+EnableWin32DLLs=@EnableWin32DLLs@
+ifeq "($EnableWin32DLLs)" "YES"
+SplitObjs=NO
 endif
 
-# Option flags to pass to GHC when it's compiling RTS modules
+
+# Strip local symbols from libraries?  This can make the libraries smaller,
+# but makes debugging somewhat more difficult.  Doesn't work with all ld's.
+#
+StripLibraries=NO
+
+# ----------------------------------------------------------------------------
+# Options for GHC's RTS
+
 # This is a good way to set things like -optc-g and -optc-DDEBUG for the RTS.
-# GhcRtsHcOpts is used when compiling .hc files.
-# GhcRtsCcOpts is used when compiling .c  files.
+# GhcRtsHcOpts is used when compiling .hc files and .c files.
+# GhcRtsCcOpts is used when compiling .c  files only.
+
+# For a debugging RTS:
+# GhcRtsHcOpts = -optc-DDEBUG
+# GhcRtsCcOpts = -optc-g
 
+# For an optimised RTS:
 GhcRtsHcOpts=-O2
 GhcRtsCcOpts=-O2 -optc-fomit-frame-pointer
 
+################################################################################
+#
+#              hslibs project
+#
+################################################################################
+
+# Build HsLibs for which compiler?  
+
+# If $(HsLibsFor) == hugs or ghc, we assume we're building for the
+# compiler/interpreter in the same source tree.
+
+# HsLibsFor = ghc | hugs | nhc | hbc
+HsLibsFor      = ghc
+
+# hslibs for GHC also uses the following variables (defined above):
+#   GhcLibWays, GhcLibHcOpts, EnableWin32DLLs, StripLibraries
+
 # Build the Haskell Readline bindings?
 #
 GhcLibsWithReadline=NO
@@ -235,20 +273,6 @@ GhcLibsWithReadline=NO
 ReadlineIncludePath=
 HaveLibReadline=@HaveLibReadline@
 
-# Strip local symbols from libraries?  This can make the libraries smaller,
-# but makes debugging somewhat more difficult.  Doesn't work with all ld's.
-#
-StripLibraries=NO
-
-# Include compiler support for letting the compiler (optionally) report
-# your compilation to a central server for generation of fun stats.
-#
-GhcReportCompiles=NO
-
-# Win32 only: Enable the RTS and libraries to be built as DLLs
-#
-EnableWin32DLLs=@EnableWin32DLLs@
-
 ################################################################################
 #
 #              happy project
@@ -289,6 +313,7 @@ HappyHcOpts = -O
 #
 ################################################################################
 
+WithNofibHc = $(GHC_INPLACE)
 
 # NoFibSubDirs controls which set of tests should be run
 # You can run one or more of
@@ -323,6 +348,11 @@ NoFibHcOpts = -O
 #
 ################################################################################
 
+# Directory used by GHC (and possibly other tools) for storing
+# temporary files.  If your /tmp isn't big enough, either override
+# this in build.mk or set your environment variable "TMPDIR" to point
+# to somewhere with more space.  (TMPDIR=. is a good choice).
+
 TMPDIR                 = /tmp
 
 # FPTOOLS_TOP: the top of the fptools hierarchy, absolute path.
@@ -455,8 +485,6 @@ TEXI2HTML_PREFIX        = $(LITERATE_PREFIX)texi2html/
 HAPPY_PREFIX           = $(FPTOOLS_TOP)/happy/src/
 GREENCARD_PREFIX       = $(FPTOOLS_TOP)/green-card/src/
 
-RTS_PREFIX             = $(FPTOOLS_TOP)/common-rts/
-
 UNLIT_PREFIX           = $(FPTOOLS_TOP)/ghc/utils/unlit/
 UGEN_PREFIX             = $(FPTOOLS_TOP)/ghc/utils/ugen/
 STAT2RESID_PREFIX       = $(FPTOOLS_TOP)/ghc/utils/stat2resid/
@@ -466,12 +494,27 @@ HSTAGS_PREFIX           = $(FPTOOLS_TOP)/ghc/utils/hstags/
 
 
 #-----------------------------------------------------------------------------
-# Haskell compiler and mkdependHS
+# Haskell compilers and mkdependHS
+
+# $(GHC), $(HBC) and $(NHC) point to installed versions of the relevant
+# compilers, if available.
+#
+# $(HC) is a generic Haskell 98 compiler, set to $(GHC) by default.
+# $(MKDEPENDHS) is the Haskell dependency generator (ghc -M).
+
+GHC            = @GHC@
+HBC            = @HBC@
+NHC            = @NHC@
 
-# ToDo: $(HC) should be a local installation of some Haskell compiler
-HC             = $(FPTOOLS_TOP)/ghc/driver/ghc-inplace
+HC             = @WithHc@
 MKDEPENDHS     = $(HC)
 
+# Sometimes we want to invoke ghc from the build tree in different
+# projects (eg. it's handy to have a nofib & a ghc build in the same
+# tree).  We can refer to "this ghc" as $(GHC_INPLACE):
+
+GHC_INPLACE    = $(FPTOOLS_TOP)/ghc/driver/ghc-inplace
+
 #-----------------------------------------------------------------------------
 # C compiler
 #
@@ -518,6 +561,7 @@ CP                  = cp
 CPP                    = @CPP@
 CTAGS                  = $(ETAGS)
 RAWCPP                  = $(CPP) -undef -traditional
+FIND                   = @FindCmd@
 INSTALL                        = @INSTALL@
 #
 # Sigh - the autoconf macro for INSTALL will subst a relative path to the fallback
@@ -590,10 +634,17 @@ YACC                      = @YaccCmd@
 #-----------------------------------------------------------------------------
 # SGML stuff (currently not configured - we assume you have it)
 
-SGML2LATEX             = sgml2latex
-SGML2HTML              = sgml2html
-SGML2INFO              = sgml2info
-SGML2TXT               = sgml2txt
+SGML2DVI               = db2dvi
+SGML2HTML              = db2html
+SGML2INFO              = db2info
+SGML2RTF               = db2rtf
+
+SGMLSTYLESHEET          = $(FPTOOLS_TOP_ABS)/docs/fptools-both.dsl
+
+SRC_SGML2DVI_OPTS       = -d $(SGMLSTYLESHEET)
+SRC_SGML2HTML_OPTS      = -d $(SGMLSTYLESHEET)
+SRC_SGML2INFO_OPTS      = -d $(SGMLSTYLESHEET)
+SRC_SGML2RTF_OPTS       = -d $(SGMLSTYLESHEET)
 
 #-----------------------------------------------------------------------------
 #              FPtools support software
@@ -607,7 +658,6 @@ MSUB                        = $(MSUB_PREFIX)msub
 ETAGS                  = $(ETAGS_PREFIX)etags
 VERBATIM               = $(VERBATIM_PREFIX)verbatim
 SGMLVERB               = $(SGMLVERB_PREFIX)sgmlverb
-SGML2LATEX             = sgml2latex
 RUNTEST                        = $(RUNTEST_PREFIX)runstdtest
 HAPPY                  = @HappyCmd@
 HAPPY_VERSION          = @HappyVersion@                
@@ -678,6 +728,7 @@ HSTAGS                      = $(HSTAGS_PREFIX)hstags
 # The ways currently defined.
 #
 ALL_WAYS=p t u s mp mg a b c d e f g h i j k l m n o A B
+USER_WAYS=a b c d e f g h i j k l m n o A B
 
 #
 # The following ways currently have treated specially, p u t mg,