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.04
91 GhcProjectPatchLevel =0
92 GhcBuildeeVersion =204
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@
387 # in one or two places, we need to get at the OS version (major and perhaps even minor),
388 # HOSTPLATFORM_GNU is the cpu-manufacturer-os name reported by AC_CANONICAL_SYSTEM.
390 HostPlatform_GNU = @HostPlatformFull@
391 HostPlatform_CPP = @HostPlatform_CPP@
392 HostArch_CPP = @HostArch_CPP@
393 HostOS_CPP = @HostOS_CPP@
394 HostVendor_CPP = @HostVendor_CPP@
397 # ToDo: check if these can be purged now. -- sof
400 @HostPlatform_CPP@_HOST = 1
401 @HostPlatform_CPP@_TARGET = 1
402 @HostPlatform_CPP@_BUILD = 1
404 @HostArch_CPP@_HOST_ARCH = 1
405 @HostArch_CPP@_TARGET_ARCH = 1
406 @HostArch_CPP@_BUILD_ARCH = 1
408 @HostOS_CPP@_HOST_OS = 1
409 @HostOS_CPP@_TARGET_OS = 1
410 @HostOS_CPP@_BUILD_OS = 1
412 @HostVendor_CPP@_HOST_VENDOR = 1
413 @HostVendor_CPP@_TARGET_VENDOR = 1
414 @HostVendor_CPP@_BUILD_VENDOR = 1
416 # Leading underscores on symbol names in object files
417 # Valid options: YES/NO
419 LeadingUnderscore=@LeadingUnderscore@
421 #################################################################################
423 # Utilities programs: where to find them
425 #################################################################################
427 #-----------------------------------------------------------------------------
428 # FPtools Utility locations
430 # By default, the various utils needed to be build ghc and chums
431 # is set up to point to the utils/ directory. Define here the
432 # path prefix for the utilities. Notice that it's a prefix with
433 # a trailing slash, so that it can be concatenated directly on
434 # front of a program name; if it's not set then we just look
435 # along the shell's $(PATH)
437 # If instead you want to use installed or your own versions of these,
438 # override the various *_PREFIX in build.mk, i.e., having the following
443 # will force `make' to rummage around in your PATH to find `fastmake' (not
444 # sure it would need it in the first place, but still).
446 GLAFP_UTILS = $(FPTOOLS_TOP)/glafp-utils
448 SCRIPT_PREFIX = $(GLAFP_UTILS)/scripts/
449 FASTMAKE_PREFIX = $(GLAFP_UTILS)/fastmake/
450 MKDEPENDC_PREFIX = $(GLAFP_UTILS)/mkdependC/
451 LTX_PREFIX = $(GLAFP_UTILS)/ltx/
452 RUNTEST_PREFIX = $(GLAFP_UTILS)/runstdtest/
453 VERBATIM_PREFIX = $(GLAFP_UTILS)/verbatim/
454 ETAGS_PREFIX = $(GLAFP_UTILS)/etags/
455 MSUB_PREFIX = $(GLAFP_UTILS)/msub/
456 LNDIR_PREFIX = $(GLAFP_UTILS)/lndir/
457 MKDIRHIER_PREFIX = $(GLAFP_UTILS)/mkdirhier/
460 LITERATE = $(FPTOOLS_TOP)/literate
462 LITERATE_PREFIX = $(FPTOOLS_TOP)/literate/
463 INFO_PREFIX = $(FPTOOLS_TOP)/literate/info-utils/
464 TEXI2HTML_PREFIX = $(LITERATE_PREFIX)texi2html/
466 HAPPY_PREFIX = $(FPTOOLS_TOP)/happy/src/
468 UNLIT_PREFIX = $(FPTOOLS_TOP)/ghc/utils/unlit/
469 UGEN_PREFIX = $(FPTOOLS_TOP)/ghc/utils/ugen/
470 STAT2RESID_PREFIX = $(FPTOOLS_TOP)/ghc/utils/stat2resid/
471 HP2PS_PREFIX = $(FPTOOLS_TOP)/ghc/utils/hp2ps/
472 HSCPP_PREFIX = $(FPTOOLS_TOP)/ghc/utils/hscpp/
473 HSTAGS_PREFIX = $(FPTOOLS_TOP)/ghc/utils/hstags/
476 #-----------------------------------------------------------------------------
477 # Haskell compiler and mkdependHS
479 HC = $(FPTOOLS_TOP)/ghc/driver/ghc
483 # The compiler proper is built with the 1.2 compiler,
484 # so when building the dependencies, we need mkdependHS
485 # for the 1.2 compiler.
487 MKDEPENDHS_1_2 = mkdependHS-1.2
489 #-----------------------------------------------------------------------------
495 WhatGccIsCalled = gcc
496 ifeq "$(strip $(HaveGcc))" "YES"
497 ifneq "$(strip $(UseGcc))" "YES"
500 CC = $(WhatGccIsCalled)
504 #-----------------------------------------------------------------------------
510 #-----------------------------------------------------------------------------
511 # Other standard (ha!) Unix utilities
514 # Yuckage: for ghc/utils/parallel -- todo: nuke this dependency!!
515 BASH = /usr/local/bin/bash
517 # Could be either gzip or compress
519 COMPRESS = @CompressCmd@
520 COMPRESS_SUFFIX = @CompressSuffix@
522 CONTEXT_DIFF = @ContextDiffCmd@
530 # Sigh - the autoconf macro for INSTALL will subst a relative path to the fallback
531 # install-sh script (if chosen). This not terribly useful to us, so we convert
532 # it into an abs. path.
534 INSTALL := $(subst .././install-sh,$(FPTOOLS_TOP_ABS)/install-sh,$(INSTALL))
543 PREPROCESSCMD = $(CC) -E
550 # In emergency situations, REAL_SHELL is used to perform shell commands
551 # from within the ghc driver script, by scribbling the command line to
552 # a temp file and then having $(REAL_SHELL) execute it.
554 # The reason for having to do this is that overly long command lines
555 # cause unnecessary trouble with some shells (e.g., /bin/sh on Solaris
556 # 2.5.1), which is why this backdoor is provided. The situation of overly
557 # long command lines is either encountered while doing `make boot' in ghc/compiler,
558 # or when linking the compiler binary (`hsc').
560 # We do not use SHELL to execute long commands, as `make' will more than likely
561 # override whatever setting you have in your environment while executing.
563 # By default, REAL_SHELL is set equal SHELL, which is not really a smart move
564 # as it SHELL that will show up the bogosity in the first place, but setting
565 # it to anything else isn't really portable.
567 # ====> If long command lines cause you trouble, invoke `ghc' (via `make' or otherwise)
568 # with REAL_SHELL set to something else than /bin/sh, for instance, your favourite
576 # This is special to literate/, ToDo: add literate-specific
577 # configure setup to literate/.
582 TGRIND_HELPER = /usr/local/lib/tgrind/tfontedpr # XXX
591 #-----------------------------------------------------------------------------
592 # FPtools support software
594 # Stuff from fptools/glafp-utils
595 MKDEPENDC = $(MKDEPENDC_PREFIX)mkdependC
596 FASTMAKE = $(FASTMAKE_PREFIX)fastmake
597 LTX = $(LTX_PREFIX)ltx
598 MKDIRHIER = $(MKDIRHIER_PREFIX)mkdirhier
599 LNDIR = $(LNDIR_PREFIX)lndir
600 MSUB = $(MSUB_PREFIX)msub
601 ETAGS = $(ETAGS_PREFIX)etags
602 VERBATIM = $(VERBATIM_PREFIX)verbatim
603 RUNTEST = $(RUNTEST_PREFIX)runstdtest
608 HAPPY = $(HAPPY_PREFIX)happy
612 # Stuff from fptools/literate
614 INFO = $(UTIL_PREFIX)info
615 MAKEINFO = $(INFO_PREFIX)makeinfo
616 POSTMAKEINFO = $(INFO_PREFIX)postmakeinfo
617 LIT2PGM = $(LITERATE_PREFIX)lit2pgm
618 LIT2TEXI = $(LITERATE_PREFIX)lit2texi
619 LIT2HTML = $(LITERATE_PREFIX)lit2html
620 LIT2LATEX = $(LITERATE_PREFIX)lit2latex
621 MKDEPENDLIT = $(LITERATE_PREFIX)mkdependlit
622 LIT2CHANGELOG = $(LITERATE_PREFIX)lit2changelog
623 LIT2TEXT = $(LITERATE_PREFIX)lit2text
624 TEXI2HTML = $(TEXI2HTML_PREFIX)texi2html
627 # Stuff from fptools/ghc/utils
629 UNLIT = $(UNLIT_PREFIX)unlit
630 UGEN = $(UGEN_PREFIX)ugen
631 STAT2RESID = $(STAT2RESID_PREFIX)stat2resid
632 HP2PS = $(HP2PS_PREFIX)hp2ps
633 HSCPP = $(HSCPP_PREFIX)hscpp
634 HSTAGS = $(HSTAGS_PREFIX)hstags
637 # Options for the compiling different `ways'. Various projects within
638 # the glorious fptools tree support building in various user-configured
639 # ways. For instance, you could set up one `way' such that the prelude
640 # libraries and hslibs all were built with the option -ffoldr-build-on.
642 # To configure up your own way, have a look at some of the standard ways
643 # such as profiling, and create your own set of WAY_*_OPTS defs below.
644 # After having done that, add your way string to WAYS, and after having
645 # run the configure script, the different projects will add the new way
646 # to the list of ways they support.
650 # IMPORTANT! The WAYS variable configures the different `ways'
651 # you want to build a project (or maybe just parts of it, as is
652 # the case for ghc/). This variable is intended set inside the
653 # project mk setup, enforcing a global fptools WAYS is a bit too
654 # much (do you *really* want to build glafp-utils the profiled-concurrent
659 # Definitions of the different ways:
663 # - description, e.g., profiling
664 # * what they mean to the driver:
665 # - WAY_p_HC_OPTS gives the list of command-line options
670 # The ways currently defined.
672 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
675 # The following ways currently have treated specially, p u t mc mt my mp mg 1s 2d du,
676 # as the driver script treats these guys specially and needs to carefully be told
677 # about the options for these. Hence, we hide the required command line options
678 # for these in the ghc/driver, as this is the only place they are needed.
680 # If you want to add to these default options, fill in the variables below:
686 WAY_t_NAME=ticky-ticky profiling
687 WAY_t_HC_OPTS= -ticky
690 WAY_u_NAME=unregisterized (using portable C only)
693 # Way `mc': concurrent
694 WAY_mc_NAME=concurrent
695 WAY_mc_HC_OPTS=-concurrent
698 WAY_mr_NAME=profiled concurrent
699 WAY_mr_HC_OPTS=-prof -concurrent
702 WAY_mt_NAME=ticky-ticky concurrent
703 WAY_mt_HC_OPTS=-ticky -concurrent
707 WAY_mp_HC_OPTS=-parallel
713 WAY_mg_HC_OPTS=-gransim
716 # Ways for different garbage collectors
718 WAY_2s_NAME=2-space GC
721 WAY_1s_NAME=1-space GC
724 WAY_du_NAME=dual-mode GC
728 # Add user-way configurations here: