[project @ 1996-01-18 16:33:17 by partain]
[ghc-hetmet.git] / ghc / mkworld / only4-ghc.jm
1 # line 8 "mkworld/only4-ghc.ljm"
2 /* Project identification - name and version */
3
4 #ifndef ProjectName
5 #define ProjectName     The Glorious Glasgow Haskell Compilation System
6 #endif
7 /* ProjectVersion is something printable */
8 #ifndef ProjectVersion
9 #define ProjectVersion  0.27
10 #endif
11 /* A patchlevel change is something *very minor* */
12 #ifndef ProjectPatchLevel
13 #define ProjectPatchLevel patchlevel 0
14 #endif
15 /* GhcBuildeeVersion is something CPP-testable (ProjectVersion * 100) */
16 #ifndef GhcBuildeeVersion
17 #define GhcBuildeeVersion  27
18 #endif
19 # line 29 "mkworld/only4-ghc.ljm"
20 /* state of the source world */
21 GHC_DRIVERSRC    = $(TOP)/ghc/driver
22 GHC_COMPILERSRC  = $(TOP)/ghc/compiler
23 GHC_RUNTIMESRC   = $(TOP)/ghc/runtime
24 GHC_LIBSRC       = $(TOP)/ghc/lib
25 GHC_INCLUDESRC   = $(TOP)/ghc/includes
26 GHC_UTILSRC      = $(TOP)/ghc/utils
27 GHC_BOOKSRC      = $(TOP)/ghc/book
28 # line 41 "mkworld/only4-ghc.ljm"
29 #ifndef GhcIncludesDir
30 #define GhcIncludesDir $(GHC_INCLUDESRC)
31 #endif
32 GHC_INCLUDES = GhcIncludesDir
33 # line 51 "mkworld/only4-ghc.ljm"
34 #ifndef AllProjectsGhcOpts
35 #define AllProjectsGhcOpts /*none*/
36 #endif
37
38 #ifndef PlatformGhcOpts
39 #define PlatformGhcOpts /*none*/
40 #endif
41
42 #if HaskellCompilerType == HC_CHALMERS_HBC
43 GHC_RTS_STYLE = 'hbc'
44 #else
45 # if HaskellCompilerType == HC_ROJEMO_NHC
46 GHC_RTS_STYLE = 'ghc' /* wrong, but more likely to trigger something */
47 # else
48 GHC_RTS_STYLE = 'ghc'
49 # endif
50 #endif
51
52 #ifndef ProjectGhcOpts
53 #define ProjectGhcOpts -hi-diffs -dcore-lint -link-chk
54 #endif /* ! ProjectGhcOpts */
55
56 #ifndef SetupGhcOpts
57 #define SetupGhcOpts /*none*/
58 #endif
59
60 GenerateOptionsMakeVars(GHC,OPTS,AllProjectsGhcOpts,PlatformGhcOpts,ProjectGhcOpts,SetupGhcOpts)
61
62 GHCFLAGS=$(GLUED_CPP_DEFINES) $(GLUED_GHC_OPTS)
63 # line 95 "mkworld/only4-ghc.ljm"
64 /* build York interpreter as well as Glasgow compiler
65 */
66 #ifndef BuildYorkInterpreter
67 #define BuildYorkInterpreter NO
68 #endif
69
70 /* incorporate Semantique strictness analyser into the compiler;
71    it analyses, but the info generated is *UNUSED* :-(
72  */
73 #ifndef UseSemantiqueStrictnessAnalyser
74 #define UseSemantiqueStrictnessAnalyser NO
75 #endif
76 # line 116 "mkworld/only4-ghc.ljm"
77 /* defaults for which pieces should be installed */
78 /* ToDo: possibly obsolete */
79 #ifndef DoInstallGHCSystem
80 #define DoInstallGHCSystem      YES
81 #endif /* DoInstallGHCSystem */
82 # line 124 "mkworld/only4-ghc.ljm"
83 /* ------------------------------------------------------------------ */
84 /* compiler-proper subsystem:
85     the lib/data bits are installed w/ a version number as well
86 */
87
88 #ifndef InstBinDir_GHC
89 # if AT_GLASGOW
90 #  define InstBinDir_GHC $(exec_prefix_GHC)/bin/`/usr/local/gnu/bin/hw_os`
91 # else
92 #  define InstBinDir_GHC $(exec_prefix_GHC)/bin
93 # endif
94 #endif
95
96 /* scripts are platform-independent */
97 #ifndef InstScriptDir_GHC
98 #define InstScriptDir_GHC $(exec_prefix_GHC)/bin
99 #endif
100
101 /* main "internally-used-by-GHC" stuff */
102 #ifndef InstLibDir_GHC
103 #define InstLibDir_GHC $(prefix_GHC)/lib/ghc/$(PROJECTVERSION)/$(HOSTPLATFORM)
104 #endif
105
106 /* "data" is defined (by WDP) to be platform-independent library stuff */
107 #ifndef InstDataDir_GHC
108 #define InstDataDir_GHC $(prefix_GHC)/lib/ghc/$(PROJECTVERSION)
109 #endif
110
111 prefix_GHC        = InstRootDir_GHC     /* set by configure */
112 exec_prefix_GHC   = InstBinRootDir_GHC  /* ditto */
113 INSTBINDIR_GHC    = InstBinDir_GHC
114 INSTSCRIPTDIR_GHC = InstScriptDir_GHC
115 INSTLIBDIR_GHC    = InstLibDir_GHC
116 INSTDATADIR_GHC   = InstDataDir_GHC
117 # line 183 "mkworld/only4-ghc.ljm"
118 #ifndef GhcDriverInstallName
119 #define GhcDriverInstallName ghc
120 #endif /* ! GhcDriverInstallName */
121 GHC_DRIVER_INST_NAME = GhcDriverInstallName
122 # line 197 "mkworld/only4-ghc.ljm"
123 /* ghc: std driver for compilation system */
124 #ifndef GhcDriverCmd
125 #define GhcDriverCmd $(GHC_DRIVERSRC)/ghc
126 #endif
127
128 /* macro to make sure it has been built */
129 #ifndef GhcDriverNeededHere
130 #define GhcDriverNeededHere(target) \
131 __SomeUtilNeededHere(target,$(GHC),$(GHC_DRIVERSRC),all)
132 #endif
133
134 /* could be GHC_DRIVER, but GHC is its common name */
135 GHC = GhcDriverCmd
136 # line 218 "mkworld/only4-ghc.ljm"
137 #ifndef HsCppCmd
138 #define HsCppCmd $(GHC_HSCPPSRC)/hscpp
139 #endif
140
141 #ifndef HsCppNeededHere
142 #define HsCppNeededHere(target) \
143 __SomeUtilNeededHere(target,$(GHC_HSCPP),$(GHC_HSCPPSRC),hscpp)
144 #endif
145
146 GHC_HSCPP    = HsCppCmd $(ALLPROJ_CPP_DEFINES)
147 GHC_HSCPPSRC = $(GHC_UTILSRC)/hscpp
148 # line 233 "mkworld/only4-ghc.ljm"
149 #ifndef HsParserCmd
150 #define HsParserCmd $(GHC_HSPSRC)/hsp
151 #endif
152
153 #ifndef HsParserNeededHere
154 #define HsParserNeededHere(target) \
155 __SomeUtilNeededHere(target,$(GHC_HSP),$(GHC_HSPSRC),hsp)
156 #endif /* HsParserNeededHere */
157
158 GHC_HSP    = HsParserCmd
159 GHC_HSPSRC = $(GHC_HSCSRC)
160 # line 248 "mkworld/only4-ghc.ljm"
161 #ifndef HsCompilerCmd
162 #define HsCompilerCmd $(GHC_HSCSRC)/hsc
163 #endif
164
165 #ifndef HsCompilerNeededHere
166 #define HsCompilerNeededHere(target) \
167 __SomeUtilNeededHere(target,$(GHC_HSC),$(GHC_HSCSRC),hsc)
168 #endif /* HsCompilerNeededHere */
169
170 GHC_HSC    = HsCompilerCmd
171 GHC_HSCSRC = $(GHC_COMPILERSRC)
172 # line 263 "mkworld/only4-ghc.ljm"
173 #ifndef SysManCmd
174 #define SysManCmd $(GHC_RUNTIMESRC)/gum/SysMan
175 #endif
176
177 #ifndef SysManNeededHere
178 #define SysManNeededHere(target) \
179 __SomeUtilNeededHere(target,$(GHC_SYSMAN),$(GHC_SYSMANSRC),gum/SysMan)
180 #endif /* SysManNeededHere */
181
182 GHC_SYSMAN    = SysManCmd
183 GHC_SYSMANSRC = $(GHC_RUNTIMESRC)
184 # line 318 "mkworld/only4-ghc.ljm"
185 /*  NON-OPTIMISING C COMPILATION: ==================================
186
187     We can use GCC 2.n for the non-optimising (normal) .hc C
188     compilation [use it if we have it]
189 */
190 #ifndef GhcUseGccForDebuggingAsm
191 #if HaveGcc == YES
192 #define GhcUseGccForDebuggingAsm YES
193 #else
194 #define GhcUseGccForDebuggingAsm NO
195 #endif
196 #endif
197
198 #ifndef GhcDebuggingHighLevelAsmCmd
199 #if GhcUseGccForDebuggingAsm == YES
200 #define GhcDebuggingHighLevelAsmCmd WhatGccIsCalled
201 #else
202 #define GhcDebuggingHighLevelAsmCmd $(CC)
203 #endif /* ! gcc */
204 #endif /* GhcDebuggingHighLevelAsmCmd */
205 GHC_DEBUG_HILEV_ASM = GhcDebuggingHighLevelAsmCmd
206 # line 342 "mkworld/only4-ghc.ljm"
207 /*  OPTIMISING C COMPILATION (regs, etc): ==========================
208
209     Must use GCC 2.n for this
210     compilation [OFF by default]
211 */
212 /* We have GCC, which is necessary for optimising the Haskell
213     compiler's C output.
214 */
215 #ifndef GhcUseGccForOptAsm
216 #if HaveGcc == YES
217 #define GhcUseGccForOptAsm YES
218 #else
219 #define GhcUseGccForOptAsm NO
220 #endif
221 #endif
222
223 #ifndef GhcOptHighLevelAsmCmd
224 #if GhcUseGccForOptAsm == YES
225 #define GhcOptHighLevelAsmCmd WhatGccIsCalled
226 GHC_GCC_IS_AVAILABLE = 1
227 #else
228 GHC_GCC_IS_AVAILABLE = 0
229 #endif /* ! gcc */
230 #endif /* GhcOptHighLevelAsmCmd */
231 GHC_OPT_HILEV_ASM = GhcOptHighLevelAsmCmd