4 #################################################################################
6 # config.mk.in-template
8 # This file defines all the variables that set the configuration of
12 #################################################################################
14 # The configuration is defined in two steps:
16 # 1. The builder (i.e. the person doing the build)
17 # copies this file, config.mk.in-template
20 # 2. S/he then edits it manually (gasp) to reflect any configuration
23 # 3. Then s/he runs "configure", which generates config.mk from
24 # config.mk.in, substituting for system/platform-dependent things
25 # enclosed in @at-signs@.
27 # This is one of only two files that configure generates (the other is config.h)
29 # Note that after subsequent edits of config.mk.in for a build, the configure script
30 # will have to be re-run manually to have the change reflected in config.mk.
33 # There is a section below for each project within the fptools suite
37 # a section corresponding to each of the main .mk files
38 # included by boilerplate.mk (see boilerplate.mk for a list).
42 #################################################################################
46 # Set of options applicable to all fptools projects
48 #################################################################################
51 # What parts to build: An fptools build tree does not have to be built
52 # all in one go. By setting the list of ProjectsToBuild in build.mk you can
53 # control which projects are built.
55 # Caution: the projects are built in the order given here, so if some
56 # projects use others you must list them in the correct order.
58 # Generally: * glafp-utils should be first
64 ProjectsToBuild = glafp-utils literate ghc hslibs
66 # Make a distinction between building and installing, ProjectsToInstall
67 # does not include the literate bits..
69 ProjectsToInstall = glafp-utils ghc hslibs
72 # Should the various project tests directories be built?
74 IncludeTestDirsInBuild=NO
76 #################################################################################
80 # Set of (configurable) options needed by the ghc tree
81 # plus their default options (if any).
83 #################################################################################
86 # Name variables for ghc:
88 GhcProjectName =The Glorious Glasgow Haskell Compilation System
89 GhcProjectNameShort =ghc
90 GhcProjectVersion =2.03
91 GhcProjectPatchLevel =0
92 GhcBuildeeVersion =203
96 # Name variables for the fptools, for now equal to the above
99 ProjectName =$(GhcProjectName)
100 ProjectNameShort =$(GhcProjectNameShort)
101 ProjectVersion =$(GhcProjectVersion)
102 ProjectPatchLevel =$(GhcProjectPatchLevel)
105 #---------------------------------------------------------------
107 # Variables that control how the compiler itself is built
109 # Specify the Haskell compiler to be used to compile the compiler itself
110 # WithGhcHc Path name of the compiler to use
111 # Ghc2_0 Whether this compiler is GHC 2.0 or later
112 # (which affects gruesome details about
113 # how mutually recursive modules are handled)
114 # WithGhcHcType What "type" of compiler is being used
123 # WithGhcHcType=HC_GLASGOW_GHC
125 # Extra ways in which to build the compiler (for example, you might want to
126 # build a profiled compiler so you can see where it spends its time)
129 # Extra option flags to pass to the compiler that compiles the compiler
130 # (Ones that are essential are wired into ghc/compiler/Makefile)
132 # -O compiler an optimised compiler
133 # -DDEBUG include consistency/assertion checks in the compiled compiler
134 # -fshow-import-specs show import specialisations
137 # GhcWithHscBuiltViaC - build GHC compiler proper (\`hsc') from .hc files?
138 GhcWithHscBuiltViaC=NO
140 # Build hsc with -O and turn optimising flag on when compiling
141 # the intermediate C file
142 GhcUseGccForOptAsm=YES
144 # Compile intermediate C file with debugging options set.
145 GhcUseGccForDebuggingAsm=YES
147 # Build a registerised version of hsc and runtime
148 # (you'd be desperate or silly not to).
149 GhcWithRegisterised=YES
151 # Build a compiler with a native code generator backend
152 # (as well as a C backend)
154 # Target platforms supported:
155 # i386, alpha & sparc
156 GhcWithNativeCodeGen=YES
158 # Build the compiler with the deforester included?
162 # Building various ways?
163 # (right now, empty if not).
164 BuildingParallel=$(subst mp,YES,$(filter mp,$(WAYS)))
165 BuildingConcurrent=$(subst mc,YES,$(filter mc,$(WAYS)))
166 BuildingProfiling=$(subst p,YES,$(filter p,$(WAYS)))
167 BuildingGranSim=$(subst mg,YES,$(filter mg,$(WAYS)))
168 BuildingProfilingConcurrent=$(subst mr,YES,$(filter mr,$(WAYS)))
170 #---------------------------------------------------------------
172 # Variables that control how the prelude libraries and runtime system are built
174 # What extra ways to build the libraries in
175 # In addition to the normal sequential way, the default is to also build
176 # profiled prelude libraries.
179 # Option flags to pass to GHC when it's compiling prelude modules
180 # Typically these are things like -O or -dcore-lint
181 # The ones that are *essential* are wired into ghc/lib/Makefile
182 GhcLibHcOpts= -split-objs -odir $(basename $*)
185 #################################################################################
189 # Set of (configurable) options needed by the Haskell libraries (hslibs)
190 # plus their default options (if any).
192 #################################################################################
194 # Build the Haskell Readline bindings?
196 HsLibsWithReadline=NO
198 # Include path to readline.h
199 # (no path == in standard include path)
203 # Build the socket libraries?
205 HsLibsWithSockets=YES
208 # The different ways to build hslibs. Default is just to mirror
209 # what is done for the ghc prelude libraries.
211 HsLibWays=$(GhcLibWays)
213 # Option flags for hslibs are by default the same as for the options
214 # used for the prelude libs (see above).
215 HsLibHcOpts=$(GhcLibHcOpts)
217 #################################################################################
221 # Happy specific options
223 #################################################################################
227 #################################################################################
231 # Haggis specific options
233 #################################################################################
237 #################################################################################
241 # Green-card specific options
243 #################################################################################
246 #################################################################################
250 # nofib specific options
252 #################################################################################
255 # NoFibSubDirs controls which set of tests should be run
256 # You can run one or more of
265 NoFibSubDirs = imaginary spectral real GHC_ONLY PRIVATE
267 # The different ways to build nofib. Default is just to mirror
268 # what is done for the ghc prelude libraries.
270 NoFibWays=$(GhcLibWays)
272 # Haskell compiler options for nofib
275 # ==============================================================================
277 # END OF PROJECT-SPECIFIC STUFF
279 # Now come the generic configuration options
281 # ==============================================================================
283 #################################################################################
285 # Paths (see paths.mk)
287 #################################################################################
291 # FPTOOLS_TOP: the top of the fptools hierarchy, absolute path.
293 FPTOOLS_TOP_ABS = @hardtop@
296 # Installation directories, we don't use half of these,
297 # but since the configure script has them on offer while
298 # passing through, we might as well set them.
301 exec_prefix = @exec_prefix@
303 #UNUSED, see below: libexecdir = @libexecdir@
305 #sysconfdir = @datadir@
306 #sharedstatedir = @sharedstatedir@
307 #localstatedir = @localstatedir@
310 includedir = @includedir@
311 oldincludedir = @oldincludedir@
313 #UNUSED:srcdir = @srcdir@
316 # Default values for most of the above are only set if
317 # they weren't configured to anything in particular
318 # via the configure script. (i.e., we make no assumption
319 # that the autoconf-generated script will assign defaults
320 # to all of the above).
322 ifeq "$(strip $(exec_prefix))" ""
323 exec_prefix = $(prefix)
325 ifeq "$(strip $(bindir))" ""
326 bindir = $(exec_prefix)/bin
330 # NOTE: by intention, libexecdir and libdir point to
332 # => Only way to override this is to set libexecdir= on the command line.
333 # (NOTE: configure script setting is ignored).
334 libexecdir = $(libdir)
336 ifeq "$(strip $(datadir))" ""
337 datadir = $(prefix)/share
339 ifeq "$(strip $(libdir))" ""
340 libdir = $(exec_prefix)/lib
342 ifeq "$(strip $(infodir))" ""
343 infodir = $(prefix)/info
345 ifeq "$(strip $(includedir))" ""
346 includedir = $(prefix)/include
348 ifeq "$(strip $(oldincludedir))" ""
349 oldincludedir = /usr/include
351 ifeq "$(strip $(mandir))" ""
352 mandir = $(prefix)/man
356 #################################################################################
358 # Utilities programs: flags
360 #################################################################################
362 # If you want to give any standard flags to pretty much any utility
363 # (see utils.mk for a complete list), by adding a line here
367 # where P is the utility. For example, to add -O to all Haskell
373 #################################################################################
377 #################################################################################
379 # A "platform" is the GNU cpu-type/manufacturer/operating-system target machine
380 # specifier. E.g. sparc-sun-solaris2
382 HOSTPLATFORM = @HostPlatform@
383 TARGETPLATFORM = @TargetPlatform@
384 BUILDPLATFORM = @HostPlatform@
386 HostPlatform_CPP = @HostPlatform_CPP@
387 HostArch_CPP = @HostArch_CPP@
388 HostOS_CPP = @HostOS_CPP@
389 HostVendor_CPP = @HostVendor_CPP@
392 # ToDo: check if these can be purged now. -- sof
395 @HostPlatform_CPP@_HOST = 1
396 @HostPlatform_CPP@_TARGET = 1
397 @HostPlatform_CPP@_BUILD = 1
399 @HostArch_CPP@_HOST_ARCH = 1
400 @HostArch_CPP@_TARGET_ARCH = 1
401 @HostArch_CPP@_BUILD_ARCH = 1
403 @HostOS_CPP@_HOST_OS = 1
404 @HostOS_CPP@_TARGET_OS = 1
405 @HostOS_CPP@_BUILD_OS = 1
407 @HostVendor_CPP@_HOST_VENDOR = 1
408 @HostVendor_CPP@_TARGET_VENDOR = 1
409 @HostVendor_CPP@_BUILD_VENDOR = 1
411 # Leading underscores on symbol names in object files
412 # Valid options: YES/NO
414 LeadingUnderscore=@LeadingUnderscore@
416 #################################################################################
418 # Utilities programs: where to find them
420 #################################################################################
422 #-----------------------------------------------------------------------------
423 # FPtools Utility locations
425 # By default, the various utils needed to be build ghc and chums
426 # is set up to point to the utils/ directory. Define here the
427 # path prefix for the utilities. Notice that it's a prefix with
428 # a trailing slash, so that it can be concatenated directly on
429 # front of a program name; if it's not set then we just look
430 # along the shell's $(PATH)
432 # If instead you want to use installed or your own versions of these,
433 # override the various *_PREFIX in build.mk, i.e., having the following
438 # will force `make' to rummage around in your PATH to find `fastmake' (not
439 # sure it would need it in the first place, but still).
441 GLAFP_UTILS = $(FPTOOLS_TOP)/glafp-utils
443 SCRIPT_PREFIX = $(GLAFP_UTILS)/scripts/
444 FASTMAKE_PREFIX = $(GLAFP_UTILS)/fastmake/
445 MKDEPENDC_PREFIX = $(GLAFP_UTILS)/mkdependC/
446 LTX_PREFIX = $(GLAFP_UTILS)/ltx/
447 RUNTEST_PREFIX = $(GLAFP_UTILS)/runstdtest/
448 VERBATIM_PREFIX = $(GLAFP_UTILS)/verbatim/
449 ETAGS_PREFIX = $(GLAFP_UTILS)/etags/
450 MSUB_PREFIX = $(GLAFP_UTILS)/msub/
451 LNDIR_PREFIX = $(GLAFP_UTILS)/lndir/
452 MKDIRHIER_PREFIX = $(GLAFP_UTILS)/mkdirhier/
455 LITERATE = $(FPTOOLS_TOP)/literate
457 LITERATE_PREFIX = $(FPTOOLS_TOP)/literate/
458 INFO_PREFIX = $(FPTOOLS_TOP)/literate/info-utils/
459 TEXI2HTML_PREFIX = $(LITERATE_PREFIX)texi2html/
461 HAPPY_PREFIX = $(FPTOOLS_TOP)/happy/src/
463 UNLIT_PREFIX = $(FPTOOLS_TOP)/ghc/utils/unlit/
464 UGEN_PREFIX = $(FPTOOLS_TOP)/ghc/utils/ugen/
465 STAT2RESID_PREFIX = $(FPTOOLS_TOP)/ghc/utils/stat2resid/
466 HP2PS_PREFIX = $(FPTOOLS_TOP)/ghc/utils/hp2ps/
467 HSCPP_PREFIX = $(FPTOOLS_TOP)/ghc/utils/hscpp/
468 HSTAGS_PREFIX = $(FPTOOLS_TOP)/ghc/utils/hstags/
471 #-----------------------------------------------------------------------------
472 # Haskell compiler and mkdependHS
474 HC = $(FPTOOLS_TOP)/ghc/driver/ghc
478 # The compiler proper is built with the 1.2 compiler,
479 # so when building the dependencies, we need mkdependHS
480 # for the 1.2 compiler.
482 MKDEPENDHS_1_2 = mkdependHS-1.2
484 #-----------------------------------------------------------------------------
490 WhatGccIsCalled = gcc
491 ifeq "$(strip $(HaveGcc))" "YES"
492 ifneq "$(strip $(UseGcc))" "YES"
495 CC = $(WhatGccIsCalled)
499 #-----------------------------------------------------------------------------
505 #-----------------------------------------------------------------------------
506 # Other standard (ha!) Unix utilities
509 # Yuckage: for ghc/utils/parallel -- todo: nuke this dependency!!
510 BASH = /usr/local/bin/bash
512 # Could be either gzip or compress
514 COMPRESS = @CompressCmd@
515 COMPRESS_SUFFIX = @CompressSuffix@
517 CONTEXT_DIFF = @ContextDiffCmd@
525 # Sigh - the autoconf macro for INSTALL will subst a relative path to the fallback
526 # install-sh script (if chosen). This not terribly useful to us, so we convert
527 # it into an abs. path.
529 INSTALL := $(subst .././install-sh,$(FPTOOLS_TOP_ABS)/install-sh,$(INSTALL))
538 PREPROCESSCMD = $(CC) -E
545 # In emergency situations, REAL_SHELL is used to perform shell commands
546 # from within the ghc driver script, by scribbling the command line to
547 # a temp file and then having $(REAL_SHELL) execute it.
549 # The reason for having to do this is that overly long command lines
550 # cause unnecessary trouble with some shells (e.g., /bin/sh on Solaris
551 # 2.5.1), which is why this backdoor is provided. The situation of overly
552 # long command lines is either encountered while doing `make boot' in ghc/compiler,
553 # or when linking the compiler binary (`hsc').
555 # We do not use SHELL to execute long commands, as `make' will more than likely
556 # override whatever setting you have in your environment while executing.
558 # By default, REAL_SHELL is set equal SHELL, which is not really a smart move
559 # as it SHELL that will show up the bogosity in the first place, but setting
560 # it to anything else isn't really portable.
562 # ====> If long command lines cause you trouble, invoke `ghc' (via `make' or otherwise)
563 # with REAL_SHELL set to something else than /bin/sh, for instance, your favourite
571 # This is special to literate/, ToDo: add literate-specific
572 # configure setup to literate/.
577 TGRIND_HELPER = /usr/local/lib/tgrind/tfontedpr # XXX
586 #-----------------------------------------------------------------------------
587 # FPtools support software
589 # Stuff from fptools/glafp-utils
590 MKDEPENDC = $(MKDEPENDC_PREFIX)mkdependC
591 FASTMAKE = $(FASTMAKE_PREFIX)fastmake
592 LTX = $(LTX_PREFIX)ltx
593 MKDIRHIER = $(MKDIRHIER_PREFIX)mkdirhier
594 LNDIR = $(LNDIR_PREFIX)lndir
595 MSUB = $(MSUB_PREFIX)msub
596 ETAGS = $(ETAGS_PREFIX)etags
597 VERBATIM = $(VERBATIM_PREFIX)verbatim
598 RUNTEST = $(RUNTEST_PREFIX)runstdtest
603 HAPPY = $(HAPPY_PREFIX)happy
607 # Stuff from fptools/literate
609 INFO = $(UTIL_PREFIX)info
610 MAKEINFO = $(INFO_PREFIX)makeinfo
611 POSTMAKEINFO = $(INFO_PREFIX)postmakeinfo
612 LIT2PGM = $(LITERATE_PREFIX)lit2pgm
613 LIT2TEXI = $(LITERATE_PREFIX)lit2texi
614 LIT2HTML = $(LITERATE_PREFIX)lit2html
615 LIT2LATEX = $(LITERATE_PREFIX)lit2latex
616 MKDEPENDLIT = $(LITERATE_PREFIX)mkdependlit
617 LIT2CHANGELOG = $(LITERATE_PREFIX)lit2changelog
618 LIT2TEXT = $(LITERATE_PREFIX)lit2text
619 TEXI2HTML = $(TEXI2HTML_PREFIX)texi2html
622 # Stuff from fptools/ghc/utils
624 UNLIT = $(UNLIT_PREFIX)unlit
625 UGEN = $(UGEN_PREFIX)ugen
626 STAT2RESID = $(STAT2RESID_PREFIX)stat2resid
627 HP2PS = $(HP2PS_PREFIX)hp2ps
628 HSCPP = $(HSCPP_PREFIX)hscpp
629 HSTAGS = $(HSTAGS_PREFIX)hstags
632 # Options for the compiling different `ways'. Various projects within
633 # the glorious fptools tree support building in various user-configured
634 # ways. For instance, you could set up one `way' such that the prelude
635 # libraries and hslibs all were built with the option -ffoldr-build-on.
637 # To configure up your own way, have a look at some of the standard ways
638 # such as profiling, and create your own set of WAY_*_OPTS defs below.
639 # After having done that, add your way string to WAYS, and after having
640 # run the configure script, the different projects will add the new way
641 # to the list of ways they support.
645 # IMPORTANT! The WAYS variable configures the different `ways'
646 # you want to build a project (or maybe just parts of it, as is
647 # the case for ghc/). This variable is intended set inside the
648 # project mk setup, enforcing a global fptools WAYS is a bit too
649 # much (do you *really* want to build glafp-utils the profiled-concurrent
654 # Definitions of the different ways:
658 # - description, e.g., profiling
659 # * what they mean to the driver:
660 # - WAY_p_HC_OPTS gives the list of command-line options
665 # The ways currently defined.
667 ALL_WAYS=p t u mc mr mt mp mg 1s 2s du a b c d e f g h i j k l m n o A B
670 # The following ways currently have treated specially, p u t mc mt my mp mg 1s 2d du,
671 # as the driver script treats these guys specially and needs to carefully be told
672 # about the options for these. Hence, we hide the required command line options
673 # for these in the ghc/driver, as this is the only place they are needed.
675 # If you want to add to these default options, fill in the variables below:
681 WAY_t_NAME=ticky-ticky profiling
682 WAY_t_HC_OPTS= -ticky
685 WAY_u_NAME=unregisterized (using portable C only)
688 # Way `mc': concurrent
689 WAY_mc_NAME=concurrent
690 WAY_mc_HC_OPTS=-concurrent
693 WAY_mr_NAME=profiled concurrent
694 WAY_mr_HC_OPTS=-prof -concurrent
697 WAY_mt_NAME=ticky-ticky concurrent
698 WAY_mt_HC_OPTS=-ticky -concurrent
702 WAY_mp_HC_OPTS=-parallel
708 WAY_mg_HC_OPTS=-gransim
711 # Ways for different garbage collectors
713 WAY_2s_NAME=2-space GC
716 WAY_1s_NAME=1-space GC
719 WAY_du_NAME=dual-mode GC
723 # Add user-way configurations here: