GhcThreaded was bogusly off by default due to things being in the wrong order
[ghc-hetmet.git] / mk / config.mk.in
index 32239d9..a670cd5 100644 (file)
@@ -163,6 +163,7 @@ LeadingUnderscore=@LeadingUnderscore@
 
 # Pin a suffix on executables? If so, what (Windows only).
 exeext=@exeext@
+soext=@soext@
 
 # Windows=YES if on a Windows platform
 ifneq "$(findstring $(HostOS_CPP), mingw32 cygwin32)" ""
@@ -171,12 +172,6 @@ else
 Windows=NO
 endif
 
-ifeq "$(Windows)" "YES"
-dot_bat=.bat
-else
-dot_bat=
-endif
-
 # BootingFromHc - build GHC and the libraries from .hc files?
 BootingFromHc = @BootingFromHc@
 
@@ -223,6 +218,9 @@ GhcStage1HcOpts=
 GhcStage2HcOpts=
 GhcStage3HcOpts=
 
+GhcProfiled=NO
+GhcDebugged=NO
+
 # 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,
@@ -318,6 +316,8 @@ BuildingGranSim=$(subst mg,YES,$(filter mg,$(WAYS)))
 
 HscIfaceFileVersion=6
 
+MakefileDeps=YES
+
 #------------------------------------------------------------------------------
 # Options for Libraries
 
@@ -356,6 +356,13 @@ endif
 # be set in build.mk, which hasn't been read yet.
 GhcRTSWays += $(if $(findstring NO, $(GhcUnregisterised)),thr thr_p thr_debug,)
 
+# We can only build GHCi threaded if we have a threaded RTS:
+ifneq "$(findstring thr, $(GhcRTSWays))" ""
+GhcThreaded=YES
+else
+GhcThreaded=NO
+endif
+
 # Option flags to pass to GHC when it's compiling modules in
 # fptools/libraries.  Typically these are things like -O or
 # -dcore-lint or -H32m.  The ones that are *essential* are wired into
@@ -499,9 +506,13 @@ FPTOOLS_TOP_ABS            = @hardtop@
 # The platform specific version of 'hardtop'.
 FPTOOLS_TOP_ABS_PLATFORM = @hardtop_plat@
 
+# This gets used in the default docdir
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+
 BIN_DIST_NAME=ghc-$(ProjectVersion)
 BIN_DIST_TOPDIR=$(FPTOOLS_TOP_ABS)
 BIN_DIST_DIR=$(BIN_DIST_TOPDIR)/$(BIN_DIST_NAME)
+BIN_DIST_TARBALL=$(BIN_DIST_TOPDIR)/$(BIN_DIST_NAME)-$(TARGETPLATFORM).tar.bz2
 
 #
 # Installation directories, we don't use half of these,
@@ -540,6 +551,23 @@ datadir    = $(datadir0)/ghc-$(ProjectVersion)
 
 endif # Windows
 
+headerdir = $(libdir)/include
+
+# New autoconf (>= 2.60?) make a configure with --docdir=DIR etc flags.
+# However, in order to support older autoconf's we don't use them.
+
+#docdir    = @docdir@
+#htmldir   = @htmldir@
+#dvidir    = @dvidir@
+#pdfdir    = @pdfdir@
+#psdir     = @psdir@
+
+docdir    = $(datarootdir)/doc/ghc
+htmldir   = $(docdir)
+dvidir    = $(docdir)
+pdfdir    = $(docdir)
+psdir     = $(docdir)
+
 # Default place for putting interface files is $(libdir)
 # (overriden for packages in package.mk)
 ifacedir               = $(libdir)
@@ -602,6 +630,7 @@ INSTALL_PROGRAM = $(INSTALL) -m 755
 INSTALL_SCRIPT  = $(INSTALL) -m 755
 INSTALL_SHLIB   = $(INSTALL) -m 755
 INSTALL_DATA    = $(INSTALL) -m 644
+INSTALL_HEADER  = $(INSTALL) -m 644
 INSTALL_MAN     = $(INSTALL) -m 644
 INSTALL_DIR     = $(MKDIRHIER)
 
@@ -743,7 +772,7 @@ GHC_TOUCHY_PGM              = touchy$(exeext)
 GHC_MANGLER_PGM                = ghc-asm
 GHC_SPLIT_PGM          = ghc-split
 GHC_SYSMAN_PGM                 = SysMan
-GHC_PKG_INPLACE_PGM    = ghc-pkg-inplace$(dot_bat)
+GHC_PKG_INPLACE_PGM    = ghc-pkg-inplace
 GHC_GENPRIMOP_PGM      = genprimopcode
 GHC_GENAPPLY_PGM       = genapply
 GHC_MKDEPENDC_PGM      = mkdependC
@@ -1172,6 +1201,23 @@ WAY_thr_debug_HC_OPTS=-optc-DTHREADED_RTS -optc-DDEBUG
 WAY_thr_debug_p_NAME=threaded
 WAY_thr_debug_p_HC_OPTS=-optc-DTHREADED_RTS -optc-DDEBUG -prof
 
+# Way 'dyn': build dynamic shared libraries
+WAY_dyn_NAME=dyn
+WAY_dyn_HC_OPTS=-fPIC -dynamic
+WAY_dyn_LIB_TARGET=libHSrts-gcc661.so
+
+# Way 'thr_dyn':
+WAY_thr_dyn_NAME=thr_dyn
+WAY_thr_dyn_HC_OPTS=-fPIC -dynamic -optc-DTHREADED_RTS
+
+# Way 'thr_debug_dyn':
+WAY_thr_debug_dyn_NAME=thr_dyn
+WAY_thr_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DTHREADED_RTS -optc-DDEBUG
+
+# Way 'debug_dyn':
+WAY_debug_dyn_NAME=thr_dyn
+WAY_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DDEBUG
+
 #
 # Add user-way configurations here:
 #