Commit 78d34718 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Remove oldconfig.mk.in

parent 36091517
......@@ -33,7 +33,6 @@
# * remove old Makefiles, add new stubs for building in subdirs
# * utils/hsc2hs/Makefile
# * utils/haddock/Makefile
# * mk/oldconfig.mk.in
# * docs/Makefile
# * docs/docbook-cheat-sheet/Makefile
# * docs/ext-core/Makefile
......
# -*-makefile-*-
# @configure_input@
#
################################################################################
#
# config.mk.in
#
# This file supplies defaults for many tweakable build configuration
# options. Some of the defaults are filled in by the autoconf-generated
# configure script.
#
# DO NOT EDIT THIS FILE!
#
# - config.mk is auto-generated from config.mk.in by configure.
# This may be triggered automatically by the build system (say
# if config.mk.in has changed more recently than config.mk),
# so if you edit config.mk your changes will be spammed.
#
# - Settings in this file may be overriden by giving replacement
# definitions in build.mk. See build.mk.sample for a good
# starting point for a build.mk file.
#
# If you don't have a build.mk file then you get defaults for everything.
# The defaults should provide a reasonable vanilla build.
#
# This is one of only two files that configure generates (the other is config.h)
#
ifneq "$(findstring 3.7, $(MAKE_VERSION))" ""
ifeq "$(findstring 3.79.1, $(MAKE_VERSION))" ""
$(error GNU make version 3.79.1 or later is required.)
endif
endif
################################################################################
#
# GHC Version
#
# ProjectVersion is treated as a *string*
# ProjectVersionInt is treated as an *integer* (for cpp defines)
# Versioning scheme: A.B.C
# A: major version, decimal, any number of digits
# B: minor version, decimal, any number of digits
# C: patchlevel, one digit, omitted if zero.
#
# ProjectVersionInt does *not* contain the patchlevel (rationale: this
# figure is used for conditional compilations, and library interfaces
# etc. are not supposed to change between patchlevels).
#
# The ProjectVersionInt is included in interface files, and GHC
# checks that it's reading interface generated by the same ProjectVersion
# as itself. It does this even though interface file syntax may not
# change between versions. Rationale: calling conventions or other
# random .o-file stuff might change even if the .hi syntax doesn't
ProjectName = @ProjectName@
ProjectTags =
ProjectVersion = @ProjectVersion@$(ProjectTags)
ProjectVersionInt = @ProjectVersionInt@
ProjectPatchLevel = @ProjectPatchLevel@
################################################################################
#
# Platform variables
#
################################################################################
# A "platform" is the GNU cpu-type/manufacturer/operating-system target machine
# specifier. E.g. sparc-sun-solaris2
#
# Build platform: the platform on which we are doing this build
# Host platform: the platform on which these binaries will run
# Target platform: the platform for which this compiler will generate code
#
# We don't support build & host being different, because the build
# process creates binaries that are run during the build, and also
# installed.
#
# If host & target are different, then we are building a compiler
# which will generate intermediate .hc files to port to the target
# architecture for bootstrapping. The libraries and stage 2 compiler
# will be built as HC files for the target system, and likely won't
# build on this host platform.
#
# An important invariant is that for any piece of source code, the
# platform on which the code is going to run is the HOST platform,
# and the platform on which we are building is the BUILD platform.
# Additionally for the compiler, the platform this compiler will
# generate code for is the TARGET. TARGET is not meaningful outside
# the compiler sources.
#
# Guidelines for when to use HOST vs. TARGET:
#
# - In the build system (Makefile, foo.mk), normally we should test
# $(HOSTPLATFORM). There are some cases (eg. installation), where
# we expect $(HOSTPLATFORM)==$(TARGETPLATFORM), so in those cases it
# doesn't matter which is used.
#
# - In the compiler itself, we should test HOST or TARGET depending
# on whether the conditional relates to the code being generated, or
# the platform on which the compiler is running. See the section
# on "Coding Style" in the commentary for more details.
#
# - In all other code, we should be testing HOST only.
#
# NOTE: cross-compiling is not well supported by the build system.
# You have to do a lot of work by hand to cross compile: see the
# section on "Porting GHC" in the Building Guide.
HOSTPLATFORM = @HostPlatform@
TARGETPLATFORM = @TargetPlatform@
BUILDPLATFORM = @BuildPlatform@
# Hack alert:
# in one or two places, we need to get at the OS version (major and
# perhaps even minor), HostOS_Full is the OS name reported by
# AC_CANONICAL_SYSTEM.
#
HostPlatform_CPP = @HostPlatform_CPP@
HostArch_CPP = @HostArch_CPP@
HostOS_CPP = @HostOS_CPP@
HostOS_Full = @HostOS_Full@
HostVendor_CPP = @HostVendor_CPP@
TargetPlatform_CPP = @TargetPlatform_CPP@
TargetArch_CPP = @TargetArch_CPP@
TargetOS_CPP = @TargetOS_CPP@
TargetVendor_CPP = @TargetVendor_CPP@
BuildPlatform_CPP = @BuildPlatform_CPP@
BuildArch_CPP = @BuildArch_CPP@
BuildOS_CPP = @BuildOS_CPP@
BuildVendor_CPP = @BuildVendor_CPP@
@HostPlatform_CPP@_HOST = 1
@TargetPlatform_CPP@_TARGET = 1
@BuildPlatform_CPP@_BUILD = 1
@HostArch_CPP@_HOST_ARCH = 1
@TargetArch_CPP@_TARGET_ARCH = 1
@BuildArch_CPP@_BUILD_ARCH = 1
@HostOS_CPP@_HOST_OS = 1
@TargetOS_CPP@_TARGET_OS = 1
@BuildOS_CPP@_BUILD_OS = 1
@HostVendor_CPP@_HOST_VENDOR = 1
@TargetVendor_CPP@_TARGET_VENDOR = 1
@BuildVendor_CPP@_BUILD_VENDOR = 1
################################################################################
#
# Global configuration options
#
################################################################################
# Leading underscores on symbol names in object files
# Valid options: YES/NO
#
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)" ""
Windows=YES
else
Windows=NO
endif
# BootingFromHc - build GHC and the libraries from .hc files?
BootingFromHc = @BootingFromHc@
# BootingFromUnregisterisedHc - treat .hc files as containing unregisterised
# rather than registerised code, i.e., disable the mangler?
BootingFromUnregisterisedHc = @BootingFromUnregisterisedHc@
#
# Which ways should DocBook XML documents be built?
# options are: dvi ps pdf html chm HxS
#
XMLDocWays=
# Should we build latex docs?
LATEX_DOCS = NO
# Mac OS X deployment target (to cross-compile for older OS versions)
#
MACOSX_DEPLOYMENT_VERSION = @MACOSX_DEPLOYMENT_VERSION@
MACOSX_DEPLOYMENT_SDK = @MACOSX_DEPLOYMENT_SDK@
ifneq "$(MACOSX_DEPLOYMENT_VERSION)" ""
MACOSX_DEPLOYMENT_CC_OPTS = -mmacosx-version-min=$(MACOSX_DEPLOYMENT_VERSION) \
-isysroot $(MACOSX_DEPLOYMENT_SDK) \
--no-builtin-fprintf
MACOSX_DEPLOYMENT_LD_OPTS = -mmacosx-version-min=$(MACOSX_DEPLOYMENT_VERSION) \
-Wl,-syslibroot,$(MACOSX_DEPLOYMENT_SDK)
# We don't extend SRC_CC_OPTS and friends here directly, as (a) they may get
# overwritten in build.mk and (b) we must not use the deployment options in
# stage 1 or we get a linker error if the bootstrap compiler is for a more
# recent OS version.
#
# We need --no-builtin-fprintf, as the use of the builtin function optimisation
# for fprintf together with #include "PosixSource" in the RTS leads to the
# use of fwrite$UNIX2003 (with GCC 4.0.1 on Mac OS X 10.5.2).
endif
################################################################################
#
# Variables that control how the compiler itself is built
#
################################################################################
# The compiler used to build GHC is $(GHC). To change the actual compiler
# used, re-configure with --with-ghc=<path-to-ghc>.
# Extra ways in which to build the compiler (for example, you might want to
# build a profiled compiler so you can see where it spends its time)
GhcCompilerWays=
# Extra option flags to pass to the compiler that compiles the compiler
# (Ones that are essential are wired into compiler/Makefile)
# Typical options to use here:
#
# -DDEBUG include debugging code and assertions (will make the
# compiler slower and produce debugging output, but useful
# for development)
#
# -dcore-lint check the types after every pass of the compiler;
# a pretty strong internal check of the compiler being
# used to compile GHC. Useful when bootstrapping.
GhcHcOpts=-Rghc-timing
# Extra options added to specific stages of the compiler bootstrap.
# These are placed later on the command line, and may therefore
# override options from $(GhcHcOpts).
GhcStage1HcOpts=
GhcStage2HcOpts=-O2
GhcStage3HcOpts=-O2
GhcProfiled=NO
GhcDebugged=NO
GhcLibProfiled=$(if $(filter p,$(GhcLibWays)),YES,NO)
# Build shared and/or static libs?
BuildSharedLibs=@BuildSharedLibs@
# ToDo later:
# BuildStaticLibs=@BuildStaticLibs@
# 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: the stage1 compiler will be a registerised binary (assuming
# the compiler you build with is generating registerised binaries), but
# the stage2 compiler will be an unregisterised binary.
#
ifneq "$(findstring $(HostArch_CPP), alpha hppa)" ""
GhcUnregisterised=YES
else
GhcUnregisterised=NO
endif
# Build a compiler with a native code generator backend
# (as well as a C backend)
#
# Target platforms supported:
# i386, powerpc
# AIX is not supported
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.
GhcWithNativeCodeGen=$(strip\
$(if $(filter YESYESNO,\
$(OsSupportsNCG)$(ArchSupportsNCG)$(GhcUnregisterised)),YES,NO))
HaveLibDL = @HaveLibDL@
# ArchSupportsSMP should be set iff there is support for that arch in
# includes/SMP.h
ArchSupportsSMP=$(strip $(patsubst $(HostArch_CPP), YES, $(findstring $(HostArch_CPP), i386 x86_64 sparc powerpc)))
# lazy test, because $(GhcUnregisterised) might be set in build.mk later.
GhcWithSMP=$(strip $(if $(filter YESNO, $(ArchSupportsSMP)$(GhcUnregisterised)),YES,NO))
# Whether to include GHCi in the compiler. Depends on whether the RTS linker
# has support for this OS/ARCH combination.
OsSupportsGHCi=$(strip $(patsubst $(HostOS_CPP), YES, $(findstring $(HostOS_CPP), mingw32 cygwin32 linux solaris2 freebsd netbsd openbsd darwin)))
ArchSupportsGHCi=$(strip $(patsubst $(HostArch_CPP), YES, $(findstring $(HostArch_CPP), i386 x86_64 powerpc sparc sparc64)))
ifeq "$(OsSupportsGHCi)$(ArchSupportsGHCi)" "YESYES"
GhcWithInterpreter=YES
else
GhcWithInterpreter=NO
endif
# GhcEnableTablesNextToCode tells us whether the target architecture
# supports placing info tables directly before the entry code
# (see TABLES_NEXT_TO_CODE in the RTS). Whether we actually compile for
# TABLES_NEXT_TO_CODE depends on whether we're building unregisterised
# code or not, which may be decided by options to the compiler later.
ifneq "$(findstring $(TargetArch_CPP)X, ia64X powerpc64X)" ""
GhcEnableTablesNextToCode=NO
else
GhcEnableTablesNextToCode=YES
endif
# On Windows we normally want to make a relocatable bindist, to we
# ignore flags like libdir
ifeq "$(Windows)" "YES"
RelocatableBuild = YES
else
RelocatableBuild = NO
endif
# When building bindists we set this to yes so that the binaries are as
# portable as possible.
BeConservative = NO
#
# Building various ways?
# (right now, empty if not).
BuildingParallel=$(subst mp,YES,$(filter mp,$(WAYS)))
BuildingGranSim=$(subst mg,YES,$(filter mg,$(WAYS)))
# Interface file version (hi-boot files only)
#
# A GHC built with HscIfaceFileVersion=n will look for
# M.hi-boot-n, and only then for
# M.hi-boot.
# (It'll be happy with the latter if the former doesn't exist.)
#
#
# This variable is used ONLY for hi-boot files. Its only purpose is
# to allow you to have a single directory with multiple .hi-boot files
# for the same module, each corresponding to a different version of
# GHC.
#
# HscIfaceFileVersion is propagated to hsc via
# compiler/main/Config.hs, which is automatically generated by
# compiler/Makefile.
HscIfaceFileVersion=6
#------------------------------------------------------------------------------
# Options for Libraries
# Which directory (in libraries/) contains the integer library?
INTEGER_LIBRARY=integer-gmp
# What extra ways to build the libraries in
# In addition to the normal sequential way, the default is to also build
# profiled prelude libraries.
# When booting from .hc files, turn this off.
ifeq "$(BootingFromHc)" "YES"
GhcLibWays=
else
GhcLibWays=p
endif
ifeq "$(BuildSharedLibs)" "YES"
GhcLibWays += dyn
endif
# In addition, the RTS is built in some further variations. Ways that
# make sense here:
#
# thr : threaded
# thr_p : threaded profiled
# debug : debugging (compile with -g for the C compiler, and -DDEBUG)
# debug_p : debugging profiled
# thr_debug : debugging threaded
# thr_debug_p : debugging threaded profiled
# t : ticky-ticky profiling
# debug_t : debugging ticky-ticky profiling
# l : event logging
# thr_l : threaded and event logging
# thr_debug_l : threaded and debugging and event logging
#
GhcRTSWays=l
# Usually want the debug version
ifeq "$(BootingFromHc)" "NO"
GhcRTSWays += debug
endif
ifeq "$(BuildSharedLibs)" "YES"
GhcRTSWays += dyn debug_dyn thr_dyn thr_debug_dyn
endif
# Want the threaded versions unless we're unregisterised
# Defer the check until later by using $(if..), because GhcUnregisterised might
# be set in build.mk, which hasn't been read yet.
GhcRTSWays += $(if $(findstring NO, $(GhcUnregisterised)),thr thr_debug thr_l,)
GhcRTSWays += $(if $(findstring p, $(GhcLibWays)),$(if $(findstring NO, $(GhcUnregisterised)),thr_p,),)
# We can only build GHCi threaded if we have a threaded RTS:
GhcThreaded = $(if $(findstring thr,$(GhcRTSWays)),YES,NO)
# 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
# the build system.
#
# -O(2) is pretty desirable, otherwise no inlining of prelude
# things (incl "+") happens when compiling with this compiler
#
# -XGenerics switches on generation of support code for
# derivable type classes. This is now off by default,
# but we switch it on for the libraries so that we generate
# the code in case someone importing wants it
GhcLibHcOpts=-O2 -Rghc-timing -XGenerics
# Win32 only: Enable the RTS and libraries to be built as DLLs
DLLized=@EnableWin32DLLs@
# 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
# These are the URL patterns that Haddock uses to generate the "Source
# File" links on each page.
PackageSourceURL = http://darcs.haskell.org/packages/$(PACKAGE)/%{FILE}
# ----------------------------------------------------------------------------
# Object-file splitting
#
# Set SplitObjs=YES or NO in your build.mk
#
# Don't use -split-objs in in GhcLibHcOpts, because the build
# 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
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@
# .NET interop support?
#
DotnetSupport=NO
# Build unix package?
#
GhcLibsWithUnix=@GhcLibsWithUnix@
# ----------------------------------------------------------------------------
# Options for GHC's RTS
# For an optimised RTS (you probably don't want to change these; we build
# a debugging RTS by default now. Use -debug to get it).
GhcRtsHcOpts=-optc-O2
GhcRtsCcOpts=-fomit-frame-pointer
# Include the front panel code? Needs GTK+.
GhcRtsWithFrontPanel = NO
# Include support for CPU performance counters via the PAPI library in the RTS?
# (PAPI: http://icl.cs.utk.edu/papi/)
GhcRtsWithPapi = NO
PapiLibDir=
PapiIncludeDir=
################################################################################
#
# nofib
#
# nofib specific options
#
################################################################################
WithNofibHc = $(GHC_INPLACE)
# NoFibSubDirs controls which set of tests should be run
# You can run one or more of
# imaginary
# spectral
# real
# parallel
# PRIVATE
# PENDING
# UNUSED
NoFibSubDirs = imaginary spectral real
# The different ways to build nofib. Default is just to mirror
# what is done for the ghc prelude libraries.
#
NoFibWays = $(GhcLibWays)
# Haskell compiler options for nofib
NoFibHcOpts = -O
# Number of times to run each program
NoFibRuns = 5
################################################################################
#
# Paths (see paths.mk)
#
################################################################################
# Directory used by GHC (and possibly other tools) for storing
# temporary files. If your TMPDIR 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).
# DEFAULT_TMPDIR isn't called TMPDIR because GNU make tends to
# override an environment variable with the value of the make variable
# of the same name (if it exists) when executing sub-processes, so
# 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_ABS: the top of the fptools hierarchy, absolute path.
# On Windows this is a c:/foo/bar style path.
FPTOOLS_TOP_ABS = @hardtop@
BIN_DIST_TOPDIR_ABS=$(FPTOOLS_TOP_ABS)
BIN_DIST_DIR=$(BIN_DIST_TOPDIR_ABS)/$(BIN_DIST_NAME)
BIN_DIST_NAME=ghc-$(ProjectVersion)
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)
BIN_DIST_LIST=$(FPTOOLS_TOP_ABS)/bindist-list
# Definition of installation directories, we don't use half of these, but since
# the configure script has them on offer while passing through, we might as well
# set them. Note that we have to be careful, because the GNU coding standards
# have changed a bit over the course of time, and autoconf development reflects
# this.
#
# A little bit of history regarding autoconf and GNU coding standards, use this
# as a cheat-sheet for the stuff below:
#
# variable | default < 2.60 | default >= 2.60
# ------------+--------------------+--------------------------------------
# exec_prefix | ${prefix} | ${prefix}
# libdir | ${exec_prefix}/lib | ${exec_prefix}/lib
# datarootdir | NONE! | ${prefix}/share
# datadir | ${prefix}/share | ${datarootdir}
# infodir | ${prefix}/info | ${datarootdir}/info
# mandir | ${prefix}/man | ${datarootdir}/man
# docdir | NONE! | ${datarootdir}/doc/${PACKAGE_TARNAME}
# htmldir | NONE! | ${docdir}
# dvidir | NONE! | ${docdir}
# pdfdir | NONE! | ${docdir}
# psdir | NONE! | ${docdir}
#
# NOTE: The default e.g. ${docdir} above means that autoconf substitutes the
# string "${docdir}", not the value of docdir! This is crucial for the GNU
# coding standards.
# This gets used in the default docdir when autoconf >= 2.60 is used
PACKAGE_TARNAME := @PACKAGE_TARNAME@
prefix := @prefix@
# New autoconf (>= 2.60?) make a configure with a --datarootdir=DIR flag.
# However, in order to support older autoconf's we don't use it.
# datarootdir is set lower down instead.
# But, as datadir is defined in terms of datarootdir, we also need to
# set it to the value (if any) that configure gives it here.
datarootdir := @datarootdir@
exec_prefix := @exec_prefix@
bindir := @bindir@
datadir0 := @datadir@
libdir0 := @libdir@
includedir := @includedir@
mandir := @mandir@
dynlibdir := @libdir@
ifeq "$(RelocatableBuild)" "YES"
# Hack: our directory layouts tend to be different on Windows, so
# hack around configure's bogus assumptions here.
datarootdir := $(prefix)
datadir := $(prefix)
libdir := $(prefix)
docdir := $(prefix)/doc
htmldir := $(docdir)
dvidir := $(docdir)
pdfdir := $(docdir)
psdir := $(docdir)
else
# Unix: override libdir and datadir to put ghc-specific stuff in
# a subdirectory with the version number included.
#
# datadir is set to libdir here as GHC needs package.conf and unlit
# to be in the same place (and things like ghc-pkg need to agree on
# where package.conf is, so we just set it globally).
#
datarootdir := $(datadir0)
libdir := $(libdir0)/ghc-$(ProjectVersion)
datadir := $(libdir)
# 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@