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