Commit 769ce8e7 authored by partain's avatar partain
Browse files

[project @ 1996-06-27 16:13:29 by partain]

partain 1.3 changes to 960626
parent a7e6cdbf
......@@ -2,33 +2,33 @@
each build is compiled consistently
*/
GHC_OPTS_norm=-O /*-fsemi-tagging*/ -darity-checks-C-only rts_or_lib(-optc-DGCap,)
GHC_OPTS_p =-hisuf _p.hi -O /*-fsemi-tagging*/ -prof -GPrelude rts_or_lib(-optc-DGCap,)
GHC_OPTS_t =-hisuf _t.hi -O /*-fsemi-tagging*/ -ticky -optc-DDEBUG rts_or_lib(-optc-DGCap,)
GHC_OPTS_u =-hisuf _u.hi -O -unregisterised ???? /*-fsemi-tagging*/ -ticky rts_or_lib(-optc-DGCap,)
GHC_OPTS_mc=-hisuf _mc.hi -O -concurrent rts_or_lib(-optc-DGCap,)
GHC_OPTS_mr=-hisuf _mr.hi -O -concurrent -prof -GPrelude rts_or_lib(-optc-DGCap,)
GHC_OPTS_mt=-hisuf _mt.hi -O -concurrent -ticky -optc-DDEBUG rts_or_lib(-optc-DGCap,)
GHC_OPTS_mp=-hisuf _mp.hi -O -parallel rts_or_lib(-optc-DGCap,)
GHC_OPTS_mg=-hisuf _mg.hi -O -gransim rts_or_lib(-optc-DGCap,)
GHC_OPTS_2s=-hisuf _2s.hi -O -gc-2s rts_or_lib(-optc-DGC2s,)
GHC_OPTS_1s=-hisuf _1s.hi -O -gc-1s rts_or_lib(-optc-DGC1s,)
GHC_OPTS_du=-hisuf _du.hi -O -gc-du rts_or_lib(-optc-DGCdu,)
GHC_OPTS_norm=-O rts_or_lib(-optc-DGCap,)
GHC_OPTS_p =-hisuf p_hi -O -prof -GPrelude rts_or_lib(-optc-DGCap,)
GHC_OPTS_t =-hisuf t_hi -O -ticky -optc-DDEBUG rts_or_lib(-optc-DGCap,)
GHC_OPTS_u =-hisuf u_hi -O -unregisterised ???? -ticky rts_or_lib(-optc-DGCap,)
GHC_OPTS_mc=-hisuf mc_hi -O -concurrent rts_or_lib(-optc-DGCap,)
GHC_OPTS_mr=-hisuf mr_hi -O -concurrent -prof -GPrelude rts_or_lib(-optc-DGCap,)
GHC_OPTS_mt=-hisuf mt_hi -O -concurrent -ticky -optc-DDEBUG rts_or_lib(-optc-DGCap,)
GHC_OPTS_mp=-hisuf mp_hi -O -parallel rts_or_lib(-optc-DGCap,)
GHC_OPTS_mg=-hisuf mg_hi -O -gransim rts_or_lib(-optc-DGCap,)
GHC_OPTS_2s=-hisuf 2s_hi -O -gc-2s rts_or_lib(-optc-DGC2s,)
GHC_OPTS_1s=-hisuf 1s_hi -O -gc-1s rts_or_lib(-optc-DGC1s,)
GHC_OPTS_du=-hisuf du_hi -O -gc-du rts_or_lib(-optc-DGCdu,)
/* ToDo: mkworld-ify these user-way opts */
GHC_OPTS_a =-hisuf _a.hi -user-setup-a rts_or_lib(-optc-DGCap,)
GHC_OPTS_b =-hisuf _b.hi -user-setup-b rts_or_lib(-optc-DGCap,)
GHC_OPTS_c =-hisuf _c.hi -user-setup-c rts_or_lib(-optc-DGCap,)
GHC_OPTS_d =-hisuf _d.hi -user-setup-d rts_or_lib(-optc-DGCap,)
GHC_OPTS_e =-hisuf _e.hi -user-setup-e rts_or_lib(-optc-DGCap,)
GHC_OPTS_f =-hisuf _f.hi -user-setup-f rts_or_lib(-optc-DGCap,)
GHC_OPTS_g =-hisuf _g.hi -user-setup-g rts_or_lib(-optc-DGCap,)
GHC_OPTS_h =-hisuf _h.hi -user-setup-h rts_or_lib(-optc-DGCap,)
GHC_OPTS_i =-hisuf _i.hi -user-setup-i rts_or_lib(-optc-DGCap,)
GHC_OPTS_j =-hisuf _j.hi -user-setup-j rts_or_lib(-optc-DGCap,)
GHC_OPTS_k =-hisuf _k.hi -user-setup-k rts_or_lib(-optc-DGCap,)
GHC_OPTS_l =-hisuf _l.hi -user-setup-l rts_or_lib(-optc-DGCap,)
GHC_OPTS_m =-hisuf _m.hi -user-setup-m rts_or_lib(-optc-DGCap,)
GHC_OPTS_n =-hisuf _n.hi -user-setup-n rts_or_lib(-optc-DGCap,)
GHC_OPTS_o =-hisuf _o.hi -user-setup-o rts_or_lib(-optc-DGCap,)
GHC_OPTS_A =-hisuf _A.hi -user-setup-A rts_or_lib(-optc-DGCap,)
GHC_OPTS_B =-hisuf _B.hi -user-setup-B rts_or_lib(-optc-DGCap,)
GHC_OPTS_a =-hisuf a_hi -user-setup-a rts_or_lib(-optc-DGCap,)
GHC_OPTS_b =-hisuf b_hi -user-setup-b rts_or_lib(-optc-DGCap,)
GHC_OPTS_c =-hisuf c_hi -user-setup-c rts_or_lib(-optc-DGCap,)
GHC_OPTS_d =-hisuf d_hi -user-setup-d rts_or_lib(-optc-DGCap,)
GHC_OPTS_e =-hisuf e_hi -user-setup-e rts_or_lib(-optc-DGCap,)
GHC_OPTS_f =-hisuf f_hi -user-setup-f rts_or_lib(-optc-DGCap,)
GHC_OPTS_g =-hisuf g_hi -user-setup-g rts_or_lib(-optc-DGCap,)
GHC_OPTS_h =-hisuf h_hi -user-setup-h rts_or_lib(-optc-DGCap,)
GHC_OPTS_i =-hisuf i_hi -user-setup-i rts_or_lib(-optc-DGCap,)
GHC_OPTS_j =-hisuf j_hi -user-setup-j rts_or_lib(-optc-DGCap,)
GHC_OPTS_k =-hisuf k_hi -user-setup-k rts_or_lib(-optc-DGCap,)
GHC_OPTS_l =-hisuf l_hi -user-setup-l rts_or_lib(-optc-DGCap,)
GHC_OPTS_m =-hisuf m_hi -user-setup-m rts_or_lib(-optc-DGCap,)
GHC_OPTS_n =-hisuf n_hi -user-setup-n rts_or_lib(-optc-DGCap,)
GHC_OPTS_o =-hisuf o_hi -user-setup-o rts_or_lib(-optc-DGCap,)
GHC_OPTS_A =-hisuf A_hi -user-setup-A rts_or_lib(-optc-DGCap,)
GHC_OPTS_B =-hisuf B_hi -user-setup-B rts_or_lib(-optc-DGCap,)
#if 0
%************************************************************************
%* *
\section[mkworld-install-ghc]{Installation stuff for @ghc@ project}
%* *
%************************************************************************
NONE.
#endif
%************************************************************************
%* *
\section[mkworld-install-ghc]{Installation stuff for @ghc@ project}
%* *
%************************************************************************
NONE.
# line 9 "macros-ghc.ljm"
/* ToDo: cmp -> $(CMP) */
#ifndef UgenTarget
#define UgenTarget(fileroot) @@\
ExtraStuffToBeVeryClean(fileroot.c fileroot.h fileroot.hs) @@\
fileroot.c : fileroot.ugn @@\
d=`dirname fileroot.ugn` ; f=`basename fileroot.ugn .ugn` ; \ @@\
$(RM) fileroot.c fileroot.hs "$$d/U_$$f.hs" fileroot.h-SAVE @@\
if [ -f fileroot.h ] ; then $(MV) -f fileroot.h fileroot.h-SAVE ; else exit 0 ; fi @@\
$(UGEN) fileroot.ugn || ( $(RM) fileroot.h fileroot.c fileroot.hs; $(MV) -f fileroot.h-SAVE fileroot.h ) @@\
if cmp -s fileroot.h-SAVE fileroot.h ; then \ @@\
$(MV) -f fileroot.h-SAVE fileroot.h ; \ @@\
else \ @@\
chmod 444 fileroot.h fileroot.c fileroot.hs ; \ @@\
fi @@\
@$(RM) fileroot.h-SAVE @@\
@d=`dirname fileroot.ugn` ; f=`basename fileroot.ugn .ugn` ; \ @@\
$(MV) -f fileroot.hs "$$d/U_$$f.hs" @@\
@@\
fileroot.h : fileroot.c @@\
#define UgenTarget(dir,fileroot) @@\
ExtraStuffToBeVeryClean(dir/fileroot.c dir/fileroot.h dir/fileroot.hs) @@\
dir/fileroot.c dir/CAT3(U_,fileroot,.hs): dir/fileroot.ugn @@\
$(RM) dir/fileroot.c dir/fileroot.hs dir/CAT3(U_,fileroot,.hs) dir/fileroot.h-SAVE @@\
if [ -f dir/fileroot.h ] ; then $(MV) -f dir/fileroot.h dir/fileroot.h-SAVE ; else exit 0 ; fi @@\
$(UGEN) dir/fileroot.ugn || ( $(RM) dir/fileroot.h dir/fileroot.c dir/fileroot.hs; $(MV) -f dir/fileroot.h-SAVE dir/fileroot.h ) @@\
if cmp -s dir/fileroot.h-SAVE dir/fileroot.h ; then \ @@\
$(MV) -f dir/fileroot.h-SAVE dir/fileroot.h ; \ @@\
else \ @@\
chmod 444 dir/fileroot.h dir/fileroot.c dir/fileroot.hs ; \ @@\
fi @@\
@$(RM) dir/fileroot.h-SAVE @@\
$(MV) -f dir/fileroot.hs dir/CAT3(U_,fileroot,.hs) @@\
@@\
dir/fileroot.h : dir/fileroot.c @@\
@: /* no-op */
#endif /* UgenTarget */
%************************************************************************
%* *
\section[mkworld-macros-ghc]{CPP macros for @ghc@ project}
%* *
%************************************************************************
Rule to run the LML-ish \tr{ugen} utility.
\begin{code}
/* ToDo: cmp -> $(CMP) */
#ifndef UgenTarget
#define UgenTarget(fileroot) @@\
ExtraStuffToBeVeryClean(fileroot.c fileroot.h fileroot.hs) @@\
fileroot.c : fileroot.ugn @@\
d=`dirname fileroot.ugn` ; f=`basename fileroot.ugn .ugn` ; \ @@\
$(RM) fileroot.c fileroot.hs "$$d/U_$$f.hs" fileroot.h-SAVE @@\
if [ -f fileroot.h ] ; then $(MV) -f fileroot.h fileroot.h-SAVE ; else exit 0 ; fi @@\
$(UGEN) fileroot.ugn || ( $(RM) fileroot.h fileroot.c fileroot.hs; $(MV) -f fileroot.h-SAVE fileroot.h ) @@\
if cmp -s fileroot.h-SAVE fileroot.h ; then \ @@\
$(MV) -f fileroot.h-SAVE fileroot.h ; \ @@\
else \ @@\
chmod 444 fileroot.h fileroot.c fileroot.hs ; \ @@\
fi @@\
@$(RM) fileroot.h-SAVE @@\
@d=`dirname fileroot.ugn` ; f=`basename fileroot.ugn .ugn` ; \ @@\
$(MV) -f fileroot.hs "$$d/U_$$f.hs" @@\
@@\
fileroot.h : fileroot.c @@\
@: /* no-op */
#endif /* UgenTarget */
\end{code}
# line 8 "mkworld/only4-ghc.ljm"
#if 0
%************************************************************************
%* *
\section[mkworld-only4-ghc]{Extra things ``only for'' for the @ghc@ project}
%* *
%************************************************************************
\begin{code}
#endif /* 0 */
/* Project identification - name and version */
#ifndef ProjectName
......@@ -6,7 +14,7 @@
#endif
/* ProjectVersion is something printable */
#ifndef ProjectVersion
#define ProjectVersion 0.27
#define ProjectVersion 2.01
#endif
/* A patchlevel change is something *very minor* */
#ifndef ProjectPatchLevel
......@@ -14,9 +22,14 @@
#endif
/* GhcBuildeeVersion is something CPP-testable (ProjectVersion * 100) */
#ifndef GhcBuildeeVersion
#define GhcBuildeeVersion 27
#define GhcBuildeeVersion 201
#endif
# line 29 "mkworld/only4-ghc.ljm"
#if 0
\end{code}
Make variables that say where the source to main pieces of the system live:
\begin{code}
#endif /* 0 */
/* state of the source world */
GHC_DRIVERSRC = $(TOP)/ghc/driver
GHC_COMPILERSRC = $(TOP)/ghc/compiler
......@@ -25,12 +38,24 @@ GHC_LIBSRC = $(TOP)/ghc/lib
GHC_INCLUDESRC = $(TOP)/ghc/includes
GHC_UTILSRC = $(TOP)/ghc/utils
GHC_BOOKSRC = $(TOP)/ghc/book
# line 41 "mkworld/only4-ghc.ljm"
#if 0
\end{code}
Include definitions (usually to go with generated C):
\begin{code}
#endif /* 0 */
#ifndef GhcIncludesDir
#define GhcIncludesDir $(GHC_INCLUDESRC)
#endif
GHC_INCLUDES = GhcIncludesDir
# line 51 "mkworld/only4-ghc.ljm"
#if 0
\end{code}
A make variable that's occasionally very important: we use \tr{GHC_*}
when we really mean GHC, rather than \tr{HC*}, which just means ``the
standard Haskell compiler'' (whatever that is).
\begin{code}
#endif /* 0 */
#ifndef AllProjectsGhcOpts
#define AllProjectsGhcOpts /*none*/
#endif
......@@ -60,7 +85,23 @@ GHC_RTS_STYLE = 'ghc'
GenerateOptionsMakeVars(GHC,OPTS,AllProjectsGhcOpts,PlatformGhcOpts,ProjectGhcOpts,SetupGhcOpts)
GHCFLAGS=$(GLUED_CPP_DEFINES) $(GLUED_GHC_OPTS)
# line 95 "mkworld/only4-ghc.ljm"
#if 0
\end{code}
%************************************************************************
%* *
\subsection{What to build}
%* *
%************************************************************************
%************************************************************************
%* *
\subsubsection{Include or leave out these individual ``features''}
%* *
%************************************************************************
\begin{code}
#endif /* 0 */
/* build York interpreter as well as Glasgow compiler
*/
#ifndef BuildYorkInterpreter
......@@ -73,13 +114,23 @@ GHCFLAGS=$(GLUED_CPP_DEFINES) $(GLUED_GHC_OPTS)
#ifndef UseSemantiqueStrictnessAnalyser
#define UseSemantiqueStrictnessAnalyser NO
#endif
# line 116 "mkworld/only4-ghc.ljm"
#if 0
\end{code}
%************************************************************************
%* *
\subsection{Installation: whether to, where to, what to}
%* *
%************************************************************************
\begin{code}
#endif /* 0 */
/* defaults for which pieces should be installed */
/* ToDo: possibly obsolete */
#ifndef DoInstallGHCSystem
#define DoInstallGHCSystem YES
#endif /* DoInstallGHCSystem */
# line 124 "mkworld/only4-ghc.ljm"
/* ------------------------------------------------------------------ */
/* compiler-proper subsystem:
the lib/data bits are installed w/ a version number as well
......@@ -114,12 +165,49 @@ INSTBINDIR_GHC = InstBinDir_GHC
INSTSCRIPTDIR_GHC = InstScriptDir_GHC
INSTLIBDIR_GHC = InstLibDir_GHC
INSTDATADIR_GHC = InstDataDir_GHC
# line 183 "mkworld/only4-ghc.ljm"
#if 0
\end{code}
%************************************************************************
%* *
\subsection{Configuring the driver}
%* *
%************************************************************************
The driver script is the thing that glues the compilation system
together. It needs to know what is/isn't included in the system,
e.g., what garbage-collectors are catered for.
Mkworld records the needed information in make variables (e.g.,
\tr{$(GHC_HSCPP)}), and we then `msub' that into the driver (perl)
script. Note: ALL configuration info should be HERE (not hacked into
the script)!
The first chunk of stuff here is mkworld boilerplate and probably
doesn't need fiddling. Once we get into what C compiler(s) to use for
compiling .hc files, what libraries are available, etc., there may be
something to tweak (but not here -- in a `setup' file, please!) There
are further comments where the tweakables begin...
First, the driver can be installed under any old name; here's the default:
\begin{code}
#endif /* 0 */
#ifndef GhcDriverInstallName
#define GhcDriverInstallName ghc
#endif /* ! GhcDriverInstallName */
GHC_DRIVER_INST_NAME = GhcDriverInstallName
# line 197 "mkworld/only4-ghc.ljm"
#if 0
\end{code}
%************************************************************************
%* *
\subsubsection{Where to find the programs for the various phases}
%* *
%************************************************************************
First, the driver itself:
\begin{code}
#endif /* 0 */
/* ghc: std driver for compilation system */
#ifndef GhcDriverCmd
#define GhcDriverCmd $(GHC_DRIVERSRC)/ghc
......@@ -133,7 +221,16 @@ __SomeUtilNeededHere(target,$(GHC),$(GHC_DRIVERSRC),all)
/* could be GHC_DRIVER, but GHC is its common name */
GHC = GhcDriverCmd
# line 218 "mkworld/only4-ghc.ljm"
#if 0
\end{code}
\tr{unlit}, to de-literatise a source file, is from the HBC
distribution. See utils-ghc.
\tr{hscpp}: runs C pre-processor but converts \tr{#line}s to Haskell pragmas;
is platform-independent.
\begin{code}
#endif /* 0 */
#ifndef HsCppCmd
#define HsCppCmd $(GHC_HSCPPSRC)/hscpp
#endif
......@@ -145,7 +242,12 @@ __SomeUtilNeededHere(target,$(GHC_HSCPP),$(GHC_HSCPPSRC),hscpp)
GHC_HSCPP = HsCppCmd $(ALLPROJ_CPP_DEFINES)
GHC_HSCPPSRC = $(GHC_UTILSRC)/hscpp
# line 233 "mkworld/only4-ghc.ljm"
#if 0
\end{code}
\tr{hsp}: std Haskell parser.
\begin{code}
#endif /* 0 */
#ifndef HsParserCmd
#define HsParserCmd $(GHC_HSPSRC)/hsp
#endif
......@@ -157,7 +259,12 @@ __SomeUtilNeededHere(target,$(GHC_HSP),$(GHC_HSPSRC),hsp)
GHC_HSP = HsParserCmd
GHC_HSPSRC = $(GHC_HSCSRC)
# line 248 "mkworld/only4-ghc.ljm"
#if 0
\end{code}
\tr{hsc}: std Haskell compiler.
\begin{code}
#endif /* 0 */
#ifndef HsCompilerCmd
#define HsCompilerCmd $(GHC_HSCSRC)/hsc
#endif
......@@ -169,7 +276,12 @@ __SomeUtilNeededHere(target,$(GHC_HSC),$(GHC_HSCSRC),hsc)
GHC_HSC = HsCompilerCmd
GHC_HSCSRC = $(GHC_COMPILERSRC)
# line 263 "mkworld/only4-ghc.ljm"
#if 0
\end{code}
\tr{SysMan}: PVM-controlling program for parallel Haskell.
\begin{code}
#endif /* 0 */
#ifndef SysManCmd
#define SysManCmd $(GHC_RUNTIMESRC)/gum/SysMan
#endif
......@@ -181,7 +293,52 @@ __SomeUtilNeededHere(target,$(GHC_SYSMAN),$(GHC_SYSMANSRC),gum/SysMan)
GHC_SYSMAN = SysManCmd
GHC_SYSMANSRC = $(GHC_RUNTIMESRC)
# line 318 "mkworld/only4-ghc.ljm"
#if 0
\end{code}
For an ``assembler'' and a ``linker,'' the driver uses the same
program as it used for C compilation; this means libraries and things
are likely to be picked up correctly.
%************************************************************************
%* *
\subsubsection{Stuff for the C-compiling phase in particular...}
%* *
%************************************************************************
{\em High-level assembler}: C compiler with which to compile \tr{.hc} files.
There are {\em three} things to set:
\begin{enumerate}
\item
C compilers to use:
\begin{itemize}
\item
compiler to use for ``debugging'' compilation (@GHC_DEBUG_HILEV_ASM@)
\item
compiler to use for ``optimising'' compiling (w/ regs magic, etc)
(@GHC_OPT_HILEV_ASM@)
This must be GCC; otherwise opt compiling must be turned off.
\end{itemize}
\item
Whether or not you can do the ``optimising''-style compilation (set
@GHC_GCC_IS_AVAILABLE@).
\end{enumerate}
For options that should always be applied {\em for this project},
set the @ProjectGhcOpts@ variable...
Similarly, for a particular {\em setup}, use @SetupGhcOpts@...
%************************************************************************
%* *
\subsubsubsection{Which C compiler to use (GCC is best)}
%* *
%************************************************************************
\begin{code}
#endif /* 0 */
/* NON-OPTIMISING C COMPILATION: ==================================
We can use GCC 2.n for the non-optimising (normal) .hc C
......@@ -203,7 +360,7 @@ GHC_SYSMANSRC = $(GHC_RUNTIMESRC)
#endif /* ! gcc */
#endif /* GhcDebuggingHighLevelAsmCmd */
GHC_DEBUG_HILEV_ASM = GhcDebuggingHighLevelAsmCmd
# line 342 "mkworld/only4-ghc.ljm"
/* OPTIMISING C COMPILATION (regs, etc): ==========================
Must use GCC 2.n for this
......@@ -229,3 +386,6 @@ GHC_GCC_IS_AVAILABLE = 0
#endif /* ! gcc */
#endif /* GhcOptHighLevelAsmCmd */
GHC_OPT_HILEV_ASM = GhcOptHighLevelAsmCmd
#if 0
\end{code}
#endif /* 0 */
%************************************************************************
%* *
\section[mkworld-only4-ghc]{Extra things ``only for'' for the @ghc@ project}
%* *
%************************************************************************
\begin{code}
/* Project identification - name and version */
#ifndef ProjectName
#define ProjectName The Glorious Glasgow Haskell Compilation System
#endif
/* ProjectVersion is something printable */
#ifndef ProjectVersion
#define ProjectVersion 0.27
#endif
/* A patchlevel change is something *very minor* */
#ifndef ProjectPatchLevel
#define ProjectPatchLevel patchlevel 0
#endif
/* GhcBuildeeVersion is something CPP-testable (ProjectVersion * 100) */
#ifndef GhcBuildeeVersion
#define GhcBuildeeVersion 27
#endif
\end{code}
Make variables that say where the source to main pieces of the system live:
\begin{code}
/* state of the source world */
GHC_DRIVERSRC = $(TOP)/ghc/driver
GHC_COMPILERSRC = $(TOP)/ghc/compiler
GHC_RUNTIMESRC = $(TOP)/ghc/runtime
GHC_LIBSRC = $(TOP)/ghc/lib
GHC_INCLUDESRC = $(TOP)/ghc/includes
GHC_UTILSRC = $(TOP)/ghc/utils
GHC_BOOKSRC = $(TOP)/ghc/book
\end{code}
Include definitions (usually to go with generated C):
\begin{code}
#ifndef GhcIncludesDir
#define GhcIncludesDir $(GHC_INCLUDESRC)
#endif
GHC_INCLUDES = GhcIncludesDir
\end{code}
A make variable that's occasionally very important: we use \tr{GHC_*}
when we really mean GHC, rather than \tr{HC*}, which just means ``the
standard Haskell compiler'' (whatever that is).
\begin{code}
#ifndef AllProjectsGhcOpts
#define AllProjectsGhcOpts /*none*/
#endif
#ifndef PlatformGhcOpts
#define PlatformGhcOpts /*none*/
#endif
#if HaskellCompilerType == HC_CHALMERS_HBC
GHC_RTS_STYLE = 'hbc'
#else
# if HaskellCompilerType == HC_ROJEMO_NHC
GHC_RTS_STYLE = 'ghc' /* wrong, but more likely to trigger something */
# else
GHC_RTS_STYLE = 'ghc'
# endif
#endif
#ifndef ProjectGhcOpts
#define ProjectGhcOpts -hi-diffs -dcore-lint -link-chk
#endif /* ! ProjectGhcOpts */
#ifndef SetupGhcOpts
#define SetupGhcOpts /*none*/
#endif
GenerateOptionsMakeVars(GHC,OPTS,AllProjectsGhcOpts,PlatformGhcOpts,ProjectGhcOpts,SetupGhcOpts)
GHCFLAGS=$(GLUED_CPP_DEFINES) $(GLUED_GHC_OPTS)
\end{code}
%************************************************************************
%* *
\subsection{What to build}
%* *
%************************************************************************
%************************************************************************
%* *
\subsubsection{Include or leave out these individual ``features''}
%* *
%************************************************************************
\begin{code}
/* build York interpreter as well as Glasgow compiler
*/
#ifndef BuildYorkInterpreter
#define BuildYorkInterpreter NO
#endif
/* incorporate Semantique strictness analyser into the compiler;
it analyses, but the info generated is *UNUSED* :-(
*/
#ifndef UseSemantiqueStrictnessAnalyser
#define UseSemantiqueStrictnessAnalyser NO
#endif
\end{code}
%************************************************************************
%* *
\subsection{Installation: whether to, where to, what to}
%* *
%************************************************************************
\begin{code}
/* defaults for which pieces should be installed */
/* ToDo: possibly obsolete */
#ifndef DoInstallGHCSystem
#define DoInstallGHCSystem YES
#endif /* DoInstallGHCSystem */
\end{code}
\begin{code}
/* ------------------------------------------------------------------ */
/* compiler-proper subsystem:
the lib/data bits are installed w/ a version number as well
*/
#ifndef InstBinDir_GHC
# if AT_GLASGOW
# define InstBinDir_GHC $(exec_prefix_GHC)/bin/`/usr/local/gnu/bin/hw_os`
# else
# define InstBinDir_GHC $(exec_prefix_GHC)/bin
# endif
#endif
/* scripts are platform-independent */
#ifndef InstScriptDir_GHC
#define InstScriptDir_GHC $(exec_prefix_GHC)/bin
#endif
/* main "internally-used-by-GHC" stuff */
#ifndef InstLibDir_GHC
#define InstLibDir_GHC $(prefix_GHC)/lib/ghc/$(PROJECTVERSION)/$(HOSTPLATFORM)
#endif
/* "data" is defined (by WDP) to be platform-independent library stuff */
#ifndef InstDataDir_GHC
#define InstDataDir_GHC $(prefix_GHC)/lib/ghc/$(PROJECTVERSION)
#endif
prefix_GHC = InstRootDir_GHC /* set by configure */
exec_prefix_GHC = InstBinRootDir_GHC /* ditto */
INSTBINDIR_GHC = InstBinDir_GHC
INSTSCRIPTDIR_GHC = InstScriptDir_GHC
INSTLIBDIR_GHC = InstLibDir_GHC
INSTDATADIR_GHC = InstDataDir_GHC
\end{code}
%************************************************************************
%* *
\subsection{Configuring the driver}
%* *
%************************************************************************
The driver script is the thing that glues the compilation system
together. It needs to know what is/isn't included in the system,
e.g., what garbage-collectors are catered for.
Mkworld records the needed information in make variables (e.g.,
\tr{$(GHC_HSCPP)}), and we then `msub' that into the driver (perl)
script. Note: ALL configuration info should be HERE (not hacked into
the script)!
The first chunk of stuff here is mkworld boilerplate and probably
doesn't need fiddling. Once we get into what C compiler(s) to use for
compiling .hc files, what libraries are available, etc., there may be
something to tweak (but not here -- in a `setup' file, please!) There
are further comments where the tweakables begin...
First, the driver can be installed under any old name; here's the default:
\begin{code}
#ifndef GhcDriverInstallName
#define GhcDriverInstallName ghc
#endif /* ! GhcDriverInstallName */
GHC_DRIVER_INST_NAME = GhcDriverInstallName
\end{code}
%************************************************************************
%* *
\subsubsection{Where to find the programs for the various phases}
%* *
%************************************************************************
First, the driver itself:
\begin{code}
/* ghc: std driver for compilation system */
#ifndef GhcDriverCmd
#define GhcDriverCmd $(GHC_DRIVERSRC)/ghc
#endif
/* macro to make sure it has been built */