4 ################################################################################
8 # This file supplies defaults for many tweakable build configuration
9 # options. Some of the defaults are filled in by the autoconf-generated
12 # DO NOT EDIT THIS FILE!
14 # - config.mk is auto-generated from config.mk.in by configure.
15 # If you edit config.mk your changes will be spammed.
17 # - Settings in this file may be overriden by giving replacement
18 # definitions in build.mk. See build.mk.sample for a good
19 # starting point for a build.mk file.
21 # If you don't have a build.mk file then you get defaults for everything.
22 # The defaults should provide a reasonable vanilla build.
24 # TOP: the top of the fptools hierarchy, absolute path.
25 # On Windows this is a c:/foo/bar style path.
28 include $(TOP)/mk/project.mk
30 ################################################################################
32 # Global configuration options
34 ################################################################################
36 # BootingFromHc - build GHC and the libraries from .hc files?
37 # (unregisterised only)
38 BootingFromHc = @BootingFromHc@
41 NO_INCLUDE_PKGDATA = NO
43 # Should we build latex docs?
46 # Mac OS X deployment target (to cross-compile for older OS versions)
48 MACOSX_DEPLOYMENT_VERSION = @MACOSX_DEPLOYMENT_VERSION@
49 MACOSX_DEPLOYMENT_SDK = @MACOSX_DEPLOYMENT_SDK@
51 ifneq "$(MACOSX_DEPLOYMENT_VERSION)" ""
52 MACOSX_DEPLOYMENT_CC_OPTS = -mmacosx-version-min=$(MACOSX_DEPLOYMENT_VERSION) \
53 -isysroot $(MACOSX_DEPLOYMENT_SDK) \
55 MACOSX_DEPLOYMENT_LD_OPTS = -mmacosx-version-min=$(MACOSX_DEPLOYMENT_VERSION) \
56 -Wl,-syslibroot,$(MACOSX_DEPLOYMENT_SDK)
57 # We don't extend SRC_CC_OPTS and friends here directly, as (a) they may get
58 # overwritten in build.mk and (b) we must not use the deployment options in
59 # stage 1 or we get a linker error if the bootstrap compiler is for a more
62 # We need --no-builtin-fprintf, as the use of the builtin function optimisation
63 # for fprintf together with #include "PosixSource" in the RTS leads to the
64 # use of fwrite$UNIX2003 (with GCC 4.0.1 on Mac OS X 10.5.2).
67 ################################################################################
69 # Variables that control how the compiler itself is built
71 ################################################################################
73 # The compiler used to build GHC is $(GHC). To change the actual compiler
74 # used, re-configure with --with-ghc=<path-to-ghc>.
76 # Extra ways in which to build the compiler (for example, you might want to
77 # build a profiled compiler so you can see where it spends its time)
80 # Extra option flags to pass to the compiler that compiles the compiler
81 # (Ones that are essential are wired into compiler/Makefile)
82 # Typical options to use here:
84 # -DDEBUG include debugging code and assertions (will make the
85 # compiler slower and produce debugging output, but useful
88 # -dcore-lint check the types after every pass of the compiler;
89 # a pretty strong internal check of the compiler being
90 # used to compile GHC. Useful when bootstrapping.
91 GhcHcOpts=-Rghc-timing
93 # Extra options added to specific stages of the compiler bootstrap.
94 # These are placed later on the command line, and may therefore
95 # override options from $(GhcHcOpts).
103 # GhcProfiled=YES means compile a profiled stage-2 compiler
106 # Do we support shared libs?
107 PlatformSupportsSharedLibs = $(if $(filter $(TARGETPLATFORM),\
108 i386-unknown-linux x86_64-unknown-linux \
109 i386-unknown-freebsd x86_64-unknown-freebsd \
110 i386-unknown-openbsd x86_64-unknown-openbsd \
111 i386-unknown-mingw32 \
112 i386-unknown-solaris2 \
113 i386-apple-darwin powerpc-apple-darwin),YES,NO)
115 # Build a compiler that will build *unregisterised* libraries and
116 # binaries by default. Unregisterised code is supposed to compile and
117 # run without any support for architecture-specific assembly mangling,
118 # register assignment or tail-calls, and is therefore a good way to get
119 # started when porting GHC to new architectures.
121 # If this is set to NO, you can still use the unregisterised way
122 # (way 'u') to get unregisterised code, but the default way will be
125 # NOTE: the stage1 compiler will be a registerised binary (assuming
126 # the compiler you build with is generating registerised binaries), but
127 # the stage2 compiler will be an unregisterised binary.
129 ifneq "$(findstring $(HostArch_CPP), alpha hppa)" ""
130 GhcUnregisterised=YES
135 # Build a compiler with a native code generator backend
136 # (as well as a C backend)
138 # Target platforms supported:
140 # AIX is not supported
141 ArchSupportsNCG=$(strip $(patsubst $(HostArch_CPP), YES, $(findstring $(HostArch_CPP), i386 x86_64 powerpc sparc)))
142 OsSupportsNCG=$(strip $(patsubst $(HostOS_CPP), YES, $(patsubst aix,,$(HostOS_CPP))))
144 # lazy test, because $(GhcUnregisterised) might be set in build.mk later.
145 GhcWithNativeCodeGen=$(strip\
146 $(if $(filter YESYESNO,\
147 $(OsSupportsNCG)$(ArchSupportsNCG)$(GhcUnregisterised)),YES,NO))
149 HaveLibDL = @HaveLibDL@
151 # ArchSupportsSMP should be set iff there is support for that arch in
153 ArchSupportsSMP=$(strip $(patsubst $(HostArch_CPP), YES, $(findstring $(HostArch_CPP), i386 x86_64 sparc powerpc)))
155 # lazy test, because $(GhcUnregisterised) might be set in build.mk later.
156 GhcWithSMP=$(strip $(if $(filter YESNO, $(ArchSupportsSMP)$(GhcUnregisterised)),YES,NO))
158 # Whether to include GHCi in the compiler. Depends on whether the RTS linker
159 # has support for this OS/ARCH combination.
161 OsSupportsGHCi=$(strip $(patsubst $(HostOS_CPP), YES, $(findstring $(HostOS_CPP), mingw32 cygwin32 linux solaris2 freebsd dragonfly netbsd openbsd darwin)))
162 ArchSupportsGHCi=$(strip $(patsubst $(HostArch_CPP), YES, $(findstring $(HostArch_CPP), i386 x86_64 powerpc sparc sparc64)))
164 ifeq "$(OsSupportsGHCi)$(ArchSupportsGHCi)" "YESYES"
165 GhcWithInterpreter=YES
167 GhcWithInterpreter=NO
170 # GhcEnableTablesNextToCode tells us whether the target architecture
171 # supports placing info tables directly before the entry code
172 # (see TABLES_NEXT_TO_CODE in the RTS). Whether we actually compile for
173 # TABLES_NEXT_TO_CODE depends on whether we're building unregisterised
174 # code or not, which may be decided by options to the compiler later.
175 ifneq "$(findstring $(TargetArch_CPP)X, ia64X powerpc64X)" ""
176 GhcEnableTablesNextToCode=NO
178 GhcEnableTablesNextToCode=YES
181 # Whether to use libffi for adjustors (foreign import "wrapper") or
182 # not. If we have built-in support (rts/Adjustor.c) then we use that,
183 # otherwise we fall back on libffi, which is slightly slower.
184 ArchHasAdjustorSupport = $(if $(findstring $(HostArch_CPP),i386 x86_64),YES,NO)
185 ifeq "$(ArchHasAdjustorSupport)" "YES"
186 UseLibFFIForAdjustors=NO
188 UseLibFFIForAdjustors=YES
191 # On Windows we normally want to make a relocatable bindist, to we
192 # ignore flags like libdir
193 ifeq "$(Windows)" "YES"
194 RelocatableBuild = YES
196 RelocatableBuild = NO
199 # needs to be after $(RelocatableBuild) is set above
200 include $(TOP)/mk/install.mk
202 # When building bindists we set this to yes so that the binaries are as
203 # portable as possible.
207 # Building various ways?
208 # (right now, empty if not).
209 BuildingParallel=$(subst mp,YES,$(filter mp,$(WAYS)))
210 BuildingGranSim=$(subst mg,YES,$(filter mg,$(WAYS)))
212 #------------------------------------------------------------------------------
213 # Options for Libraries
215 # Which directory (in libraries/) contains the integer library?
216 INTEGER_LIBRARY=integer-gmp
218 # We build the libraries at least the "vanilla" way (way "v")
221 # In addition to the normal sequential way, the default is to also build
222 # profiled prelude libraries unless we are booting from .hc files
223 ifneq "$(BootingFromHc)" "YES"
227 ifeq "$(PlatformSupportsSharedLibs)" "YES"
231 # Handy way to test whether we're building shared libs or not.
232 BuildSharedLibs=$(strip $(if $(findstring dyn,$(GhcLibWays)),YES,NO))
234 # In addition, the RTS is built in some further variations. Ways that
238 # thr_p : threaded profiled
239 # debug : debugging (compile with -g for the C compiler, and -DDEBUG)
240 # debug_p : debugging profiled
241 # thr_debug : debugging threaded
242 # thr_debug_p : debugging threaded profiled
244 # thr_l : threaded and event logging
248 # Usually want the debug version
249 ifeq "$(BootingFromHc)" "NO"
253 # Want the threaded versions unless we're unregisterised
254 # Defer the check until later by using $(if..), because GhcUnregisterised might
255 # be set in build.mk, which hasn't been read yet.
256 GhcRTSWays += $(if $(findstring NO, $(GhcUnregisterised)),thr thr_debug thr_l,)
257 GhcRTSWays += $(if $(findstring p, $(GhcLibWays)),$(if $(findstring NO, $(GhcUnregisterised)),thr_p,),)
258 GhcRTSWays += $(if $(findstring dyn, $(GhcLibWays)), dyn debug_dyn $(if $(findstring NO, $(GhcUnregisterised)),thr_dyn thr_debug_dyn),)
260 # We can only build GHCi threaded if we have a threaded RTS:
261 GhcThreaded = $(if $(findstring thr,$(GhcRTSWays)),YES,NO)
263 # Option flags to pass to GHC when it's compiling modules in
264 # fptools/libraries. Typically these are things like -O or
265 # -dcore-lint or -H32m. The ones that are *essential* are wired into
268 # -O(2) is pretty desirable, otherwise no inlining of prelude
269 # things (incl "+") happens when compiling with this compiler
271 # -XGenerics switches on generation of support code for
272 # derivable type classes. This is now off by default,
273 # but we switch it on for the libraries so that we generate
274 # the code in case someone importing wants it
276 GhcLibHcOpts=-O2 -XGenerics
278 # Strip local symbols from libraries? This can make the libraries smaller,
279 # but makes debugging somewhat more difficult. Doesn't work with all ld's.
283 # These are the URL patterns that Haddock uses to generate the "Source
284 # File" links on each page.
285 PackageSourceURL = http://darcs.haskell.org/packages/$(PACKAGE)/%{FILE}
287 # ----------------------------------------------------------------------------
288 # Object-file splitting
290 # Set SplitObjs=YES or NO in your build.mk
292 # Don't use -split-objs in in GhcLibHcOpts, because the build
293 # system needs to do other special magic if you are
294 # doing object-file splitting
296 ArchSupportsSplitObjs=$(strip $(if $(filter $(TargetArch_CPP),i386 x86_64 powerpc sparc),YES,NO))
297 OsSupportsSplitObjs=$(strip $(if $(filter $(TargetOS_CPP),mingw32 cygwin32 linux darwin solaris2 freebsd dragonfly netbsd openbsd),YES,NO))
298 SplitObjsBroken = @SplitObjsBroken@
300 # lazy test, so that $(GhcUnregisterised) can be set in build.mk
301 SupportsSplitObjs=$(strip \
302 $(if $(and $(filter YES,$(ArchSupportsSplitObjs)),\
303 $(filter YES,$(OsSupportsSplitObjs)),\
304 $(filter NO,$(SplitObjsBroken)),\
305 $(filter NO,$(BootingFromHc)),\
306 $(filter NO,$(GhcUnregisterised))),\
309 # By default, enable SplitObjs for the libraries if this build supports it
310 SplitObjs=$(SupportsSplitObjs)
312 # ----------------------------------------------------------------------------
313 # Package-related things
315 # Extra packages to add to the build, in dependency order
318 # Whether to install $(EXTRA_PACKAGES)
319 InstallExtraPackages = NO
321 # Run "ghc-pkg check" on each package
324 # ----------------------------------------------------------------------------
325 # Options for GHC's RTS
327 # For an optimised RTS (you probably don't want to change these; we build
328 # a debugging RTS by default now. Use -debug to get it).
329 GhcRtsHcOpts=-optc-O2
330 GhcRtsCcOpts=-fomit-frame-pointer
332 # Include the front panel code? Needs GTK+.
333 GhcRtsWithFrontPanel = NO
335 # Include support for CPU performance counters via the PAPI library in the RTS?
336 # (PAPI: http://icl.cs.utk.edu/papi/)
341 ################################################################################
343 # Paths (see paths.mk)
345 ################################################################################
347 # Directory used by GHC (and possibly other tools) for storing
348 # temporary files. If your TMPDIR isn't big enough, either override
349 # this in build.mk or set your environment variable "TMPDIR" to point
350 # to somewhere with more space. (TMPDIR=. is a good choice).
352 # DEFAULT_TMPDIR isn't called TMPDIR because GNU make tends to
353 # override an environment variable with the value of the make variable
354 # of the same name (if it exists) when executing sub-processes, so
355 # setting the TMPDIR env var would have no effect in the build tree.
357 DEFAULT_TMPDIR = /tmp
358 ifeq "$(TARGETPLATFORM)" "i386-unknown-cygwin32"
359 DEFAULT_TMPDIR = /C/TEMP
361 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
362 DEFAULT_TMPDIR = /C/TEMP
365 BIN_DIST_NAME = ghc-$(ProjectVersion)
366 BIN_DIST_PREP_DIR = bindistprep/$(BIN_DIST_NAME)
367 BIN_DIST_PREP_TAR = bindistprep/$(BIN_DIST_NAME)-$(TARGETPLATFORM).tar
368 BIN_DIST_PREP_TAR_BZ2 = $(BIN_DIST_PREP_TAR).bz2
369 BIN_DIST_TAR_BZ2 = $(BIN_DIST_NAME)-$(TARGETPLATFORM).tar.bz2
370 BIN_DIST_LIST = bindist-list
372 WINDOWS_INSTALLER_BASE = ghc-$(ProjectVersion)-i386-windows
373 WINDOWS_INSTALLER = $(WINDOWS_INSTALLER_BASE)$(exeext)
375 # -----------------------------------------------------------------------------
376 # Utilities programs: flags
378 # If you want to give any standard flags to pretty much any utility
379 # (see utils.mk for a complete list), by adding a line here
383 # where P is the utility. For example, to add -O to all Haskell
389 # SRC_HC_OPTS includes flags to be added to *every* Haskell
390 # compilation. Setting SRC_HC_OPTS is a good way to set the default
391 # optimisation level (-O) and heap size (-H<size>).
393 # SRC_HC_OPTS is *not* for adding flags that are required to make your
394 # build work. Examples:
396 # - instead of using -pgmc/-pgma-/-pgml, use the --with-gcc option to configure
398 # - if you need -optc, -opta, or -optl flags, the CONF_CC_* and CONF_LD_*
399 # variables are more appropriate (set via configure)
401 # Note that SRC_HC_OPTS are added to every Haskell compilation,
402 # including when using the bootstrapping compiler (stage 0), So don't
403 # put options here that are only supported by very recent GHCs.
405 SRC_HC_OPTS += -H32m -O
407 # These flags make flex 8-bit
410 # Default fptools options for dllwrap.
411 SRC_BLD_DLL_OPTS += --target=i386-mingw32
413 # Flags for CPP when running GreenCard on .pgc files
414 GC_CPP_OPTS += -P -E -x c -traditional -D__GLASGOW_HASKELL__
417 # -----------------------------------------------------------------------------
418 # Names of programs in the GHC tree
420 # xxx_PGM the name of an executable, without the path
421 # xxx the executable relative to the current dir
423 GHC_UNLIT_PGM = unlit$(exeext)
424 GHC_HP2PS_PGM = hp2ps$(exeext)
425 GHC_GHCTAGS_PGM = ghctags$(exeext)
426 GHC_HSC2HS_PGM = hsc2hs$(exeext)
427 GHC_TOUCHY_PGM = touchy$(exeext)
428 GHC_MANGLER_PGM = ghc-asm
429 GHC_SPLIT_PGM = ghc-split
430 GHC_SYSMAN_PGM = SysMan
431 GHC_GENPRIMOP_PGM = genprimopcode$(exeext)
432 GHC_GENAPPLY_PGM = genapply$(exeext)
433 GHC_CABAL_PGM = ghc-cabal$(exeext)
434 GHC_PKG_PGM = ghc-pkg$(exeext)
435 GHC_LTX_PGM = ltx$(exeext)
436 GHC_MKDIRHIER_PGM = mkdirhier
437 GHC_LNDIR_PGM = lndir
439 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
447 HP2PS = $(GHC_HP2PS_DIR)/$(GHC_HP2PS_PGM)
448 MANGLER = $(INPLACE_LIB)/$(GHC_MANGLER_PGM)
449 SPLIT = $(INPLACE_LIB)/$(GHC_SPLIT_PGM)
450 SYSMAN = $(GHC_SYSMAN_DIR)/$(GHC_SYSMAN_PGM)
451 LTX = $(GHC_LTX_DIR)/$(GHC_LTX_PGM)
452 LNDIR = $(GHC_LNDIR_DIR)/$(GHC_LNDIR_PGM)
454 UNLIT = $(INPLACE_LIB)/$(GHC_UNLIT_PGM)
455 TOUCHY = $(INPLACE_LIB)/$(GHC_TOUCHY_PGM)
456 MKDIRHIER = $(INPLACE_BIN)/$(GHC_MKDIRHIER_PGM)
457 GHC_CABAL_INPLACE = $(INPLACE_BIN)/$(GHC_CABAL_PGM)
458 GENAPPLY_INPLACE = $(INPLACE_BIN)/$(GHC_GENAPPLY_PGM)
459 GHC_PKG_INPLACE = $(INPLACE_BIN)/$(GHC_PKG_PGM)
460 GHCTAGS_INPLACE = $(INPLACE_BIN)/$(GHC_GHCTAGS_PGM)
461 HSC2HS_INPLACE = $(INPLACE_BIN)/$(GHC_HSC2HS_PGM)
462 GENPRIMOP_INPLACE = $(INPLACE_BIN)/$(GHC_GENPRIMOP_PGM)
464 GENERATED_FILE = chmod a-w
465 EXECUTABLE_FILE = chmod +x
467 #-----------------------------------------------------------------------------
470 # $(GHC) points to installed version of the compiler.
472 # NOTE: Don't override $(GHC) in build.mk, use configure --with-ghc instead
473 # (because the version numbers have to be calculated).
476 # If we have a make dependency on c:/ghc/ghc, and the file is actually
477 # called c:/ghc/ghc.exe, then make will think that ghc doesn't exist
478 # and that it doesn't know how to create it.
479 ifneq "$(wildcard $(GHC).exe)" ""
483 # Sometimes we want to invoke ghc from the build tree in different
484 # places (eg. it's handy to have a nofib & a ghc build in the same
485 # tree). We can refer to "this ghc" as $(GHC_INPLACE):
487 GHC_INPLACE = $(GHC_STAGE1)
489 GHC_STAGE0_ABS = $(GHC)
490 GHC_STAGE1_ABS = $(TOP)/$(INPLACE_BIN)/ghc-stage1$(exeext)
491 GHC_STAGE2_ABS = $(TOP)/$(INPLACE_BIN)/ghc-stage2$(exeext)
492 GHC_STAGE3_ABS = $(TOP)/$(INPLACE_BIN)/ghc-stage3$(exeext)
495 GHC_STAGE1 = $(INPLACE_BIN)/ghc-stage1$(exeext)
496 GHC_STAGE2 = $(INPLACE_BIN)/ghc-stage2$(exeext)
497 GHC_STAGE3 = $(INPLACE_BIN)/ghc-stage3$(exeext)
499 # Install stage 2 by default, can be changed to 3
502 BOOTSTRAPPING_CONF = libraries/bootstrapping.conf
504 INPLACE_PACKAGE_CONF = $(INPLACE_LIB)/package.conf.d
506 GhcVersion = @GhcVersion@
507 GhcPatchLevel = @GhcPatchLevel@
508 GhcMajVersion = @GhcMajVersion@
509 GhcMinVersion = @GhcMinVersion@
511 # Keep this in sync with the variables in package-config.mk
512 ghc_ge_613 = @ghc_ge_613@
514 # Canonicalised ghc version number, used for easy (integer) version
515 # comparisons. We must expand $(GhcMinVersion) to two digits by
516 # adding a leading zero if necessary:
517 ifneq "$(findstring $(GhcMinVersion), 0 1 2 3 4 5 6 7 8 9)" ""
518 GhcCanonVersion = $(GhcMajVersion)0$(GhcMinVersion)
520 GhcCanonVersion = $(GhcMajVersion)$(GhcMinVersion)
523 #-----------------------------------------------------------------------------
526 # NB. Don't override $(WhatGccIsCalled) using build.mk, re-configure using
527 # the flag --with-gcc=<blah> instead. The reason is that the configure script
528 # needs to know which gcc you're using in order to perform its tests.
532 WhatGccIsCalled = @WhatGccIsCalled@
533 GccVersion = @GccVersion@
535 ifeq "$(strip $(HaveGcc))" "YES"
536 ifneq "$(strip $(UseGcc))" "YES"
539 CC = $(WhatGccIsCalled)
543 # C compiler and linker flags from configure (e.g. -m<blah> to select
544 # correct C compiler backend). The stage number is the stage of GHC
545 # that is being used to compile with.
546 CONF_CC_OPTS_STAGE0 = @CONF_CC_OPTS_STAGE0@
547 CONF_CC_OPTS_STAGE1 = @CONF_CC_OPTS_STAGE1@
548 CONF_CC_OPTS_STAGE2 = @CONF_CC_OPTS_STAGE2@
549 CONF_GCC_LINKER_OPTS_STAGE0 = @CONF_GCC_LINKER_OPTS_STAGE0@
550 CONF_GCC_LINKER_OPTS_STAGE1 = @CONF_GCC_LINKER_OPTS_STAGE1@
551 CONF_GCC_LINKER_OPTS_STAGE2 = @CONF_GCC_LINKER_OPTS_STAGE2@
552 CONF_LD_LINKER_OPTS_STAGE0 = @CONF_LD_LINKER_OPTS_STAGE0@
553 CONF_LD_LINKER_OPTS_STAGE1 = @CONF_LD_LINKER_OPTS_STAGE1@
554 CONF_LD_LINKER_OPTS_STAGE2 = @CONF_LD_LINKER_OPTS_STAGE2@
555 CONF_CPP_OPTS_STAGE0 = @CONF_CPP_OPTS_STAGE0@
556 CONF_CPP_OPTS_STAGE1 = @CONF_CPP_OPTS_STAGE1@
557 CONF_CPP_OPTS_STAGE2 = @CONF_CPP_OPTS_STAGE2@
559 ifeq "$(TARGETPLATFORM)" "ia64-unknown-linux"
563 # The .hsc files aren't currently safe for cross-compilation on Windows:
564 # libraries\haskeline\.\System\Console\Haskeline\Backend\Win32.hsc:160
565 # directive "let" is not safe for cross-compilation
566 ifneq "$(Windows)" "YES"
567 SRC_HSC2HS_OPTS += --cross-safe
569 SRC_HSC2HS_OPTS += $(addprefix --cflag=,$(filter-out -O,$(SRC_CC_OPTS) $(CONF_CC_OPTS_STAGE0)))
570 SRC_HSC2HS_OPTS += $(foreach d,$(GMP_INCLUDE_DIRS),-I$(d))
572 #-----------------------------------------------------------------------------
575 HaveLibMingwEx = @HaveLibMingwEx@
576 DLLTOOL = inplace/mingw/bin/dlltool.exe
578 #-----------------------------------------------------------------------------
579 # Flex (currently unused, could be moved to glafp-utils)
582 # Don't bother with -lfl, we define our own yywrap()s anyway.
584 #WAS:FLEX_LIB = @LEXLIB@
586 #-----------------------------------------------------------------------------
587 # Other standard (ha!) Unix utilities
591 ArSupportsInput = @ArSupportsInput@
592 ArSupportsAtFile = @ArSupportsAtFile@
593 # Yuckage: for ghc/utils/parallel -- todo: nuke this dependency!!
594 BASH = /usr/local/bin/bash
596 CONTEXT_DIFF = @ContextDiffCmd@
598 # It's not easy to separate the CPP program from its flags, as
599 # AC_PROG_CPP defines CPP as "/usr/bin/gcc -E"
600 CPP = @CPP@ @CPPFLAGS@
603 # RAWCPP_FLAGS are the flags to give to cpp (viz, gcc -E) to persuade it to
604 # behave plausibly on Haskell sources.
606 RAWCPP_FLAGS = -undef -traditional
611 # Sigh - the autoconf macro for INSTALL will subst a relative path to the fallback
612 # install-sh script (if chosen). This not terribly useful to us, so we convert
613 # it into an abs. path.
616 INSTALL := $(subst .././install-sh,$(TOP)/install-sh,$(INSTALL))
627 PREPROCESSCMD = $(CC) -E
633 HaveDtrace = @HaveDtrace@
634 USE_DTRACE = $(HaveDtrace)
640 # Some ld's support the -x flag and some don't, so the configure
641 # script detects which we have and sets LdXFlag to "-x" or ""
645 # GNU ld supports input via a linker script, which is useful to avoid
646 # overflowing command-line length limits.
647 LdIsGNULd = @LdIsGNULd@
649 # On MSYS, building with SplitObjs=YES fails with
650 # ar: Bad file number
651 # see #3201. We need to specify a smaller max command-line size
652 # to work around it. 32767 doesn't work; 30000 does, but says
653 # xargs: value for -s option should be < 28153
654 # so we now use 20000 to be comfortably below this bound
656 ifeq "$(Windows)" "YES"
657 XARGS_OPTS = -s 20000
661 # In emergency situations, REAL_SHELL is used to perform shell commands
662 # from within the ghc driver script, by scribbling the command line to
663 # a temp file and then having $(REAL_SHELL) execute it.
665 # The reason for having to do this is that overly long command lines
666 # cause unnecessary trouble with some shells (e.g., /bin/sh on Solaris
667 # 2.5.1), which is why this backdoor is provided. The situation of overly
668 # long command lines is either encountered while doing `make boot' in compiler/,
669 # or when linking the compiler binary (`hsc').
671 # We do not use SHELL to execute long commands, as `make' will more than likely
672 # override whatever setting you have in your environment while executing.
674 # By default, REAL_SHELL is set equal to SHELL, which is not really a smart move
675 # as it is SHELL that will show up the bogosity in the first place, but setting
676 # it to anything else isn't really portable.
678 # ====> If long command lines cause you trouble, invoke `ghc' (via `make' or otherwise)
679 # with REAL_SHELL set to something else than /bin/sh, for instance, your favourite
682 REAL_SHELL = $(SHELL)
685 PATCH_CMD = @PatchCmd@
690 HSCOLOUR_CMD = @HSCOLOUR@
695 GTK_CONFIG_CMD = @GTK_CONFIG@
697 # Set this if you want to use Inno Setup to build a Windows installer
698 # when you make a bindist
701 #-----------------------------------------------------------------------------
704 BUILD_DOCBOOK_HTML = @BUILD_DOCBOOK_HTML@
705 BUILD_DOCBOOK_PS = @BUILD_DOCBOOK_PS@
706 BUILD_DOCBOOK_PDF = @BUILD_DOCBOOK_PDF@
707 DBLATEX = @DblatexCmd@
708 XSLTPROC = @XsltprocCmd@
709 XMLLINT = @XmllintCmd@
710 HAVE_DOCBOOK_XSL = @HAVE_DOCBOOK_XSL@
711 XSLTPROC_HTML_STYLESHEET = http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl
712 XSLTPROC_LABEL_OPTS = --stringparam toc.section.depth 3 \
713 --stringparam section.autolabel 1 \
714 --stringparam section.label.includes.component.label 1
716 #-----------------------------------------------------------------------------
717 # FPtools support software
724 GHC_PKG = @GhcPkgCmd@
730 HAPPY_VERSION = @HappyVersion@
732 # Options to pass to Happy when we're going to compile the output with GHC
734 SRC_HAPPY_OPTS = -agc --strict
740 ALEX_VERSION = @AlexVersion@
742 # Options to pass to Happy when we're going to compile the output with GHC
748 # Should we build haddock docs?
750 # And HsColour the sources?
751 ifeq "$(HSCOLOUR_CMD)" ""
757 ################################################################################
759 # 31-bit-Int Core files
761 ################################################################################
764 # It is possible to configure the compiler and prelude to support 31-bit
765 # integers, suitable for a back-end and RTS using a tag bit on a 32-bit
766 # architecture. Currently the only useful output from this option is external Core
767 # files. The following additions to your build.mk will produce the
768 # 31-bit core output. Note that this is *not* just a library "way"; the
769 # compiler must be built a special way too.
771 # GhcCppOpts +=-DWORD_SIZE_IN_BITS=31
772 # GhcLibHcOpts +=-fext-core -fno-code -DWORD_SIZE_IN_BITS=31
773 # GhcLibCppOpts += -DWORD_SIZE_IN_BITS=31
776 ################################################################################
778 # Library configure arguments
780 ################################################################################
782 CONFIGURE_ARGS = @CONFIGURE_ARGS@
784 ################################################################################
786 # To be passed to sub-builds
788 ################################################################################
790 ICONV_INCLUDE_DIRS = @ICONV_INCLUDE_DIRS@
791 ICONV_LIB_DIRS = @ICONV_LIB_DIRS@
793 GMP_INCLUDE_DIRS = @GMP_INCLUDE_DIRS@
794 GMP_LIB_DIRS = @GMP_LIB_DIRS@