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