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 # This may be triggered automatically by the build system (say
16 # if config.mk.in has changed more recently than config.mk),
17 # so if you edit config.mk your changes will be spammed.
19 # - Settings in this file may be overriden by giving replacement
20 # definitions in build.mk. See build.mk.sample for a good
21 # starting point for a build.mk file.
23 # If you don't have a build.mk file then you get defaults for everything.
24 # The defaults should provide a reasonable vanilla build.
26 # This is one of only two files that configure generates (the other is config.h)
28 # There is a section below for each project within the fptools suite
32 # a section corresponding to each of the main .mk files
33 # included by boilerplate.mk (see boilerplate.mk for a list).
35 ifneq "$(findstring 3.7, $(MAKE_VERSION))" ""
36 $(error GNU make version 3.80 or later is required.)
39 ################################################################################
41 # Project-wide platform variables
43 ################################################################################
45 # A "platform" is the GNU cpu-type/manufacturer/operating-system target machine
46 # specifier. E.g. sparc-sun-solaris2
48 # Build platform: the platform on which we are doing this build
49 # Host platform: the platform on which these binaries will run
50 # Target platform: the platform for which this compiler will generate code
52 # We don't support build & host being different, because the build
53 # process creates binaries that are run during the build, and also
56 # If host & target are different, then we are building a compiler
57 # which will generate intermediate .hc files to port to the target
58 # architecture for bootstrapping. The libraries and stage 2 compiler
59 # will be built as HC files for the target system, and likely won't
60 # build on this host platform.
62 # An important invariant is that for any piece of source code, the
63 # platform on which the code is going to run is the HOST platform,
64 # and the platform on which we are building is the BUILD platform.
65 # Additionally for the compiler, the platform this compiler will
66 # generate code for is the TARGET. TARGET is not meaningful outside
67 # the compiler sources.
69 # Guidelines for when to use HOST vs. TARGET:
71 # - In the build system (Makefile, foo.mk), normally we should test
72 # $(HOSTPLATFORM). There are some cases (eg. installation), where
73 # we expect $(HOSTPLATFORM)==$(TARGETPLATFORM), so in those cases it
74 # doesn't matter which is used.
76 # - In the compiler itself, we should test HOST or TARGET depending
77 # on whether the conditional relates to the code being generated, or
78 # the platform on which the compiler is running. See the section
79 # on "Coding Style" in the commentary for more details.
81 # - In all other code, we should be testing HOST only.
83 # NOTE: cross-compiling is not well supported by the build system.
84 # You have to do a lot of work by hand to cross compile: see the
85 # section on "Porting GHC" in the Building Guide.
87 HOSTPLATFORM = @HostPlatform@
88 TARGETPLATFORM = @TargetPlatform@
89 BUILDPLATFORM = @BuildPlatform@
92 # in one or two places, we need to get at the OS version (major and
93 # perhaps even minor), HostOS_Full is the OS name reported by
94 # AC_CANONICAL_SYSTEM.
96 HostPlatform_CPP = @HostPlatform_CPP@
97 HostArch_CPP = @HostArch_CPP@
98 HostOS_CPP = @HostOS_CPP@
99 HostOS_Full = @HostOS_Full@
100 HostVendor_CPP = @HostVendor_CPP@
102 TargetPlatform_CPP = @TargetPlatform_CPP@
103 TargetArch_CPP = @TargetArch_CPP@
104 TargetOS_CPP = @TargetOS_CPP@
105 TargetVendor_CPP = @TargetVendor_CPP@
107 BuildPlatform_CPP = @BuildPlatform_CPP@
108 BuildArch_CPP = @BuildArch_CPP@
109 BuildOS_CPP = @BuildOS_CPP@
110 BuildVendor_CPP = @BuildVendor_CPP@
112 @HostPlatform_CPP@_HOST = 1
113 @TargetPlatform_CPP@_TARGET = 1
114 @BuildPlatform_CPP@_BUILD = 1
116 @HostArch_CPP@_HOST_ARCH = 1
117 @TargetArch_CPP@_TARGET_ARCH = 1
118 @BuildArch_CPP@_BUILD_ARCH = 1
120 @HostOS_CPP@_HOST_OS = 1
121 @TargetOS_CPP@_TARGET_OS = 1
122 @BuildOS_CPP@_BUILD_OS = 1
124 @HostVendor_CPP@_HOST_VENDOR = 1
125 @TargetVendor_CPP@_TARGET_VENDOR = 1
126 @BuildVendor_CPP@_BUILD_VENDOR = 1
128 # Leading underscores on symbol names in object files
129 # Valid options: YES/NO
131 LeadingUnderscore=@LeadingUnderscore@
133 # Pin a suffix on executables? If so, what (Windows only).
136 # Windows=YES if on a Windows platform
137 ifneq "$(findstring $(HostOS_CPP), mingw32 cygwin32)" ""
143 ################################################################################
147 # Set of options applicable to all fptools projects
149 ################################################################################
151 # BootingFromHc - build GHC and the libraries from .hc files?
152 BootingFromHc = @BootingFromHc@
154 # BootingFromUnregisterisedHc - treat .hc files as containing unregisterised
155 # rather than registerised code, i.e., disable the mangler?
156 BootingFromUnregisterisedHc = @BootingFromUnregisterisedHc@
158 # Build Order: we build Happy, Haddock and Alex before GHC if they are
159 # in this source tree, just in case our GHC build depends on these
160 # local builds rather than installed versions of the tools.
162 # Build the libs first if we're bootstrapping from .hc files.
163 ifeq "$(BootingFromHc)" "YES"
164 AllProjects = glafp-utils happy alex haddock libraries hslibs ghc greencard hdirect hood nofib docs
166 AllProjects = glafp-utils happy alex haddock ghc libraries hslibs greencard hdirect hood nofib docs
170 # (OPTIONAL) set ProjectsToBuild to a list of projects to be built. If this
171 # list is empty, then all projects present in the source tree will be built.
176 # set ProjectsDontInstall to a list of projects which are normally built but
179 ProjectsDontInstall = glafp-utils nofib
182 # Should the various project tests directories be built?
184 IncludeTestDirsInBuild=NO
187 # Should the various project example directories be built?
189 IncludeExampleDirsInBuild=NO
192 # Which ways should DocBook XML documents be built?
193 # options are: dvi ps pdf html chm HxS
197 ################################################################################
201 # Set of (configurable) options needed by the ghc tree
202 # plus their default options (if any).
204 ################################################################################
206 #---------------------------------------------------------------
208 # Variables that control how the compiler itself is built
210 #---------------------------------------------------------------
212 # The compiler used to build GHC is $(GHC). To change the actual compiler
213 # used, re-configure with --with-ghc=<path-to-ghc>.
215 # Extra ways in which to build the compiler (for example, you might want to
216 # build a profiled compiler so you can see where it spends its time)
219 # Extra option flags to pass to the compiler that compiles the compiler
220 # (Ones that are essential are wired into ghc/compiler/Makefile)
221 # Typical options to use here:
223 # -DDEBUG include debugging code and assertions (will make the
224 # compiler slower and produce debugging output, but useful
227 # -dcore-lint check the types after every pass of the compiler;
228 # a pretty strong internal check of the compiler being
229 # used to compile GHC. Useful when bootstrapping.
230 GhcHcOpts=-Rghc-timing
232 # Extra options added to specific stages of the compiler bootstrap.
233 # These are placed later on the command line, and may therefore
234 # override options from $(GhcHcOpts).
239 # Build a compiler that will build *unregisterised* libraries and
240 # binaries by default. Unregisterised code is supposed to compile and
241 # run without any support for architecture-specific assembly mangling,
242 # register assignment or tail-calls, and is therefore a good way to get
243 # started when porting GHC to new architectures.
245 # If this is set to NO, you can still use the unregisterised way
246 # (way 'u') to get unregisterised code, but the default way will be
249 # NOTE: the stage1 compiler will be a registerised binary (assuming
250 # the compiler you build with is generating registerised binaries), but
251 # the stage2 compiler will be an unregisterised binary.
255 # Build a compiler with a native code generator backend
256 # (as well as a C backend)
258 # Target platforms supported:
260 # sparc has bitrotted
261 # AIX is not supported
262 ArchSupportsNCG=$(strip $(patsubst $(HostArch_CPP), YES, $(findstring $(HostArch_CPP), i386 x86_64 powerpc)))
263 OsSupportsNCG=$(strip $(patsubst $(HostOS_CPP), YES, $(patsubst aix,,$(HostOS_CPP))))
265 ifeq "$(OsSupportsNCG)$(ArchSupportsNCG)" "YESYES"
266 GhcWithNativeCodeGen=YES
268 GhcWithNativeCodeGen=NO
271 # Include support for generating Java
274 HaveLibDL = @HaveLibDL@
276 # Whether to include GHCi in the compiler. Depends on whether the RTS linker
277 # has support for this OS/ARCH combination.
279 OsSupportsGHCi=$(strip $(patsubst $(HostOS_CPP), YES, $(findstring $(HostOS_CPP), mingw32 cygwin32 linux solaris2 freebsd netbsd openbsd darwin)))
280 ArchSupportsGHCi=$(strip $(patsubst $(HostArch_CPP), YES, $(findstring $(HostArch_CPP), i386 x86_64 powerpc powerpc64 sparc sparc64)))
282 ifeq "$(OsSupportsGHCi)$(ArchSupportsGHCi)" "YESYES"
283 GhcWithInterpreter=YES
285 GhcWithInterpreter=NO
289 # Building various ways?
290 # (right now, empty if not).
291 BuildingParallel=$(subst mp,YES,$(filter mp,$(WAYS)))
292 BuildingGranSim=$(subst mg,YES,$(filter mg,$(WAYS)))
294 #------------------------------------------------------------------------------
295 # Options for Libraries
297 # What extra ways to build the libraries in
298 # In addition to the normal sequential way, the default is to also build
299 # profiled prelude libraries.
300 # When booting from .hc files, turn this off.
301 ifeq "$(BootingFromHc)" "YES"
307 # In addition, the RTS is built in some further variations. Ways that
311 # thr_p : threaded profiled
312 # debug : debugging (compile with -g for the C compiler, and -DDEBUG)
313 # debug_p : debugging profiled
314 # debug_u : debugging unregisterised
315 # thr_debug : debugging threaded
316 # thr_debug_p : debugging threaded profiled
318 ifeq "$(BootingFromHc)" "YES"
321 GhcRTSWays=thr thr_p debug thr_debug
324 # Option flags to pass to GHC when it's compiling modules in
325 # fptools/libraries. Typically these are things like -O or
326 # -dcore-lint or -H32m. The ones that are *essential* are wired into
329 # -O is pretty desirable, otherwise no inlining of prelude
330 # things (incl "+") happens when compiling with this compiler
332 # -fgenerics switches on generation of support code for
333 # derivable type classes. This is now off by default,
334 # but we switch it on for the libraries so that we generate
335 # the code in case someone importing wants it
337 GhcLibHcOpts=-O -Rghc-timing -fgenerics
339 # Win32 only: Enable the RTS and libraries to be built as DLLs
340 DLLized=@EnableWin32DLLs@
342 # Strip local symbols from libraries? This can make the libraries smaller,
343 # but makes debugging somewhat more difficult. Doesn't work with all ld's.
348 # ----------------------------------------------------------------------------
349 # Object-file splitting
351 # Set SplitObjs=YES or NO in your build.mk
353 # Don't use -split-objs in in GhcLibHcOpts, because the build
354 # system needs to do other special magic if you are
355 # doing object-file splitting
356 ifneq "$(findstring $(HostArch_CPP), i386 x86_64 powerpc sparc)" ""
362 # Don't split object files for libs if we're building DLLs, or booting from
364 ifeq "$(DLLized)" "YES"
367 ifeq "$(BootingFromHc)" "YES"
370 ifeq "$(GhcUnregisterised)" "YES"
373 ifeq "$(TargetArch_CPP)" "ia64"
377 # ----------------------------------------------------------------------------
378 # Options for GHC's RTS
380 # For an optimised RTS (you probably don't want to change these; we build
381 # a debugging RTS by default now. Use -debug to get it).
382 GhcRtsHcOpts=-optc-O2
383 GhcRtsCcOpts=-fomit-frame-pointer
385 # Include the front panel code? Needs GTK+.
386 GhcRtsWithFrontPanel = NO
388 ################################################################################
392 ################################################################################
394 # Build the Haskell Readline bindings?
396 GhcLibsWithReadline=@GhcLibsWithReadline@
398 # Libraries needed for linking with readline
399 LibsReadline=@LibsReadline@
401 # Include path to readline.h
402 # (no path == in standard include path)
409 # Build the ObjectIO ?
411 GhcLibsWithObjectIO=@GhcLibsWithObjectIO@
413 # .NET interop support?
415 DotnetSupport=@DotnetSupport@
417 # Build unix package?
419 GhcLibsWithUnix=@GhcLibsWithUnix@
421 ################################################################################
425 # Happy specific options
427 ################################################################################
429 # The compiler you'd like to use to compile Happy
430 WithHappyHc = @WithHc@
432 # HappyHcOpts gives the flags to pass to the Haskell compiler used
433 # to compile the Happy sources with.
437 ################################################################################
441 # Haggis specific options
443 ################################################################################
445 ################################################################################
449 # GreenCard specific options
451 ################################################################################
453 ################################################################################
457 # nofib specific options
459 ################################################################################
461 WithNofibHc = $(GHC_INPLACE)
463 # NoFibSubDirs controls which set of tests should be run
464 # You can run one or more of
472 NoFibSubDirs = imaginary spectral real
474 # The different ways to build nofib. Default is just to mirror
475 # what is done for the ghc prelude libraries.
477 NoFibWays = $(GhcLibWays)
479 # Haskell compiler options for nofib
482 # Number of times to run each program
485 # ==============================================================================
487 # END OF PROJECT-SPECIFIC STUFF
489 # Now come the generic configuration options
491 # ==============================================================================
493 ################################################################################
495 # Paths (see paths.mk)
497 ################################################################################
499 # Directory used by GHC (and possibly other tools) for storing
500 # temporary files. If your TMPDIR isn't big enough, either override
501 # this in build.mk or set your environment variable "TMPDIR" to point
502 # to somewhere with more space. (TMPDIR=. is a good choice).
504 # DEFAULT_TMPDIR isn't called TMPDIR because GNU make tends to
505 # override an environment variable with the value of the make variable
506 # of the same name (if it exists) when executing sub-processes, so
507 # setting the TMPDIR env var would have no effect in the build tree.
509 DEFAULT_TMPDIR = /tmp
510 ifeq "$(TARGETPLATFORM)" "i386-unknown-cygwin32"
511 DEFAULT_TMPDIR = C:/TEMP
513 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
514 DEFAULT_TMPDIR = C:/TEMP
517 # FPTOOLS_TOP: the top of the fptools hierarchy, absolute path. (POSIX / unix-style path).
518 FPTOOLS_TOP_ABS = @hardtop@
519 # The platform specific version of 'hardtop'.
520 FPTOOLS_TOP_ABS_PLATFORM = @hardtop_plat@
523 # Installation directories, we don't use half of these,
524 # but since the configure script has them on offer while
525 # passing through, we might as well set them.
528 exec_prefix = @exec_prefix@
532 includedir = @includedir@
533 oldincludedir = @oldincludedir@
536 ifeq "$(Windows)" "YES"
538 ifeq "$(strip $(prefix))" ""
542 # Hack: our directory layouts tend to be different on Windows, so
543 # hack around configure's bogus assumptions here.
550 # Unix: override libdir and datadir to put project-specific stuff in
551 # a subdirectory with the version number included.
553 libdir = $(if $(ProjectNameShort),$(libdir0)/$(ProjectNameShort)-$(ProjectVersion),$(libdir0))
554 datadir = $(if $(ProjectNameShort),$(datadir0)/$(ProjectNameShort)-$(ProjectVersion),$(datadir0))
558 # Default place for putting interface files is $(libdir)
559 # (overriden for packages in package.mk)
563 # Default values for most of the above are only set if
564 # they weren't configured to anything in particular
565 # via the configure script. (i.e., we make no assumption
566 # that the autoconf-generated script will assign defaults
567 # to all of the above).
569 ifeq "$(strip $(exec_prefix))" ""
570 exec_prefix = $(prefix)
572 ifeq "$(strip $(bindir))" ""
573 bindir = $(exec_prefix)/bin
577 # NOTE: by intention, libexecdir and libdir point to
579 # => Only way to override this is to set libexecdir= on the command line.
580 # (NOTE: configure script setting is ignored).
581 libexecdir = $(libdir)
583 ifeq "$(strip $(datadir))" ""
584 datadir = $(prefix)/share
586 ifeq "$(strip $(libdir))" ""
587 libdir = $(exec_prefix)/lib
589 ifeq "$(strip $(includedir))" ""
590 includedir = $(prefix)/include
592 ifeq "$(strip $(oldincludedir))" ""
593 oldincludedir = /usr/include
595 ifeq "$(strip $(mandir))" ""
596 mandir = $(prefix)/man
599 #-----------------------------------------------------------------------------
600 # install configuration
603 # Set this to have files installed with a specific owner
608 # Set this to have files installed with a specific group
613 # Invocations of `install' for the four different classes
616 INSTALL_PROGRAM = $(INSTALL) -m 755
617 INSTALL_SCRIPT = $(INSTALL) -m 755
618 INSTALL_SHLIB = $(INSTALL) -m 755
619 INSTALL_DATA = $(INSTALL) -m 644
620 INSTALL_DIR = $(MKDIRHIER)
622 # -----------------------------------------------------------------------------
623 # Utilities programs: flags
625 # If you want to give any standard flags to pretty much any utility
626 # (see utils.mk for a complete list), by adding a line here
630 # where P is the utility. For example, to add -O to all Haskell
635 SRC_HC_OPTS += -H16m -O
637 # These flags make flex 8-bit
640 SRC_INSTALL_BIN_OPTS += -s
642 # lint gets all CPP's flags too
643 SRC_LINT_OPTS += -axz -DLINT $(SRC_CPP_OPTS)
644 WAY$(_way)_LINT_OPTS += WAY$(_way)_CPP_OPTS
646 # Default fptools options for dllwrap.
647 SRC_BLD_DLL_OPTS += -mno-cygwin --target=i386-mingw32
649 # Flags for CPP when running GreenCard on .pgc files
650 GC_CPP_OPTS += -P -E -x c -traditional -D__GLASGOW_HASKELL__
653 ################################################################################
655 # Utilities programs: where to find them
657 ################################################################################
659 #-----------------------------------------------------------------------------
660 # FPtools Utility locations
662 # By default, the various utils needed to be build ghc and chums
663 # is set up to point to the utils/ directory. Define here the
664 # path prefix for the utilities. Notice that it's a prefix with
665 # a trailing slash, so that it can be concatenated directly on
666 # front of a program name; if it's not set then we just look
667 # along the shell's $(PATH)
669 # If instead you want to use installed or your own versions of these,
670 # override the various *_PREFIX in build.mk, i.e., having the following
675 # will force `make' to rummage around in your PATH to find `mkdependC' (not
676 # sure it would need it in the first place, but still).
678 GLAFP_UTILS = $(FPTOOLS_TOP)/glafp-utils
680 SCRIPT_PREFIX = $(GLAFP_UTILS)/scripts/
681 MKDEPENDC_PREFIX = $(GLAFP_UTILS)/mkdependC/
682 LTX_PREFIX = $(GLAFP_UTILS)/ltx/
683 RUNTEST_PREFIX = $(GLAFP_UTILS)/runstdtest/
684 VERBATIM_PREFIX = $(GLAFP_UTILS)/verbatim/
685 SGMLVERB_PREFIX = $(GLAFP_UTILS)/sgmlverb/
686 ETAGS_PREFIX = $(GLAFP_UTILS)/etags/
687 LNDIR_PREFIX = $(GLAFP_UTILS)/lndir/
688 MKDIRHIER_PREFIX = $(GLAFP_UTILS)/mkdirhier/
689 DOCBOOK_PREFIX = $(GLAFP_UTILS)/docbook/
691 HADDOCK_PREFIX = $(FPTOOLS_TOP)/haddock/
693 LITERATE_PREFIX = $(FPTOOLS_TOP)/literate/
695 UNLIT_PREFIX = $(FPTOOLS_TOP)/ghc/utils/unlit/
696 HP2PS_PREFIX = $(FPTOOLS_TOP)/ghc/utils/hp2ps/
697 HSTAGS_PREFIX = $(FPTOOLS_TOP)/ghc/utils/hasktags/
698 HSC2HS_PREFIX = $(FPTOOLS_TOP)/ghc/utils/hsc2hs/
700 #-----------------------------------------------------------------------------
701 # Haskell compilers and mkdependHS
703 # $(GHC), $(HBC) and $(NHC) point to installed versions of the relevant
704 # compilers, if available.
706 # $(HC) is a generic Haskell 98 compiler, set to $(GHC) by default.
707 # $(MKDEPENDHS) is the Haskell dependency generator (ghc -M).
709 # NOTE: Don't override $(GHC) in build.mk, use configure --with-ghc instead
710 # (because the version numbers have to be calculated).
713 GhcDir = $(dir $(GHC))
714 GhcVersion = @GhcVersion@
715 GhcMajVersion = @GhcMajVersion@
716 GhcMinVersion = @GhcMinVersion@
717 GhcPatchLevel = @GhcPatchLevel@
719 # Canonicalised ghc version number, used for easy (integer) version
720 # comparisons. We must expand $(GhcMinVersion) to two digits by
721 # adding a leading zero if necessary:
722 ifneq "$(findstring $(GhcMinVersion), 0 1 2 3 4 5 6 7 8 9)" ""
723 GhcCanonVersion = $(GhcMajVersion)0$(GhcMinVersion)
725 GhcCanonVersion = $(GhcMajVersion)$(GhcMinVersion)
734 # Sometimes we want to invoke ghc from the build tree in different
735 # projects (eg. it's handy to have a nofib & a ghc build in the same
736 # tree). We can refer to "this ghc" as $(GHC_INPLACE):
738 GHC_INPLACE = $(FPTOOLS_TOP)/ghc/compiler/ghc-inplace
739 GHC_STAGE1 = $(FPTOOLS_TOP)/ghc/compiler/stage1/ghc-inplace
740 GHC_STAGE2 = $(FPTOOLS_TOP)/ghc/compiler/stage2/ghc-inplace
741 GHC_STAGE3 = $(FPTOOLS_TOP)/ghc/compiler/stage3/ghc-inplace
743 #-----------------------------------------------------------------------------
746 # NB. Don't override $(WhatGccIsCalled) using build.mk, re-configure using
747 # the flag --with-gcc=<blah> instead. The reason is that the configure script
748 # needs to know which gcc you're using in order to perform its tests.
752 WhatGccIsCalled = @WhatGccIsCalled@
753 GccVersion = @GccVersion@
754 ifeq "$(strip $(HaveGcc))" "YES"
755 ifneq "$(strip $(UseGcc))" "YES"
758 CC = $(WhatGccIsCalled)
759 GccDir = $(dir $(WhatGccIsCalled))
763 # default C compiler flags
764 SRC_CC_OPTS = @SRC_CC_OPTS@
766 ifeq "$(TARGETPLATFORM)" "ia64-unknown-linux"
770 #-----------------------------------------------------------------------------
771 # GMP Library (version 2.0.x or above)
773 HaveLibGmp = @HaveLibGmp@
776 #-----------------------------------------------------------------------------
777 # GMP framework (Mac OS X)
779 HaveFrameworkGMP = @HaveFrameworkGMP@
781 #-----------------------------------------------------------------------------
784 HaveLibMingwEx = @HaveLibMingwEx@
786 #-----------------------------------------------------------------------------
787 # Flex (currently unused, could be moved to glafp-utils)
790 # Don't bother with -lfl, we define our own yywrap()s anyway.
792 #WAS:FLEX_LIB = @LEXLIB@
794 #-----------------------------------------------------------------------------
795 # Other standard (ha!) Unix utilities
798 ArSupportsInput = @ArSupportsInput@
799 # Yuckage: for ghc/utils/parallel -- todo: nuke this dependency!!
800 BASH = /usr/local/bin/bash
802 CONTEXT_DIFF = @ContextDiffCmd@
804 CPP = @CPP@ @CPPFLAGS@
807 # RAWCPP_FLAGS are the flags to give to cpp (viz, gcc -E) to persuade it to
808 # behave plausibly on Haskell sources.
810 RAWCPP_FLAGS = -undef -traditional
815 # Sigh - the autoconf macro for INSTALL will subst a relative path to the fallback
816 # install-sh script (if chosen). This not terribly useful to us, so we convert
817 # it into an abs. path.
819 INSTALL := $(subst .././install-sh,$(FPTOOLS_TOP_ABS)/install-sh,$(INSTALL))
831 PREPROCESSCMD = $(CC) -E
839 # Some ld's support the -x flag and some don't, so the configure
840 # script detects which we have and sets LdXFlag to "-x" or ""
844 # GNU ld supports input via a linker script, which is useful to avoid
845 # overflowing command-line length limits.
846 LdIsGNULd = @LdIsGNULd@
849 # In emergency situations, REAL_SHELL is used to perform shell commands
850 # from within the ghc driver script, by scribbling the command line to
851 # a temp file and then having $(REAL_SHELL) execute it.
853 # The reason for having to do this is that overly long command lines
854 # cause unnecessary trouble with some shells (e.g., /bin/sh on Solaris
855 # 2.5.1), which is why this backdoor is provided. The situation of overly
856 # long command lines is either encountered while doing `make boot' in ghc/compiler,
857 # or when linking the compiler binary (`hsc').
859 # We do not use SHELL to execute long commands, as `make' will more than likely
860 # override whatever setting you have in your environment while executing.
862 # By default, REAL_SHELL is set equal to SHELL, which is not really a smart move
863 # as it is SHELL that will show up the bogosity in the first place, but setting
864 # it to anything else isn't really portable.
866 # ====> If long command lines cause you trouble, invoke `ghc' (via `make' or otherwise)
867 # with REAL_SHELL set to something else than /bin/sh, for instance, your favourite
877 # This is special to literate/, ToDo: add literate-specific
878 # configure setup to literate/.
883 TGRIND_HELPER = /usr/local/lib/tgrind/tfontedpr # XXX
890 #-----------------------------------------------------------------------------
893 XSLTPROC = @XsltprocCmd@
894 XMLLINT = @XmllintCmd@
897 PDFXMLTEX = @PdfxmltexCmd@
900 DIR_DOCBOOK_XSL = @DIR_DOCBOOK_XSL@
902 XSLTPROC_LABEL_OPTS = --stringparam toc.section.depth 3 \
903 --stringparam section.autolabel 1 \
904 --stringparam section.label.includes.component.label 1
906 #-----------------------------------------------------------------------------
907 # FPtools support software
909 # Stuff from fptools/glafp-utils
910 MKDEPENDC = $(MKDEPENDC_PREFIX)mkdependC
911 LTX = $(LTX_PREFIX)ltx
912 MKDIRHIER = $(MKDIRHIER_PREFIX)mkdirhier
913 LNDIR = $(LNDIR_PREFIX)lndir
914 ETAGS = $(ETAGS_PREFIX)etags
915 VERBATIM = $(VERBATIM_PREFIX)verbatim
916 SGMLVERB = $(SGMLVERB_PREFIX)sgmlverb
917 RUNTEST = $(RUNTEST_PREFIX)runstdtest
922 # .NET support software
930 GHC_PKG = @GhcPkgCmd@
935 GREENCARD = @GreenCardCmd@
936 GREENCARD_VERSION = @GreenCardVersion@
942 HAPPY_VERSION = @HappyVersion@
944 # Options to pass to Happy when we're going to compile the output with GHC
946 GHC_HAPPY_OPTS = -agc
948 # Temp. to work around performance problems in the HEAD around 8/12/2003,
949 # A Happy compiled with this compiler needs more stack.
950 SRC_HAPPY_OPTS = +RTS -K2m -RTS
956 ALEX_VERSION = @AlexVersion@
958 # Options to pass to Happy when we're going to compile the output with GHC
965 HADDOCK = @HaddockCmd@
966 HADDOCK_INPLACE = $(HADDOCK_PREFIX)/src/haddock-inplace
969 # Stuff from fptools/literate
971 LIT2PGM = $(LITERATE_PREFIX)lit2pgm
972 LIT2HTML = $(LITERATE_PREFIX)lit2html
973 LIT2LATEX = $(LITERATE_PREFIX)lit2latex
974 MKDEPENDLIT = $(LITERATE_PREFIX)mkdependlit
975 LIT2CHANGELOG = $(LITERATE_PREFIX)lit2changelog
976 LIT2TEXT = $(LITERATE_PREFIX)lit2text
979 # Stuff from fptools/ghc/utils
981 UNLIT = $(UNLIT_PREFIX)unlit$(exeext)
982 HP2PS = $(HP2PS_PREFIX)hp2ps$(exeext)
983 HSTAGS = $(HSTAGS_PREFIX)hasktags
984 HSC2HS = $(HSC2HS_PREFIX)hsc2hs-inplace
987 # Options for the compiling different `ways'. Various projects within
988 # the glorious fptools tree support building in various user-configured
989 # ways. For instance, you could set up one `way' such that the prelude
990 # libraries all were built with the option -ffoldr-build-on.
992 # To configure up your own way, have a look at some of the standard ways
993 # such as profiling, and create your own set of WAY_*_OPTS defs below.
994 # After having done that, add your way string to WAYS, and after having
995 # run the configure script, the different projects will add the new way
996 # to the list of ways they support.
1000 # IMPORTANT! The WAYS variable configures the different `ways'
1001 # you want to build a project (or maybe just parts of it, as is
1002 # the case for ghc/). This variable is intended set inside the
1003 # project mk setup, enforcing a global fptools WAYS is a bit too
1004 # much (do you *really* want to build glafp-utils the profiled-concurrent
1009 # Definitions of the different ways:
1013 # - description, e.g., profiling
1014 # * what they mean to the driver:
1015 # - WAY_p_HC_OPTS gives the list of command-line options
1020 # The ways currently defined.
1022 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
1023 USER_WAYS=a b c d e f g h j k l m n o A B
1026 # The following ways currently have treated specially, p u t mg,
1027 # as the driver script treats these guys specially and needs to carefully be told
1028 # about the options for these. Hence, we hide the required command line options
1029 # for these in the ghc/driver, as this is the only place they are needed.
1031 # If you want to add to these default options, fill in the variables below:
1035 WAY_i_HC_OPTS= -filx -fruntime-types
1038 WAY_p_NAME=profiling
1039 WAY_p_HC_OPTS= -prof
1042 WAY_t_NAME=ticky-ticky profiling
1043 WAY_t_HC_OPTS= -ticky
1046 WAY_u_NAME=unregisterized (using portable C only)
1047 WAY_u_HC_OPTS=-unreg
1050 WAY_s_NAME=threads (for SMP)
1051 WAY_s_HC_OPTS=-smp -optc-DTHREADED_RTS
1054 WAY_mp_NAME=parallel
1055 WAY_mp_HC_OPTS=-parallel
1059 WAY_mg_HC_OPTS=-gransim
1062 # These ways apply to the RTS only:
1066 WAY_thr_NAME=threaded
1067 WAY_thr_HC_OPTS=-optc-DTHREADED_RTS
1070 WAY_thr_p_NAME=threaded profiled
1071 WAY_thr_p_HC_OPTS=-optc-DTHREADED_RTS -prof
1074 WAY_debug_NAME=debug
1075 WAY_debug_HC_OPTS=-optc-DDEBUG
1078 WAY_debug_p_NAME=debug profiled
1079 WAY_debug_p_HC_OPTS=-optc-DDEBUG -prof
1082 WAY_debug_u_NAME=debug unregisterised
1083 WAY_debug_u_HC_OPTS=-optc-DDEBUG -unreg
1086 WAY_debug_s_NAME=debug SMP
1087 WAY_debug_s_HC_OPTS=-optc-DDEBUG -optc-DTHREADED_RTS -smp
1090 WAY_thr_debug_NAME=threaded
1091 WAY_thr_debug_HC_OPTS=-optc-DTHREADED_RTS -optc-DDEBUG
1093 # Way 'thr_debug_p':
1094 WAY_thr_debug_p_NAME=threaded
1095 WAY_thr_debug_p_HC_OPTS=-optc-DTHREADED_RTS -optc-DDEBUG -prof
1098 # Add user-way configurations here:
1148 ################################################################################
1150 # 31-bit-Int Core files
1152 ################################################################################
1155 # It is possible to configure the compiler and prelude to support 31-bit
1156 # integers, suitable for a back-end and RTS using a tag bit on a 32-bit
1157 # architecture. Currently the only useful output from this option is external Core
1158 # files. The following additions to your build.mk will produce the
1159 # 31-bit core output. Note that this is *not* just a library "way"; the
1160 # compiler must be built a special way too.
1162 # GhcCppOpts +=-DWORD_SIZE_IN_BITS=31
1163 # GhcLibHcOpts +=-fext-core -fno-code -DWORD_SIZE_IN_BITS=31
1164 # GhcLibCppOpts += -DWORD_SIZE_IN_BITS=31