[project @ 2001-10-23 13:29:54 by rrt]
[ghc-hetmet.git] / mk / config.mk.in
1 #                                                                -*-makefile-*-
2 # @configure_input@
3 #
4 ################################################################################
5 #
6 #                       config.mk.in-template
7 #
8 #       This file defines all the variables that set the configuration of
9 #       a particular build.
10 #
11 #
12 ################################################################################
13
14 # The configuration is defined in two steps:
15 #
16 #       1. The builder (i.e. the person doing the build)
17 #          copies this file, config.mk.in-template
18 #          to config.mk.in
19 #
20 #       2. S/he then edits it manually (gasp) to reflect any configuration
21 #          options s/he wants.
22 #
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@.
26 #
27 # This is one of only two files that configure generates (the other is config.h)
28 #
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. 
31 #
32
33 # There is a section below for each project within the fptools suite
34 #
35 #       PLUS
36 #
37 # a section corresponding to each of the main .mk files 
38 # included by boilerplate.mk (see boilerplate.mk for a list).
39
40
41 ################################################################################
42 #
43 #               Project-wide platform variables
44 #
45 ################################################################################
46
47 # A "platform" is the GNU cpu-type/manufacturer/operating-system target machine
48 # specifier.  E.g. sparc-sun-solaris2
49
50 HOSTPLATFORM                    = @HostPlatform@
51 TARGETPLATFORM                  = @TargetPlatform@
52 BUILDPLATFORM                   = @HostPlatform@
53
54 # Hack alert:
55 # in one or two places, we need to get at the OS version (major and perhaps even minor),
56 # HostOS_Full is the OS name reported by AC_CANONICAL_SYSTEM.
57 #
58 HostPlatform_CPP                = @HostPlatform_CPP@
59 HostArch_CPP                    = @HostArch_CPP@
60 HostOS_CPP                      = @HostOS_CPP@
61 HostOS_Full                     = @HostOS_Full@
62 HostVendor_CPP                  = @HostVendor_CPP@
63
64 #
65 # ToDo: check if these can be purged now. -- sof
66 #
67
68 @HostPlatform_CPP@_HOST        = 1
69 @HostPlatform_CPP@_TARGET      = 1
70 @HostPlatform_CPP@_BUILD       = 1
71
72 @HostArch_CPP@_HOST_ARCH       = 1
73 @HostArch_CPP@_TARGET_ARCH      = 1
74 @HostArch_CPP@_BUILD_ARCH      = 1
75
76 @HostOS_CPP@_HOST_OS           = 1
77 @HostOS_CPP@_TARGET_OS         = 1
78 @HostOS_CPP@_BUILD_OS          = 1
79
80 @HostVendor_CPP@_HOST_VENDOR    = 1
81 @HostVendor_CPP@_TARGET_VENDOR  = 1
82 @HostVendor_CPP@_BUILD_VENDOR   = 1
83
84 # Leading underscores on symbol names in object files
85 # Valid options: YES/NO
86 #
87 LeadingUnderscore=@LeadingUnderscore@
88
89 # Pin a suffix on executables? If so, what (Windows only).
90 exeext=@exeext@
91
92 ################################################################################
93 #
94 #               project-wide flags
95 #
96 #       Set of options applicable to all fptools projects
97 #
98 ################################################################################
99
100 # BootingFromHc - build GHC and the libraries from .hc files?
101 BootingFromHc = @BootingFromHc@
102
103 # BootingFromUnregisterisedHc - treat .hc files as containing unregisterised
104 # rather than registerised code, i.e., disable the mangler?
105 BootingFromUnregisterisedHc = @BootingFromUnregisterisedHc@
106
107 # build the libs first if we're bootstrapping from .hc files
108 ifeq "$(BootingFromHc)" "YES"
109 AllProjects = glafp-utils hslibs ghc green-card happy hdirect hood nofib
110 else
111 AllProjects = glafp-utils ghc hslibs green-card happy hdirect hood nofib
112 endif
113
114 #
115 # (OPTIONAL) set ProjectsToBuild to a list of projects to be built.  If this
116 # list is empty, then all projects present in the source tree will be built.
117 #
118 ProjectsToBuild =
119
120 #
121 # set ProjectsDontInstall to a list of projects which are normally built but
122 # not installed.
123 #
124 ProjectsDontInstall = glafp-utils nofib
125
126 #
127 # Should the various project tests directories be built?
128 #
129 IncludeTestDirsInBuild=NO
130
131 #
132 # Which ways should SGML documents be built?
133 #
134 SGMLDocWays=
135
136 ################################################################################
137 #
138 #               GHC project
139
140 #       Set of (configurable) options needed by the ghc tree
141 #       plus their default options (if any).
142 #
143 ################################################################################
144
145 #---------------------------------------------------------------
146 #
147 # Variables that control how the compiler itself is built
148 #
149 #---------------------------------------------------------------
150
151 # The compiler used to build GHC is $(GHC).  To change the actual compiler
152 # used, re-configure with --with-ghc=<path-to-ghc>.
153
154 # Extra ways in which to build the compiler (for example, you might want to
155 # build a profiled compiler so you can see where it spends its time)
156 GhcCompilerWays=
157
158 # Extra option flags to pass to the compiler that compiles the compiler
159 # (Ones that are essential are wired into ghc/compiler/Makefile)
160 # Typical options to use here:
161 #
162 #       -DDEBUG         include debugging code and assertions (will make the
163 #                       compiler slower and produce debugging output, but useful
164 #                       for development)
165 #
166 #       -dcore-lint     check the types after every pass of the compiler;
167 #                       a pretty strong internal check of the compiler being
168 #                       used to compile GHC.  Useful when bootstrapping.
169 GhcHcOpts=-Rghc-timing
170
171 # Extra Haskell compiler options to use when compiling all Haskell
172 # *programs* (not libraries), including GHC itself.
173 # Typical options to use here:
174 #
175 #       -H25m           use a bigger heap (to speed up compilation)
176 #
177 #       -O              compile an optimised compiler
178 #
179 FptoolsHcOpts=-O
180
181 # Build a compiler that will build *unregisterised* libraries and
182 # binaries by default.  Unregisterised code is supposed to compile and
183 # run without any support for architecture-specific assembly mangling,
184 # register assignment or tail-calls, and is therefore a good way to get
185 # started when porting GHC to new architectures.
186 #
187 # If this is set to NO, you can still use the unregisterised way
188 # (way 'u') to get unregisterised code, but the default way will be
189 # registerised.
190 #
191 # NOTE: this is not the same as building the compiler itself
192 # unregisterised.  That's done by either (a) bootstrapping with a
193 # compiler that was built with GhcUnregisterized=YES, or (b)
194 # bootstrapping with a compiler that has way 'u' libraries, and the
195 # flag '-unreg' is added to GhcHcOpts above.
196 #
197 GhcUnregisterised=NO
198
199 # Build a compiler with a native code generator backend
200 # (as well as a C backend)
201 #
202 # Target platforms supported:
203 #   i386 & sparc
204 ifneq "$(findstring $(HostArch_CPP), i386 sparc)" ""
205 GhcWithNativeCodeGen=YES
206 else
207 GhcWithNativeCodeGen=NO
208 endif
209
210 HaveLibDL = @HaveLibDL@
211
212 # Include GHCi in the compiler.  Default to NO for the time being.
213
214 ifneq "$(findstring $(HostOS_CPP), mingw32 linux solaris2 freebsd netbsd openbsd)" ""
215 GhcWithInterpreter=YES
216 ifeq "$(HaveLibDL)" "YES"
217 SRC_HC_OPTS += -ldl
218 endif
219 else 
220 GhcWithInterpreter=NO
221 endif
222
223 #
224 # Building various ways?
225 # (right now, empty if not).
226 BuildingParallel=$(subst mp,YES,$(filter mp,$(WAYS)))
227 BuildingGranSim=$(subst mg,YES,$(filter mg,$(WAYS)))
228
229 #------------------------------------------------------------------------------
230 # Options for GHC's Prelude
231
232 # What extra ways to build the libraries in
233 # In addition to the normal sequential way, the default is to also build
234 # profiled prelude libraries.
235 # When booting from .hc files, turn this off.
236 ifeq "$(BootingFromHc)" "YES"
237 GhcLibWays=
238 else
239 GhcLibWays=p
240 endif
241
242 # Option flags to pass to GHC when it's compiling prelude modules
243 # *and* standard library modules (std) *and* modules in hslibs
244 # Typically these are things like -O or -dcore-lint
245 # The ones that are *essential* are wired into ghc/lib/Makefile
246 #
247 #       -O is pretty desirable, otherwise no inlining of prelude
248 #               things (incl "+") happens when compiling with this compiler
249
250 GhcLibHcOpts=-O -Rghc-timing
251
252 # Win32 only: Enable the RTS and libraries to be built as DLLs
253 DLLized=@EnableWin32DLLs@
254
255 # Win32 only: are we building a compiler that tries to reduce external
256 # dependencies? i.e., one that doesn't assume that the user has got
257 # the cygwin toolchain installed on his/her Win32 box.
258 #
259 # GHC is still dependent on GNU tools in the backend (gcc to further process
260 # .c/.hc/.s/.o files + 'perl' to mangle and split), but using this
261 # option a GHC distribution can be put together which includes a minimal
262 # set of these open source tools. 
263 #
264 MinimalUnixDeps=@MinimalUnixDeps@
265
266 # Don't split object files for libs if we're building DLLs, or booting from
267 # .hc files.
268 SplitObjs=YES
269
270 ifeq "$(DLLized)" "YES"
271 SplitObjs=NO
272 endif
273 ifeq "$(BootingFromHc)" "YES"
274 SplitObjs=NO
275 endif
276 ifeq "$(GhcUnregisterised)" "YES"
277 SplitObjs=NO
278 endif
279
280 # Strip local symbols from libraries?  This can make the libraries smaller,
281 # but makes debugging somewhat more difficult.  Doesn't work with all ld's.
282 #
283 StripLibraries=NO
284
285 # ----------------------------------------------------------------------------
286 # Options for GHC's RTS
287
288 # This is a good way to set things like -optc-g and -optc-DDEBUG for the RTS.
289 # GhcRtsHcOpts is used when compiling .hc files and .c files.
290 # GhcRtsCcOpts is used when compiling .c  files only.
291
292 # For a debugging RTS:
293 # GhcRtsHcOpts = -optc-DDEBUG
294 # GhcRtsCcOpts = -g
295
296 # For an optimised RTS:
297 GhcRtsHcOpts=-O2
298 GhcRtsCcOpts=-O2 -fomit-frame-pointer
299
300 # Include the front panel code?  Needs GTK+.
301 GhcRtsWithFrontPanel = NO
302
303 ################################################################################
304 #
305 #               hslibs project
306 #
307 ################################################################################
308
309 # Build HsLibs for which compiler?  
310
311 # If $(HsLibsFor) == hugs or ghc, we assume we're building for the
312 # compiler/interpreter in the same source tree.
313
314 # HsLibsFor = ghc | hugs | nhc | hbc
315 HsLibsFor       = ghc
316
317 # hslibs for GHC also uses the following variables (defined above):
318 #   GhcLibWays, GhcLibHcOpts, GhcLibToolsHcOpts, DLLized, StripLibraries
319
320 # Build the Haskell Readline bindings?
321 #
322 GhcLibsWithReadline=@HaveReadlineHeaders@
323
324 # Libraries needed for linking with readline
325 LibsReadline=@LibsReadline@
326
327 # Include path to readline.h
328 # (no path == in standard include path)
329 #
330 ReadlineIncludePath=
331
332 # Math library
333 LIBM=@LIBM@
334
335 # Build the Haskell OpenGL/GLUT binding?
336 #
337 GhcLibsWithHOpenGL=@GhcLibsWithHOpenGL@
338
339 X_CFLAGS=@X_CFLAGS@
340 X_LIBS=@X_LIBS@
341
342 ################################################################################
343 #
344 #               happy project
345 #
346 #       Happy specific options
347 #
348 ################################################################################
349
350 # The compiler you'd like to use to compile Happy
351 WithHappyHc = @WithHc@
352
353 # HappyHcOpts gives the flags to pass to the Haskell compiler used
354 #             to compile the Happy sources with.
355 #
356 HappyHcOpts = -O
357
358 ################################################################################
359 #
360 #               haggis project
361 #
362 #       Haggis specific options
363 #
364 ################################################################################
365
366 ################################################################################
367 #
368 #               green-card project
369 #
370 #       Green-card specific options
371 #
372 ################################################################################
373
374 ################################################################################
375 #
376 #               nofib project
377 #
378 #       nofib specific options
379 #
380 ################################################################################
381
382 WithNofibHc = $(GHC_INPLACE)
383
384 # NoFibSubDirs controls which set of tests should be run
385 # You can run one or more of
386 #       imaginary 
387 #       spectral
388 #       real
389 #       parallel
390 #       PRIVATE
391 #       PENDING
392 #       UNUSED
393 NoFibSubDirs = imaginary spectral real
394
395 # The different ways to build nofib. Default is just to mirror
396 # what is done for the ghc prelude libraries.
397 #
398 NoFibWays = $(GhcLibWays)
399
400 # Haskell compiler options for nofib
401 NoFibHcOpts = -O
402
403 # ==============================================================================
404 #
405 #                       END OF PROJECT-SPECIFIC STUFF
406 #
407 #               Now come the generic configuration options
408 #
409 # ==============================================================================
410
411 ################################################################################
412 #
413 #               Paths (see paths.mk)
414 #
415 ################################################################################
416
417 # Directory used by GHC (and possibly other tools) for storing
418 # temporary files.  If your TMPDIR isn't big enough, either override
419 # this in build.mk or set your environment variable "TMPDIR" to point
420 # to somewhere with more space.  (TMPDIR=. is a good choice).
421
422 # DEFAULT_TMPDIR isn't called TMPDIR because GNU make tends to
423 # override an environment variable with the value of the make variable
424 # of the same name (if it exists) when executing sub-processes, so
425 # setting the TMPDIR env var would have no effect in the build tree.
426
427 DEFAULT_TMPDIR          = /tmp
428 ifeq "$(TARGETPLATFORM)" "i386-unknown-cygwin32"
429 DEFAULT_TMPDIR          = C:/TEMP
430 endif
431 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
432 DEFAULT_TMPDIR          = C:/TEMP
433 endif
434
435 # FPTOOLS_TOP: the top of the fptools hierarchy, absolute path.
436
437 ifeq "$(findstring $(TARGETPLATFORM), i386-unknown-cygwin32 i386-unknown-mingw32)" ""
438 FPTOOLS_TOP_ABS         = @hardtop@
439 else
440 FPTOOLS_TOP_ABS         = $(subst \,/,$(shell cygpath -w @hardtop@))
441 endif
442 # Keep the Unix-style path to use with Unix tools (e.g. in ghc-inplace script)
443 FPTOOLS_TOP_ABS_UNIX    = @hardtop@
444
445 #
446 # Installation directories, we don't use half of these,
447 # but since the configure script has them on offer while
448 # passing through, we might as well set them.
449
450 prefix                  = @prefix@
451 exec_prefix             = @exec_prefix@
452 bindir                  = @bindir@
453 datadir                 = @datadir@
454
455 #sysconfdir             = @datadir@
456 #sharedstatedir         = @sharedstatedir@
457 #localstatedir          = @localstatedir@
458 libdir                  = @libdir@
459 includedir              = @includedir@
460 oldincludedir           = @oldincludedir@
461 mandir                  = @mandir@
462
463 #UNUSED:infodir         = @infodir@
464 #UNUSED:srcdir          = @srcdir@
465
466 #
467 # override libdir and datadir to put project-specific stuff in
468 # a subdirectory with the version number included.
469 #
470 libdir     := $(if $(ProjectNameShort),$(libdir)/$(ProjectNameShort)-$(ProjectVersion),$(libdir))
471 datadir    := $(if $(ProjectNameShort),$(datadir)/$(ProjectNameShort)-$(ProjectVersion),$(datadir))
472
473
474 # Default values for most of the above are only set if
475 # they weren't configured to anything in particular
476 # via the configure script. (i.e., we make no assumption
477 # that the autoconf-generated script will assign defaults
478 # to all of the above).
479 #
480 ifeq "$(strip $(exec_prefix))" ""
481 exec_prefix             = $(prefix)
482 endif
483 ifeq "$(strip $(bindir))" ""
484 bindir                  = $(exec_prefix)/bin
485 endif
486
487 #
488 # NOTE: by intention, libexecdir and libdir point to 
489 # the same place.
490 #  => Only way to override this is to set libexecdir= on the command line.
491 #     (NOTE: configure script setting is ignored).
492 libexecdir              = $(libdir)
493
494 ifeq "$(strip $(datadir))" ""
495 datadir         = $(prefix)/share
496 endif
497 ifeq "$(strip $(libdir))" ""
498 libdir          = $(exec_prefix)/lib
499 endif
500 ifeq "$(strip $(includedir))" ""
501 includedir      = $(prefix)/include
502 endif
503 ifeq "$(strip $(oldincludedir))" ""
504 oldincludedir   = /usr/include
505 endif
506 ifeq "$(strip $(mandir))" ""
507 mandir          = $(prefix)/man
508 endif
509
510
511 ################################################################################
512 #
513 #               Utilities programs: flags
514 #
515 ################################################################################
516
517 # If you want to give any standard flags to pretty much any utility
518 # (see utils.mk for a complete list), by adding a line here
519 #
520 #       SRC_P_OPTS += ...
521 #
522 # where P is the utility. For example, to add -O to all Haskell
523 # compilations, 
524 #
525 #       SRC_HC_OPTS += -O
526
527 # These flags make flex 8-bit
528 SRC_FLEX_OPTS   += -8
529
530 SRC_INSTALL_BIN_OPTS    += -s
531
532 # lint gets all CPP's flags too
533 SRC_LINT_OPTS           += -axz -DLINT $(SRC_CPP_OPTS)
534 WAY$(_way)_LINT_OPTS    += WAY$(_way)_CPP_OPTS
535
536 # Default fptools options for dllwrap.
537 SRC_BLD_DLL_OPTS += -mno-cygwin --target=i386-mingw32
538
539 # Flags for CPP when running GreenCard on .pgc files
540 GC_CPP_OPTS += -P -E -x c -traditional -D__GLASGOW_HASKELL__
541
542
543 ################################################################################
544 #
545 #               Utilities programs: where to find them
546 #
547 ################################################################################
548
549 #-----------------------------------------------------------------------------
550 # FPtools Utility locations
551
552 # By default, the various utils needed to be build ghc and chums
553 # is set up to point to the utils/ directory. Define here the
554 # path prefix for the utilities. Notice that it's a prefix with
555 # a trailing slash, so that it can be concatenated directly on
556 # front of a program name; if it's not set then we just look
557 # along the shell's $(PATH)
558 #
559 # If instead you want to use installed or your own versions of these,
560 # override the various *_PREFIX in build.mk, i.e., having the following
561 # in build.mk:
562 #
563 #   MKDEPENDC_PREFIX=
564 #
565 # will force `make' to rummage around in your PATH to find `mkdependC' (not
566 # sure it would need it in the first place, but still).
567 #
568 GLAFP_UTILS             = $(FPTOOLS_TOP)/glafp-utils
569
570 SCRIPT_PREFIX           = $(GLAFP_UTILS)/scripts/
571 MKDEPENDC_PREFIX        = $(GLAFP_UTILS)/mkdependC/
572 LTX_PREFIX              = $(GLAFP_UTILS)/ltx/
573 RUNTEST_PREFIX          = $(GLAFP_UTILS)/runstdtest/
574 VERBATIM_PREFIX         = $(GLAFP_UTILS)/verbatim/
575 SGMLVERB_PREFIX         = $(GLAFP_UTILS)/sgmlverb/
576 ETAGS_PREFIX            = $(GLAFP_UTILS)/etags/
577 MSUB_PREFIX             = $(GLAFP_UTILS)/msub/
578 LNDIR_PREFIX            = $(GLAFP_UTILS)/lndir/
579 MKDIRHIER_PREFIX        = $(GLAFP_UTILS)/mkdirhier/
580 DOCBOOK_PREFIX          = $(GLAFP_UTILS)/docbook/
581
582 LITERATE_PREFIX         = $(FPTOOLS_TOP)/literate/
583
584 HAPPY_PREFIX            = $(FPTOOLS_TOP)/happy/src/
585 GREENCARD_PREFIX        = $(FPTOOLS_TOP)/green-card/src/
586
587 UNLIT_PREFIX            = $(FPTOOLS_TOP)/ghc/utils/unlit/
588 HP2PS_PREFIX            = $(FPTOOLS_TOP)/ghc/utils/hp2ps/
589 HSTAGS_PREFIX           = $(FPTOOLS_TOP)/ghc/utils/hstags/
590 HSC2HS_PREFIX           = $(FPTOOLS_TOP)/ghc/utils/hsc2hs/
591
592 #-----------------------------------------------------------------------------
593 # Haskell compilers and mkdependHS
594
595 # $(GHC), $(HBC) and $(NHC) point to installed versions of the relevant
596 # compilers, if available.
597 #
598 # $(HC) is a generic Haskell 98 compiler, set to $(GHC) by default.
599 # $(MKDEPENDHS) is the Haskell dependency generator (ghc -M).
600 #
601 # NOTE: Don't override $(GHC) in build.mk, use configure --with-ghc instead
602 # (because the version numbers have to be calculated).
603
604 GHC             = @WithGhc@
605 GhcVersion      = @GhcVersion@
606 GhcMajVersion   = @GhcMajVersion@
607 GhcMinVersion   = @GhcMinVersion@
608 GhcPatchLevel   = @GhcPatchLevel@
609
610 HBC             = @HBC@
611 NHC             = @NHC@
612
613 HC              = @WithHc@
614 MKDEPENDHS      = $(GHC)
615
616 # Sometimes we want to invoke ghc from the build tree in different
617 # projects (eg. it's handy to have a nofib & a ghc build in the same
618 # tree).  We can refer to "this ghc" as $(GHC_INPLACE):
619
620 GHC_INPLACE     = $(FPTOOLS_TOP)/ghc/compiler/ghc-inplace
621
622 #-----------------------------------------------------------------------------
623 # C compiler
624 #
625 # NB. Don't override $(WhatGccIsCalled) using build.mk,  re-configure using
626 # the flag --with-gcc=<blah> instead.  The reason is that the configure script
627 # needs to know which gcc you're using in order to perform its tests.
628
629 HaveGcc         = @HaveGcc@
630 UseGcc          = YES
631 WhatGccIsCalled = @WhatGccIsCalled@
632 ifeq "$(strip $(HaveGcc))" "YES"
633 ifneq "$(strip $(UseGcc))"  "YES"
634   CC    = cc
635 else
636   CC    = $(WhatGccIsCalled)
637 endif
638 endif
639
640 # default C compiler flags
641 SRC_CC_OPTS = @SRC_CC_OPTS@
642
643 #-----------------------------------------------------------------------------
644 # GMP Library (version 2.0.x or above)
645 #
646 HaveLibGmp      = @HaveLibGmp@
647 LibGmp          = @LibGmp@
648
649 #-----------------------------------------------------------------------------
650 # Regex library 
651 # (if present in libc use that one, otherwise use the one in the tree)
652 #
653 HaveRegex       = @HaveRegex@
654
655 #-----------------------------------------------------------------------------
656 # GTK+
657
658 GTK_CONFIG              = @GTK_CONFIG@
659 GTK_VERSION             = @GTK_VERSION@
660
661 #-----------------------------------------------------------------------------
662 # Flex
663
664 FLEX                    = @LEX@
665 # Don't bother with -lfl, we define our own yywrap()s anyway.
666 FLEX_LIB                = 
667 #WAS:FLEX_LIB           = @LEXLIB@
668
669 #-----------------------------------------------------------------------------
670 # Other standard (ha!) Unix utilities
671
672 AR                      = @ArCmd@
673 ArSupportsInput         = @ArSupportsInput@
674 # Yuckage: for ghc/utils/parallel -- todo: nuke this dependency!!
675 BASH                    = /usr/local/bin/bash
676 #
677 # Could be either gzip or compress
678 #
679 COMPRESS                = @CompressCmd@
680 COMPRESS_SUFFIX         = @CompressSuffix@
681
682 CONTEXT_DIFF            = @ContextDiffCmd@
683 CP                      = cp
684 CPP                     = @CPP@ @CPPFLAGS@
685 CTAGS                   = $(ETAGS)
686 #
687 # RAWCPP_FLAGS are the flags to give to cpp (viz, gcc -E) to persuade it to
688 # behave plausibly on Haskell sources.
689 #
690 RAWCPP_FLAGS            = -undef -traditional
691 FIND                    = @FindCmd@
692 INSTALL                 = @INSTALL@
693 #
694 # Sigh - the autoconf macro for INSTALL will subst a relative path to the fallback
695 # install-sh script (if chosen). This not terribly useful to us, so we convert
696 # it into an abs. path.
697
698 INSTALL                 := $(subst .././install-sh,$(FPTOOLS_TOP_ABS)/install-sh,$(INSTALL))
699 LATEX                   = latex
700 HEVEA                   = hevea
701 HACHA                   = hacha
702 LD                      = ld
703 LN_S                    = @LN_S@
704 MANMACROS               = -man
705 MSMACROS                = -ms
706 MV                      = mv
707 NROFF                   = nroff
708 PERL                    = @PerlCmd@
709 PIC                     = pic
710 PREPROCESSCMD           = $(CC) -E
711 PRINTER                 = lpr
712 RANLIB                  = @RANLIB@
713 RM                      = rm -f
714 SED                     = @SedCmd@
715 SHELL                   = /bin/sh
716 #
717 # In emergency situations, REAL_SHELL is used to perform shell commands
718 # from within the ghc driver script, by scribbling the command line to
719 # a temp file and then having $(REAL_SHELL) execute it. 
720 #
721 # The reason for having to do this is that overly long command lines
722 # cause unnecessary trouble with some shells (e.g., /bin/sh on Solaris
723 # 2.5.1), which is why this backdoor is provided. The situation of overly
724 # long command lines is either encountered while doing `make boot' in ghc/compiler, 
725 # or when linking the compiler binary (`hsc'). 
726 #
727 # We do not use SHELL to execute long commands, as `make' will more than likely
728 # override whatever setting you have in your environment while executing. 
729
730 # By default, REAL_SHELL is set equal to SHELL, which is not really a smart move
731 # as it is SHELL that will show up the bogosity in the first place, but setting
732 # it to anything else isn't really portable.
733 #
734 #  ====> If long command lines cause you trouble, invoke `ghc' (via `make' or otherwise)
735 # with REAL_SHELL set to something else than /bin/sh, for instance, your favourite
736 # command shell.
737 #
738 REAL_SHELL=$(SHELL)
739 SIZE                    = size
740 STRIP                   = strip
741 TAR                     = @TarCmd@
742 ZIP                     = zip
743
744 #
745 # Under Windows, we have to deal with .exe suffixes
746 #
747 EXE_SUFFIX=@exeext@
748
749 #
750 # This is special to literate/, ToDo: add literate-specific
751 # configure setup to literate/.
752 #
753 TBL                     = tbl
754 TEX                     = tex
755 TGRIND                  = tgrind
756 TGRIND_HELPER           = /usr/local/lib/tgrind/tfontedpr # XXX
757 TIB                     = tib
758
759 TIME                    = @TimeCmd@
760 TROFF                   = troff
761 UNAME                   = uname
762 YACC                    = @YaccCmd@
763
764 #-----------------------------------------------------------------------------
765 # SGML stuff
766
767 JADE                    = @JadeCmd@
768
769 SGML2DVI                = $(DOCBOOK_PREFIX)db2dvi
770 SGML2HTML               = $(DOCBOOK_PREFIX)db2html
771 SGML2PS                 = $(DOCBOOK_PREFIX)db2ps
772 SGML2PDF                = $(DOCBOOK_PREFIX)db2pdf
773 SGML2RTF                = $(DOCBOOK_PREFIX)db2rtf
774
775 SGMLSTYLESHEET          = $(FPTOOLS_TOP_ABS)/docs/fptools-both.dsl
776
777 SRC_SGML2DVI_OPTS       = -d $(SGMLSTYLESHEET)
778 SRC_SGML2HTML_OPTS      = -d $(SGMLSTYLESHEET)
779 SRC_SGML2PS_OPTS        = -d $(SGMLSTYLESHEET)
780 SRC_SGML2RTF_OPTS       = -d $(SGMLSTYLESHEET)
781 SRC_SGML2PDF_OPTS       = -d $(SGMLSTYLESHEET)
782
783 DOCBOOK_CATALOG         = @Catalog@
784
785 #-----------------------------------------------------------------------------
786 #               FPtools support software
787
788 # Stuff from fptools/glafp-utils
789 MKDEPENDC               = $(MKDEPENDC_PREFIX)mkdependC
790 LTX                     = $(LTX_PREFIX)ltx
791 MKDIRHIER               = $(MKDIRHIER_PREFIX)mkdirhier
792 LNDIR                   = $(LNDIR_PREFIX)lndir
793 MSUB                    = $(MSUB_PREFIX)msub
794 ETAGS                   = $(ETAGS_PREFIX)etags
795 VERBATIM                = $(VERBATIM_PREFIX)verbatim
796 SGMLVERB                = $(SGMLVERB_PREFIX)sgmlverb
797 RUNTEST                 = $(RUNTEST_PREFIX)runstdtest
798 LX                      = @LxCmd@
799 GREENCARD               = $(FPTOOLS_TOP)/green-card/src/green-card
800
801 BLD_DLL                 = dllwrap
802
803 #
804 # .NET support software
805 #
806 ILX2IL                  = ilx2il
807 ILASM                   = ilasm
808
809 #
810 # Happy
811 #
812 HAPPY                   = @HappyCmd@
813 HAPPY_VERSION           = @HappyVersion@                
814 #
815 # Options to pass to Happy when we're going to compile the output with GHC
816 #
817 GHC_HAPPY_OPTS          = $(shell if ( test `echo $(HAPPY_VERSION) | sed -e "s/\(.*\)\..*/\1/g"` "-gt" "1" || test `echo $(HAPPY_VERSION) | sed -e "s/.*\.\(.*\)/\1/g"` "-ge" "9" ); then echo -agc; else echo -g; fi)
818
819 #
820 # Stuff from fptools/literate
821 #
822 LIT2PGM                 = $(LITERATE_PREFIX)lit2pgm
823 LIT2HTML                = $(LITERATE_PREFIX)lit2html
824 LIT2LATEX               = $(LITERATE_PREFIX)lit2latex
825 MKDEPENDLIT             = $(LITERATE_PREFIX)mkdependlit
826 LIT2CHANGELOG           = $(LITERATE_PREFIX)lit2changelog
827 LIT2TEXT                = $(LITERATE_PREFIX)lit2text
828
829 #
830 # Stuff from fptools/ghc/utils
831 #
832 UNLIT                   = $(UNLIT_PREFIX)unlit$(EXE_SUFFIX)
833 HP2PS                   = $(HP2PS_PREFIX)hp2ps$(EXE_SUFFIX)
834 HSTAGS                  = $(HSTAGS_PREFIX)hstags
835 HSC2HS                  = $(HSC2HS_PREFIX)hsc2hs-inplace
836
837 #
838 # Options for the compiling different `ways'. Various projects within
839 # the glorious fptools tree support building in various user-configured
840 # ways. For instance, you could set up one `way' such that the prelude
841 # libraries all were built with the option -ffoldr-build-on.
842
843 # To configure up your own way, have a look at some of the standard ways
844 # such as profiling, and create your own set of WAY_*_OPTS defs below.
845 # After having done that, add your way string to WAYS, and after having
846 # run the configure script, the different projects will add the new way
847 # to the list of ways they support.
848 #
849
850 #
851 # IMPORTANT! The WAYS variable configures the different `ways'
852 # you want to build a project (or maybe just parts of it, as is
853 # the case for ghc/). This variable is intended set inside the
854 # project mk setup, enforcing a global fptools WAYS is a bit too
855 # much (do you *really* want to build glafp-utils the profiled-concurrent 
856 # way?)
857 #
858
859 #
860 # Definitions of the different ways:
861 #   
862 #   * their name:
863 #          - tag, e.g., p
864 #          - description, e.g., profiling
865 #   * what they mean to the driver:
866 #          - WAY_p_HC_OPTS gives the list of command-line options
867 #            to the driver.
868 #
869
870 #
871 # The ways currently defined.
872 #
873 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
874 USER_WAYS=a b c d e f g h j k l m n o A B
875
876 #
877 # The following ways currently have treated specially, p u t mg,
878 # as the driver script treats these guys specially and needs to carefully be told
879 # about the options for these. Hence, we hide the required command line options
880 # for these in the ghc/driver, as this is the only place they are needed.
881
882 # If you want to add to these default options, fill in the variables below:
883
884 # Way 'i':
885 WAY_i_NAME=ILX
886 WAY_i_HC_OPTS= -filx -fruntime-types
887
888 # Way 'p':
889 WAY_p_NAME=profiling
890 WAY_p_HC_OPTS= -prof
891
892 # Way 't':
893 WAY_t_NAME=ticky-ticky profiling
894 WAY_t_HC_OPTS= -ticky
895
896 # Way `u':
897 WAY_u_NAME=unregisterized (using portable C only)
898 WAY_u_HC_OPTS=-unreg
899
900 # Way `s':
901 WAY_s_NAME=threads (for SMP)
902 WAY_s_HC_OPTS=-smp
903
904 # Way `mp': 
905 WAY_mp_NAME=parallel
906 WAY_mp_HC_OPTS=-parallel
907
908 # Way `mg': 
909 WAY_mg_NAME=GranSim
910 WAY_mg_HC_OPTS=-gransim
911
912 #
913 # Add user-way configurations here:
914 #
915 WAY_A_NAME=
916 WAY_A_HC_OPTS=
917
918 WAY_B_NAME=
919 WAY_B_HC_OPTS=
920
921 WAY_a_NAME=
922 WAY_a_HC_OPTS=
923
924 WAY_b_NAME=
925 WAY_b_HC_OPTS=
926
927 WAY_c_NAME=
928 WAY_c_HC_OPTS=
929
930 WAY_d_NAME=
931 WAY_d_HC_OPTS=
932
933 WAY_e_NAME=
934 WAY_e_HC_OPTS=
935
936 WAY_f_NAME=
937 WAY_f_HC_OPTS=
938
939 WAY_g_NAME=
940 WAY_g_HC_OPTS=
941
942 WAY_h_NAME=
943 WAY_h_HC_OPTS=
944
945 WAY_j_NAME=
946 WAY_j_HC_OPTS=
947
948 WAY_k_NAME=
949 WAY_k_HC_OPTS=
950
951 WAY_l_NAME=
952 WAY_l_HC_OPTS=
953
954 WAY_m_NAME=
955 WAY_m_HC_OPTS=
956
957 WAY_n_NAME=
958 WAY_n_HC_OPTS=
959
960 WAY_o_NAME=
961 WAY_o_HC_OPTS=
962
963 ################################################################################
964 #
965 #               31-bit-Int Core files
966 #
967 ################################################################################
968
969
970 # It is possible to configure the compiler and prelude to support 31-bit
971 # integers, suitable for a back-end and RTS using a tag bit on a 32-bit
972 # architecture.  Currently the only useful output from this option is external Core
973 # files.  The following additions to your build.mk will produce the
974 # 31-bit core output.  Note that this is *not* just a library "way"; the
975 # compiler must be built a special way too.
976
977 # GhcCppOpts +=-DWORD_SIZE_IN_BITS=31
978 # GhcLibHcOpts +=-fext-core -fno-code -DWORD_SIZE_IN_BITS=31
979 # GhcLibCppOpts += -DWORD_SIZE_IN_BITS=31
980 # SplitObjs=NO
981