1 /* This is the Jmakefile for the library stuff.
2 This stuff is all written in (Glasgow-extended) Haskell.
4 Things are organised into exactly one level of subdirs.
6 At the moment, there are a few such subdirs:
8 glaExts -- Glasgow I/O stuff
9 prelude -- std prelude stuff
11 We create one library, libHS.a, with all this stuff in it; note, we
12 make 94 diff flavors of this one library.... sigh
14 (We also build several more "normal" libraries here:
16 hbc -- support various HBC library thingies
17 ghc -- extra GHC-supported libraries
18 contrib -- contributed things, incl off the net
19 haskell-1.3 -- Haskell 1.3 libraries
23 You should probably read the "Prelude and what the compiler knows
24 about it" document before wading in too deeply....
26 For a particular dir/mFoo.hs src file, you'll see many
27 dir/mFoo/mFoo__<number>.o object files.
29 Everything here *must* be compiled w/ the Glasgow Haskell compiler.
30 (Hence the use of $(GHC), rather than $(HC) [the latter is your "standard"
31 Haskell compiler -- whatever you've configured]).
33 If you use EXTRA_HC_OPTS on the command line (which you shouldn't,
34 strictly speaking), it will probably work -- it is pinned onto
35 GHC_OPTS, just for fun.
39 /****************************************************************
41 * Jmakefile preamble-y things *
43 ****************************************************************/
46 #if IncludeTestDirsInBuild == YES
48 #define __ghc_lib_tests_dir tests
50 #define __ghc_lib_tests_dir /* nothing */
53 SUBDIRS = __ghc_lib_tests_dir
55 /* only subdir is the (empty :-() test suite */
56 #define NoAllTargetForSubdirs
57 #define NoDocsTargetForSubdirs
58 #define NoInstallTargetForSubdirs
59 #define NoInstallDocsTargetForSubdirs
60 #define NoDependTargetForSubdirs
61 #define NoTagTargetForSubdirs
63 GhcDriverNeededHere(depend all)
66 /****************************************************************
68 * options used for compiling/etc. things *
70 ****************************************************************/
72 /* The driver will give warnings if -split-objs,
75 GHC_OPTS=-iprelude:glaExts -dcore-lint \
76 -fshow-pragma-name-errs -fshow-import-specs \
77 -optP-genSPECS0 -cpp -fglasgow-exts \
78 -DUSE_FOLDR_BUILD -D__OVERLAPPING_INSTANCES__ \
79 HcMaxHeapFlag $(EXTRA_HC_OPTS)
81 /* For the "Prelude" bits: mostly we do not want it to pick
82 up interface information from anywhere except *here*.
84 -fomit-reexported-instances: we occasionally override
85 this (e.g., on PreludeHi.hs, to create Prelude.hi)
87 PREL_OPTS=-prelude -fno-implicit-prelude -fomit-reexported-instances
89 /* per-build options: shared with RTS */
90 #define rts_or_lib(r,l) l
91 #include "../mkworld/GHC_OPTS"
93 /* this is just friendliness to "hstags" */
94 HSTAGS_OPTS=-fglasgow-exts
96 /****************************************************************
98 * what it is we are compiling; *
99 * these are long and tedious lists, but c'est la guerre *
101 ****************************************************************/
103 /* the actual source bits */
106 glaExts/PreludeErrIO.lhs \
107 glaExts/PreludePrimIO.lhs \
108 glaExts/PreludeGlaST.lhs \
109 glaExts/PreludeDialogueIO.lhs \
111 glaExts/MainIO13.lhs \
113 glaExts/ByteOps.lhs \
115 prelude/PreludeIO.lhs \
116 prelude/PreludeIOError.lhs \
117 prelude/PreludeMonadicIO.lhs \
118 prelude/PreludeReadTextIO.lhs \
119 prelude/PreludeStdIO.lhs \
120 prelude/PreludeWriteTextIO.lhs \
124 prelude/Concurrent.lhs \
125 prelude/ChannelVar.lhs \
126 prelude/Channel.lhs \
127 prelude/Semaphore.lhs \
129 prelude/SampleVar.lhs \
131 prelude/Parallel.lhs \
133 glaExts/PreludeGlaMisc.lhs /* interface */
136 prelude/TysBasic.hs \
139 prelude/TyComplex.hs \
146 prelude/IComplex.hs \
150 prelude/IInteger.hs \
167 prelude/FoldrBuild.hs \
169 prelude/PrelCoreHi.hs /* interface */ \
170 prelude/PreludeHi.hs /* interface */ \
172 prelude/PrelCore13.hs /* interface */ \
173 prelude/Prel13.hs /* interface */
175 #if MakeDoesNestedMacros != YES
177 /* make is brain-dead: use the file created below (w/ a good make) */
178 #include "Jmake.inc1"
180 #else /* good make */
182 print_file_lists : print_file_list1 print_file_list2 print_file_list3 print_file_list4 print_file_list5
184 #define SrcThingVars(blob) @@\
185 CAT2(blob,_HC_norm) = $(CAT2(blob,_HS):.hs=.hc) @@\
186 CAT2(blob,_HC_p) = $(CAT2(blob,_HS):.hs=_p.hc) @@\
187 CAT2(blob,_HC_t) = $(CAT2(blob,_HS):.hs=_t.hc) @@\
188 CAT2(blob,_HC_u) = $(CAT2(blob,_HS):.hs=_u.hc) @@\
189 CAT2(blob,_HC_mc) = $(CAT2(blob,_HS):.hs=_mc.hc) @@\
190 CAT2(blob,_HC_mr) = $(CAT2(blob,_HS):.hs=_mr.hc) @@\
191 CAT2(blob,_HC_mt) = $(CAT2(blob,_HS):.hs=_mt.hc) @@\
192 CAT2(blob,_HC_mp) = $(CAT2(blob,_HS):.hs=_mp.hc) @@\
193 CAT2(blob,_HC_mg) = $(CAT2(blob,_HS):.hs=_mg.hc) @@\
194 CAT2(blob,_HC_2s) = $(CAT2(blob,_HS):.hs=_2s.hc) @@\
195 CAT2(blob,_HC_1s) = $(CAT2(blob,_HS):.hs=_1s.hc) @@\
196 CAT2(blob,_HC_du) = $(CAT2(blob,_HS):.hs=_du.hc) @@\
197 CAT2(blob,_HC_a) = $(CAT2(blob,_HS):.hs=_a.hc) @@\
198 CAT2(blob,_HC_b) = $(CAT2(blob,_HS):.hs=_b.hc) @@\
199 CAT2(blob,_HC_c) = $(CAT2(blob,_HS):.hs=_c.hc) @@\
200 CAT2(blob,_HC_d) = $(CAT2(blob,_HS):.hs=_d.hc) @@\
201 CAT2(blob,_HC_e) = $(CAT2(blob,_HS):.hs=_e.hc) @@\
202 CAT2(blob,_HC_f) = $(CAT2(blob,_HS):.hs=_f.hc) @@\
203 CAT2(blob,_HC_g) = $(CAT2(blob,_HS):.hs=_g.hc) @@\
204 CAT2(blob,_HC_h) = $(CAT2(blob,_HS):.hs=_h.hc) @@\
205 CAT2(blob,_HC_i) = $(CAT2(blob,_HS):.hs=_i.hc) @@\
206 CAT2(blob,_HC_j) = $(CAT2(blob,_HS):.hs=_j.hc) @@\
207 CAT2(blob,_HC_k) = $(CAT2(blob,_HS):.hs=_k.hc) @@\
208 CAT2(blob,_HC_l) = $(CAT2(blob,_HS):.hs=_l.hc) @@\
209 CAT2(blob,_HC_m) = $(CAT2(blob,_HS):.hs=_m.hc) @@\
210 CAT2(blob,_HC_n) = $(CAT2(blob,_HS):.hs=_n.hc) @@\
211 CAT2(blob,_HC_o) = $(CAT2(blob,_HS):.hs=_o.hc) @@\
213 CAT2(blob,_DEP_norm) = $(CAT2(blob,_HC_norm):.hc=.o) @@\
214 CAT2(blob,_DEP_p) = $(CAT2(blob,_HC_p):.hc=.o) @@\
215 CAT2(blob,_DEP_t) = $(CAT2(blob,_HC_t):.hc=.o) @@\
216 CAT2(blob,_DEP_u) = $(CAT2(blob,_HC_u):.hc=.o) @@\
217 CAT2(blob,_DEP_mc) = $(CAT2(blob,_HC_mc):.hc=.o) @@\
218 CAT2(blob,_DEP_mr) = $(CAT2(blob,_HC_mr):.hc=.o) @@\
219 CAT2(blob,_DEP_mt) = $(CAT2(blob,_HC_mt):.hc=.o) @@\
220 CAT2(blob,_DEP_mp) = $(CAT2(blob,_HC_mp):.hc=.o) @@\
221 CAT2(blob,_DEP_mg) = $(CAT2(blob,_HC_mg):.hc=.o) @@\
222 CAT2(blob,_DEP_2s) = $(CAT2(blob,_HC_2s):.hc=.o) @@\
223 CAT2(blob,_DEP_1s) = $(CAT2(blob,_HC_1s):.hc=.o) @@\
224 CAT2(blob,_DEP_du) = $(CAT2(blob,_HC_du):.hc=.o) @@\
225 CAT2(blob,_DEP_a) = $(CAT2(blob,_HC_a):.hc=.o) @@\
226 CAT2(blob,_DEP_b) = $(CAT2(blob,_HC_b):.hc=.o) @@\
227 CAT2(blob,_DEP_c) = $(CAT2(blob,_HC_c):.hc=.o) @@\
228 CAT2(blob,_DEP_d) = $(CAT2(blob,_HC_d):.hc=.o) @@\
229 CAT2(blob,_DEP_e) = $(CAT2(blob,_HC_e):.hc=.o) @@\
230 CAT2(blob,_DEP_f) = $(CAT2(blob,_HC_f):.hc=.o) @@\
231 CAT2(blob,_DEP_g) = $(CAT2(blob,_HC_g):.hc=.o) @@\
232 CAT2(blob,_DEP_h) = $(CAT2(blob,_HC_h):.hc=.o) @@\
233 CAT2(blob,_DEP_i) = $(CAT2(blob,_HC_i):.hc=.o) @@\
234 CAT2(blob,_DEP_j) = $(CAT2(blob,_HC_j):.hc=.o) @@\
235 CAT2(blob,_DEP_k) = $(CAT2(blob,_HC_k):.hc=.o) @@\
236 CAT2(blob,_DEP_l) = $(CAT2(blob,_HC_l):.hc=.o) @@\
237 CAT2(blob,_DEP_m) = $(CAT2(blob,_HC_m):.hc=.o) @@\
238 CAT2(blob,_DEP_n) = $(CAT2(blob,_HC_n):.hc=.o) @@\
239 CAT2(blob,_DEP_o) = $(CAT2(blob,_HC_o):.hc=.o) @@\
241 CAT2(blob,_HIs_p) = $(CAT2(blob,_HIs):.hi=_p.hi) @@\
242 CAT2(blob,_HIs_t) = $(CAT2(blob,_HIs):.hi=_t.hi) @@\
243 CAT2(blob,_HIs_u) = $(CAT2(blob,_HIs):.hi=_u.hi) @@\
244 CAT2(blob,_HIs_mc) = $(CAT2(blob,_HIs):.hi=_mc.hi) @@\
245 CAT2(blob,_HIs_mr) = $(CAT2(blob,_HIs):.hi=_mr.hi) @@\
246 CAT2(blob,_HIs_mt) = $(CAT2(blob,_HIs):.hi=_mt.hi) @@\
247 CAT2(blob,_HIs_mp) = $(CAT2(blob,_HIs):.hi=_mp.hi) @@\
248 CAT2(blob,_HIs_mg) = $(CAT2(blob,_HIs):.hi=_mg.hi) @@\
249 CAT2(blob,_HIs_2s) = $(CAT2(blob,_HIs):.hi=_2s.hi) @@\
250 CAT2(blob,_HIs_1s) = $(CAT2(blob,_HIs):.hi=_1s.hi) @@\
251 CAT2(blob,_HIs_du) = $(CAT2(blob,_HIs):.hi=_du.hi) @@\
252 CAT2(blob,_HIs_a) = $(CAT2(blob,_HIs):.hi=_a.hi) @@\
253 CAT2(blob,_HIs_b) = $(CAT2(blob,_HIs):.hi=_b.hi) @@\
254 CAT2(blob,_HIs_c) = $(CAT2(blob,_HIs):.hi=_c.hi) @@\
255 CAT2(blob,_HIs_d) = $(CAT2(blob,_HIs):.hi=_d.hi) @@\
256 CAT2(blob,_HIs_e) = $(CAT2(blob,_HIs):.hi=_e.hi) @@\
257 CAT2(blob,_HIs_f) = $(CAT2(blob,_HIs):.hi=_f.hi) @@\
258 CAT2(blob,_HIs_g) = $(CAT2(blob,_HIs):.hi=_g.hi) @@\
259 CAT2(blob,_HIs_h) = $(CAT2(blob,_HIs):.hi=_h.hi) @@\
260 CAT2(blob,_HIs_i) = $(CAT2(blob,_HIs):.hi=_i.hi) @@\
261 CAT2(blob,_HIs_j) = $(CAT2(blob,_HIs):.hi=_j.hi) @@\
262 CAT2(blob,_HIs_k) = $(CAT2(blob,_HIs):.hi=_k.hi) @@\
263 CAT2(blob,_HIs_l) = $(CAT2(blob,_HIs):.hi=_l.hi) @@\
264 CAT2(blob,_HIs_m) = $(CAT2(blob,_HIs):.hi=_m.hi) @@\
265 CAT2(blob,_HIs_n) = $(CAT2(blob,_HIs):.hi=_n.hi) @@\
266 CAT2(blob,_HIs_o) = $(CAT2(blob,_HIs):.hi=_o.hi)
269 #define PrintFileStuff(blob,outf) \
270 @echo 'IfGhcBuild_normal(' CAT2(blob,_HC_norm) = $(CAT2(blob,_HC_norm)) ')' >> outf @@\
271 @echo 'IfGhcBuild_normal(' CAT2(blob,_DEP_norm) = $(CAT2(blob,_DEP_norm)) ')' >> outf @@\
272 @echo 'IfGhcBuild_p(' CAT2(blob,_HC_p) = $(CAT2(blob,_HC_p)) ')' >> outf @@\
273 @echo 'IfGhcBuild_t(' CAT2(blob,_HC_t) = $(CAT2(blob,_HC_t)) ')' >> outf @@\
274 @echo 'IfGhcBuild_u(' CAT2(blob,_HC_u) = $(CAT2(blob,_HC_u)) ')' >> outf @@\
275 @echo 'IfGhcBuild_mc(' CAT2(blob,_HC_mc) = $(CAT2(blob,_HC_mc)) ')' >> outf @@\
276 @echo 'IfGhcBuild_mr(' CAT2(blob,_HC_mr) = $(CAT2(blob,_HC_mr)) ')' >> outf @@\
277 @echo 'IfGhcBuild_mt(' CAT2(blob,_HC_mt) = $(CAT2(blob,_HC_mt)) ')' >> outf @@\
278 @echo 'IfGhcBuild_mp(' CAT2(blob,_HC_mp) = $(CAT2(blob,_HC_mp)) ')' >> outf @@\
279 @echo 'IfGhcBuild_mg(' CAT2(blob,_HC_mg) = $(CAT2(blob,_HC_mg)) ')' >> outf @@\
280 @echo 'IfGhcBuild_2s(' CAT2(blob,_HC_2s) = $(CAT2(blob,_HC_2s)) ')' >> outf @@\
281 @echo 'IfGhcBuild_1s(' CAT2(blob,_HC_1s) = $(CAT2(blob,_HC_1s)) ')' >> outf @@\
282 @echo 'IfGhcBuild_du(' CAT2(blob,_HC_du) = $(CAT2(blob,_HC_du)) ')' >> outf @@\
283 @echo 'IfGhcBuild_a(' CAT2(blob,_HC_a) = $(CAT2(blob,_HC_a)) ')' >> outf @@\
284 @echo 'IfGhcBuild_b(' CAT2(blob,_HC_b) = $(CAT2(blob,_HC_b)) ')' >> outf @@\
285 @echo 'IfGhcBuild_c(' CAT2(blob,_HC_c) = $(CAT2(blob,_HC_c)) ')' >> outf @@\
286 @echo 'IfGhcBuild_d(' CAT2(blob,_HC_d) = $(CAT2(blob,_HC_d)) ')' >> outf @@\
287 @echo 'IfGhcBuild_e(' CAT2(blob,_HC_e) = $(CAT2(blob,_HC_e)) ')' >> outf @@\
288 @echo 'IfGhcBuild_f(' CAT2(blob,_HC_f) = $(CAT2(blob,_HC_f)) ')' >> outf @@\
289 @echo 'IfGhcBuild_g(' CAT2(blob,_HC_g) = $(CAT2(blob,_HC_g)) ')' >> outf @@\
290 @echo 'IfGhcBuild_h(' CAT2(blob,_HC_h) = $(CAT2(blob,_HC_h)) ')' >> outf @@\
291 @echo 'IfGhcBuild_i(' CAT2(blob,_HC_i) = $(CAT2(blob,_HC_i)) ')' >> outf @@\
292 @echo 'IfGhcBuild_j(' CAT2(blob,_HC_j) = $(CAT2(blob,_HC_j)) ')' >> outf @@\
293 @echo 'IfGhcBuild_k(' CAT2(blob,_HC_k) = $(CAT2(blob,_HC_k)) ')' >> outf @@\
294 @echo 'IfGhcBuild_l(' CAT2(blob,_HC_l) = $(CAT2(blob,_HC_l)) ')' >> outf @@\
295 @echo 'IfGhcBuild_m(' CAT2(blob,_HC_m) = $(CAT2(blob,_HC_m)) ')' >> outf @@\
296 @echo 'IfGhcBuild_n(' CAT2(blob,_HC_n) = $(CAT2(blob,_HC_n)) ')' >> outf @@\
297 @echo 'IfGhcBuild_o(' CAT2(blob,_HC_o) = $(CAT2(blob,_HC_o)) ')' >> outf @@\
298 @echo 'IfGhcBuild_p(' CAT2(blob,_DEP_p) = $(CAT2(blob,_DEP_p)) ')' >> outf @@\
299 @echo 'IfGhcBuild_t(' CAT2(blob,_DEP_t) = $(CAT2(blob,_DEP_t)) ')' >> outf @@\
300 @echo 'IfGhcBuild_u(' CAT2(blob,_DEP_u) = $(CAT2(blob,_DEP_u)) ')' >> outf @@\
301 @echo 'IfGhcBuild_mc(' CAT2(blob,_DEP_mc) = $(CAT2(blob,_DEP_mc)) ')' >> outf @@\
302 @echo 'IfGhcBuild_mr(' CAT2(blob,_DEP_mr) = $(CAT2(blob,_DEP_mr)) ')' >> outf @@\
303 @echo 'IfGhcBuild_mt(' CAT2(blob,_DEP_mt) = $(CAT2(blob,_DEP_mt)) ')' >> outf @@\
304 @echo 'IfGhcBuild_mp(' CAT2(blob,_DEP_mp) = $(CAT2(blob,_DEP_mp)) ')' >> outf @@\
305 @echo 'IfGhcBuild_mg(' CAT2(blob,_DEP_mg) = $(CAT2(blob,_DEP_mg)) ')' >> outf @@\
306 @echo 'IfGhcBuild_2s(' CAT2(blob,_DEP_2s) = $(CAT2(blob,_DEP_2s)) ')' >> outf @@\
307 @echo 'IfGhcBuild_1s(' CAT2(blob,_DEP_1s) = $(CAT2(blob,_DEP_1s)) ')' >> outf @@\
308 @echo 'IfGhcBuild_du(' CAT2(blob,_DEP_du) = $(CAT2(blob,_DEP_du)) ')' >> outf @@\
309 @echo 'IfGhcBuild_a(' CAT2(blob,_DEP_a) = $(CAT2(blob,_DEP_a)) ')' >> outf @@\
310 @echo 'IfGhcBuild_b(' CAT2(blob,_DEP_b) = $(CAT2(blob,_DEP_b)) ')' >> outf @@\
311 @echo 'IfGhcBuild_c(' CAT2(blob,_DEP_c) = $(CAT2(blob,_DEP_c)) ')' >> outf @@\
312 @echo 'IfGhcBuild_d(' CAT2(blob,_DEP_d) = $(CAT2(blob,_DEP_d)) ')' >> outf @@\
313 @echo 'IfGhcBuild_e(' CAT2(blob,_DEP_e) = $(CAT2(blob,_DEP_e)) ')' >> outf @@\
314 @echo 'IfGhcBuild_f(' CAT2(blob,_DEP_f) = $(CAT2(blob,_DEP_f)) ')' >> outf @@\
315 @echo 'IfGhcBuild_g(' CAT2(blob,_DEP_g) = $(CAT2(blob,_DEP_g)) ')' >> outf @@\
316 @echo 'IfGhcBuild_h(' CAT2(blob,_DEP_h) = $(CAT2(blob,_DEP_h)) ')' >> outf @@\
317 @echo 'IfGhcBuild_i(' CAT2(blob,_DEP_i) = $(CAT2(blob,_DEP_i)) ')' >> outf @@\
318 @echo 'IfGhcBuild_j(' CAT2(blob,_DEP_j) = $(CAT2(blob,_DEP_j)) ')' >> outf @@\
319 @echo 'IfGhcBuild_k(' CAT2(blob,_DEP_k) = $(CAT2(blob,_DEP_k)) ')' >> outf @@\
320 @echo 'IfGhcBuild_l(' CAT2(blob,_DEP_l) = $(CAT2(blob,_DEP_l)) ')' >> outf @@\
321 @echo 'IfGhcBuild_m(' CAT2(blob,_DEP_m) = $(CAT2(blob,_DEP_m)) ')' >> outf @@\
322 @echo 'IfGhcBuild_n(' CAT2(blob,_DEP_n) = $(CAT2(blob,_DEP_n)) ')' >> outf @@\
323 @echo 'IfGhcBuild_o(' CAT2(blob,_DEP_o) = $(CAT2(blob,_DEP_o)) ')' >> outf @@\
324 @echo 'IfGhcBuild_p(' CAT2(blob,_HIs_p) = $(CAT2(blob,_HIs_p)) ')' >> outf @@\
325 @echo 'IfGhcBuild_t(' CAT2(blob,_HIs_t) = $(CAT2(blob,_HIs_t)) ')' >> outf @@\
326 @echo 'IfGhcBuild_u(' CAT2(blob,_HIs_u) = $(CAT2(blob,_HIs_u)) ')' >> outf @@\
327 @echo 'IfGhcBuild_mc(' CAT2(blob,_HIs_mc) = $(CAT2(blob,_HIs_mc)) ')' >> outf @@\
328 @echo 'IfGhcBuild_mr(' CAT2(blob,_HIs_mr) = $(CAT2(blob,_HIs_mr)) ')' >> outf @@\
329 @echo 'IfGhcBuild_mt(' CAT2(blob,_HIs_mt) = $(CAT2(blob,_HIs_mt)) ')' >> outf @@\
330 @echo 'IfGhcBuild_mp(' CAT2(blob,_HIs_mp) = $(CAT2(blob,_HIs_mp)) ')' >> outf @@\
331 @echo 'IfGhcBuild_mg(' CAT2(blob,_HIs_mg) = $(CAT2(blob,_HIs_mg)) ')' >> outf @@\
332 @echo 'IfGhcBuild_2s(' CAT2(blob,_HIs_2s) = $(CAT2(blob,_HIs_2s)) ')' >> outf @@\
333 @echo 'IfGhcBuild_1s(' CAT2(blob,_HIs_1s) = $(CAT2(blob,_HIs_1s)) ')' >> outf @@\
334 @echo 'IfGhcBuild_du(' CAT2(blob,_HIs_du) = $(CAT2(blob,_HIs_du)) ')' >> outf @@\
335 @echo 'IfGhcBuild_a(' CAT2(blob,_HIs_a) = $(CAT2(blob,_HIs_a)) ')' >> outf @@\
336 @echo 'IfGhcBuild_b(' CAT2(blob,_HIs_b) = $(CAT2(blob,_HIs_b)) ')' >> outf @@\
337 @echo 'IfGhcBuild_c(' CAT2(blob,_HIs_c) = $(CAT2(blob,_HIs_c)) ')' >> outf @@\
338 @echo 'IfGhcBuild_d(' CAT2(blob,_HIs_d) = $(CAT2(blob,_HIs_d)) ')' >> outf @@\
339 @echo 'IfGhcBuild_e(' CAT2(blob,_HIs_e) = $(CAT2(blob,_HIs_e)) ')' >> outf @@\
340 @echo 'IfGhcBuild_f(' CAT2(blob,_HIs_f) = $(CAT2(blob,_HIs_f)) ')' >> outf @@\
341 @echo 'IfGhcBuild_g(' CAT2(blob,_HIs_g) = $(CAT2(blob,_HIs_g)) ')' >> outf @@\
342 @echo 'IfGhcBuild_h(' CAT2(blob,_HIs_h) = $(CAT2(blob,_HIs_h)) ')' >> outf @@\
343 @echo 'IfGhcBuild_i(' CAT2(blob,_HIs_i) = $(CAT2(blob,_HIs_i)) ')' >> outf @@\
344 @echo 'IfGhcBuild_j(' CAT2(blob,_HIs_j) = $(CAT2(blob,_HIs_j)) ')' >> outf @@\
345 @echo 'IfGhcBuild_k(' CAT2(blob,_HIs_k) = $(CAT2(blob,_HIs_k)) ')' >> outf @@\
346 @echo 'IfGhcBuild_l(' CAT2(blob,_HIs_l) = $(CAT2(blob,_HIs_l)) ')' >> outf @@\
347 @echo 'IfGhcBuild_m(' CAT2(blob,_HIs_m) = $(CAT2(blob,_HIs_m)) ')' >> outf @@\
348 @echo 'IfGhcBuild_n(' CAT2(blob,_HIs_n) = $(CAT2(blob,_HIs_n)) ')' >> outf @@\
349 @echo 'IfGhcBuild_o(' CAT2(blob,_HIs_o) = $(CAT2(blob,_HIs_o)) ')' >> outf
351 BASIC_HS = $(BASIC_LHS:.lhs=.hs) $(BASIC_HS_PREL)
352 BASIC_OBJS_DIRS = $(BASIC_HS:.hs=)
358 @echo making Jmake.inc1 ...
359 @echo '/* Machine-generated file: do not edit! */' > Jmake.inc1
360 @echo BASIC_HS = $(BASIC_HS) >> Jmake.inc1
361 @echo BASIC_OBJS_DIRS = $(BASIC_OBJS_DIRS) >> Jmake.inc1
362 PrintFileStuff(BASIC,Jmake.inc1)
364 #endif /* good make */
366 /* ------------------------------------------*/
367 /* same stuff, for Haskell 1.3 library */
369 haskell-1.3/LibSystem.lhs \
370 haskell-1.3/LibCPUTime.lhs \
371 haskell-1.3/LibDirectory.lhs \
372 haskell-1.3/LibTime.lhs \
373 haskell-1.3/LibPosix.lhs \
374 haskell-1.3/LibPosixDB.lhs \
375 haskell-1.3/LibPosixErr.lhs \
376 haskell-1.3/LibPosixFiles.lhs \
377 haskell-1.3/LibPosixIO.lhs \
378 haskell-1.3/LibPosixProcEnv.lhs \
379 haskell-1.3/LibPosixProcPrim.lhs \
380 haskell-1.3/LibPosixTTY.lhs \
381 haskell-1.3/LibPosixUtil.lhs
383 #if MakeDoesNestedMacros != YES
384 /* make is brain-dead: use file produced below (w/ a good make) */
385 #include "Jmake.inc2"
387 #else /* good make */
389 ONE3_HS = $(ONE3_LHS:.lhs=.hs)
390 ONE3_OBJS_DIRS = $(ONE3_HS:.hs=)
396 @echo making Jmake.inc2 ...
397 @echo '/* Machine-generated file: do not edit! */' > Jmake.inc2
398 @echo ONE3_HS = $(ONE3_HS) >> Jmake.inc2
399 @echo ONE3_OBJS_DIRS = $(ONE3_OBJS_DIRS) >> Jmake.inc2
400 PrintFileStuff(ONE3,Jmake.inc2)
402 #endif /* good make */
404 /* ------------------------------------------*/
405 /* same stuff, for GHC utilities library */
407 #if GhcWithReadline != YES
408 # define __readline_lhs /*none*/
409 # define __readline_hi /*none*/
411 # define __readline_lhs \
413 # define __readline_hi \
417 #if GhcWithSockets != YES
418 # define __sockets_lhs /*none*/
419 # define __sockets_hi /*none*/
421 # define __sockets_lhs \
426 # define __sockets_hi \
439 ghc/PackedString.lhs \
444 ghc/Util.lhs __readline_lhs __sockets_lhs
446 #if MakeDoesNestedMacros != YES
447 /* make is brain-dead: use the file produced below */
448 #include "Jmake.inc3"
450 #else /* good make */
452 GHCLIB_HS = $(GHCLIB_LHS:.lhs=.hs)
453 GHCLIB_OBJS_DIRS = $(GHCLIB_HS:.hs=)
459 @echo making Jmake.inc3 ...
460 @echo '/* Machine-generated file: do not edit! */' > Jmake.inc3
461 @echo GHCLIB_HS = $(GHCLIB_HS) >> Jmake.inc3
462 @echo GHCLIB_OBJS_DIRS = $(GHCLIB_OBJS_DIRS) >> Jmake.inc3
463 PrintFileStuff(GHCLIB,Jmake.inc3)
465 #endif /* good make */
467 /* ------------------------------------------*/
468 /* same stuff, for HBC-compatibility library */
487 #if MakeDoesNestedMacros != YES
488 /* make is brain-dead: use file produced below (w/ a good make) */
489 #include "Jmake.inc4"
491 #else /* good make */
493 HBCLIB_OBJS_DIRS = $(HBCLIB_HS:.hs=)
499 @echo making Jmake.inc4 ...
500 @echo '/* Machine-generated file: do not edit! */' > Jmake.inc4
501 @echo HBCLIB_HS = $(HBCLIB_HS) >> Jmake.inc4
502 @echo HBCLIB_OBJS_DIRS = $(HBCLIB_OBJS_DIRS) >> Jmake.inc4
503 PrintFileStuff(HBCLIB,Jmake.inc4)
505 #endif /* good make */
507 #if MakeDoesNestedMacros == YES
509 /* ---- occasionally convenient make targets ---- */
510 IfGhcBuild_normal(hcs :: $(BASIC_HC_norm) $(ONE3_HC_norm) $(GHCLIB_HC_norm) $(HBCLIB_HC_norm))
511 IfGhcBuild_p(hcs_p :: $(BASIC_HC_p) $(ONE3_HC_p) $(GHCLIB_HC_p) $(HBCLIB_HC_p))
512 IfGhcBuild_t(hcs_t :: $(BASIC_HC_t) $(ONE3_HC_t) $(GHCLIB_HC_t) $(HBCLIB_HC_t))
513 IfGhcBuild_u(hcs_u :: $(BASIC_HC_u) $(ONE3_HC_u) $(GHCLIB_HC_u) $(HBCLIB_HC_u))
514 IfGhcBuild_mc(hcs_mc :: $(BASIC_HC_mc) $(ONE3_HC_mc) $(GHCLIB_HC_mc) $(HBCLIB_HC_mc))
515 IfGhcBuild_mr(hcs_mr :: $(BASIC_HC_mr) $(ONE3_HC_mr) $(GHCLIB_HC_mr) $(HBCLIB_HC_mr))
516 IfGhcBuild_mt(hcs_mt :: $(BASIC_HC_mt) $(ONE3_HC_mt) $(GHCLIB_HC_mt) $(HBCLIB_HC_mt))
517 IfGhcBuild_mp(hcs_mp :: $(BASIC_HC_mp) $(ONE3_HC_mp) $(GHCLIB_HC_mp) $(HBCLIB_HC_mp))
518 IfGhcBuild_mg(hcs_mg :: $(BASIC_HC_mg) $(ONE3_HC_mg) $(GHCLIB_HC_mg) $(HBCLIB_HC_mg))
519 IfGhcBuild_2s(hcs_2s :: $(BASIC_HC_2s) $(ONE3_HC_2s) $(GHCLIB_HC_2s) $(HBCLIB_HC_2s))
520 IfGhcBuild_1s(hcs_1s :: $(BASIC_HC_1s) $(ONE3_HC_1s) $(GHCLIB_HC_1s) $(HBCLIB_HC_1s))
521 IfGhcBuild_du(hcs_du :: $(BASIC_HC_du) $(ONE3_HC_du) $(GHCLIB_HC_du) $(HBCLIB_HC_du))
522 IfGhcBuild_a(hcs_a :: $(BASIC_HC_a) $(ONE3_HC_a) $(GHCLIB_HC_a) $(HBCLIB_HC_a))
523 IfGhcBuild_b(hcs_b :: $(BASIC_HC_b) $(ONE3_HC_b) $(GHCLIB_HC_b) $(HBCLIB_HC_b))
524 IfGhcBuild_c(hcs_c :: $(BASIC_HC_c) $(ONE3_HC_c) $(GHCLIB_HC_c) $(HBCLIB_HC_c))
525 IfGhcBuild_d(hcs_d :: $(BASIC_HC_d) $(ONE3_HC_d) $(GHCLIB_HC_d) $(HBCLIB_HC_d))
526 IfGhcBuild_e(hcs_e :: $(BASIC_HC_e) $(ONE3_HC_e) $(GHCLIB_HC_e) $(HBCLIB_HC_e))
527 IfGhcBuild_f(hcs_f :: $(BASIC_HC_f) $(ONE3_HC_f) $(GHCLIB_HC_f) $(HBCLIB_HC_f))
528 IfGhcBuild_g(hcs_g :: $(BASIC_HC_g) $(ONE3_HC_g) $(GHCLIB_HC_g) $(HBCLIB_HC_g))
529 IfGhcBuild_h(hcs_h :: $(BASIC_HC_h) $(ONE3_HC_h) $(GHCLIB_HC_h) $(HBCLIB_HC_h))
530 IfGhcBuild_i(hcs_i :: $(BASIC_HC_i) $(ONE3_HC_i) $(GHCLIB_HC_i) $(HBCLIB_HC_i))
531 IfGhcBuild_j(hcs_j :: $(BASIC_HC_j) $(ONE3_HC_j) $(GHCLIB_HC_j) $(HBCLIB_HC_j))
532 IfGhcBuild_k(hcs_k :: $(BASIC_HC_k) $(ONE3_HC_k) $(GHCLIB_HC_k) $(HBCLIB_HC_k))
533 IfGhcBuild_l(hcs_l :: $(BASIC_HC_l) $(ONE3_HC_l) $(GHCLIB_HC_l) $(HBCLIB_HC_l))
534 IfGhcBuild_m(hcs_m :: $(BASIC_HC_m) $(ONE3_HC_m) $(GHCLIB_HC_m) $(HBCLIB_HC_m))
535 IfGhcBuild_n(hcs_n :: $(BASIC_HC_n) $(ONE3_HC_n) $(GHCLIB_HC_n) $(HBCLIB_HC_n))
536 IfGhcBuild_o(hcs_o :: $(BASIC_HC_o) $(ONE3_HC_o) $(GHCLIB_HC_o) $(HBCLIB_HC_o))
538 IfGhcBuild_normal(libs:: libHS.a libHS13.a libHSghc.a libHShbc.a)
539 IfGhcBuild_p(libs_p :: libHS_p.a libHS13_p.a libHSghc_p.a libHShbc_p.a)
540 IfGhcBuild_t(libs_t :: libHS_t.a libHS13_t.a libHSghc_t.a libHShbc_t.a)
541 IfGhcBuild_t(libs_u :: libHS_u.a libHS13_u.a libHSghc_u.a libHShbc_u.a)
542 IfGhcBuild_mc(libs_mc :: libHS_mc.a libHS13_mc.a libHSghc_mc.a libHShbc_mc.a)
543 IfGhcBuild_mr(libs_mr :: libHS_mr.a libHS13_mr.a libHSghc_mr.a libHShbc_mr.a)
544 IfGhcBuild_mt(libs_mt :: libHS_mt.a libHS13_mt.a libHSghc_mt.a libHShbc_mt.a)
545 IfGhcBuild_mp(libs_mp :: libHS_mp.a libHS13_mp.a libHSghc_mp.a libHShbc_mp.a)
546 IfGhcBuild_mg(libs_mg :: libHS_mg.a libHS13_mg.a libHSghc_mg.a libHShbc_mg.a)
547 IfGhcBuild_2s(libs_2s :: libHS_2s.a libHS13_2s.a libHSghc_2s.a libHShbc_2s.a)
548 IfGhcBuild_1s(libs_1s :: libHS_1s.a libHS13_1s.a libHSghc_1s.a libHShbc_1s.a)
549 IfGhcBuild_du(libs_du :: libHS_du.a libHS13_du.a libHSghc_du.a libHShbc_du.a)
550 IfGhcBuild_a(libs_a :: libHS_a.a libHS13_a.a libHSghc_a.a libHShbc_a.a)
551 IfGhcBuild_b(libs_b :: libHS_b.a libHS13_b.a libHSghc_b.a libHShbc_b.a)
552 IfGhcBuild_c(libs_c :: libHS_c.a libHS13_c.a libHSghc_c.a libHShbc_c.a)
553 IfGhcBuild_d(libs_d :: libHS_d.a libHS13_d.a libHSghc_d.a libHShbc_d.a)
554 IfGhcBuild_e(libs_e :: libHS_e.a libHS13_e.a libHSghc_e.a libHShbc_e.a)
555 IfGhcBuild_f(libs_f :: libHS_f.a libHS13_f.a libHSghc_f.a libHShbc_f.a)
556 IfGhcBuild_g(libs_g :: libHS_g.a libHS13_g.a libHSghc_g.a libHShbc_g.a)
557 IfGhcBuild_h(libs_h :: libHS_h.a libHS13_h.a libHSghc_h.a libHShbc_h.a)
558 IfGhcBuild_i(libs_i :: libHS_i.a libHS13_i.a libHSghc_i.a libHShbc_i.a)
559 IfGhcBuild_j(libs_j :: libHS_j.a libHS13_j.a libHSghc_j.a libHShbc_j.a)
560 IfGhcBuild_k(libs_k :: libHS_k.a libHS13_k.a libHSghc_k.a libHShbc_k.a)
561 IfGhcBuild_l(libs_l :: libHS_l.a libHS13_l.a libHSghc_l.a libHShbc_l.a)
562 IfGhcBuild_m(libs_m :: libHS_m.a libHS13_m.a libHSghc_m.a libHShbc_m.a)
563 IfGhcBuild_n(libs_n :: libHS_n.a libHS13_n.a libHSghc_n.a libHShbc_n.a)
564 IfGhcBuild_o(libs_o :: libHS_o.a libHS13_o.a libHSghc_o.a libHShbc_o.a)
566 /* maybe for GNU make only? */
567 .PHONY :: hcs hcs_p hcs_t hcs_mg hcs_mr hcs_mt hcs_mp hcs_mg hcs_a hcs_b hcs_c hcs_d hcs_e hcs_f hcs_g hcs_h hcs_i hcs_j hcs_k hcs_l hcs_m hcs_n hcs_o
569 #endif /* reasonable make */
571 GHCLIB_HIs = you-really-need-to-define-GHCLIB_HIs
572 /* use print_file_lists */
574 /* lists of *.hi files, for installation; i.e., the user
575 will be able to say (e.g.,) "import PreludePrimIO" and it will work.
576 (but "import ITup5" will not)
578 PreludeNull_.hi is tickled by "hstags".
580 BASIC_HIs = prelude/Prelude.hi \
581 prelude/PreludeCore.hi \
583 prelude/PrelCore13.hi \
584 prelude/PreludeNull_.hi \
585 glaExts/PreludeGlaST.hi \
586 glaExts/PreludeGlaMisc.hi \
587 prelude/Concurrent.hi \
590 GHCLIB_HIs = ghc/Bag.hi \
596 ghc/PackedString.hi \
601 ghc/Util.hi __readline_hi __sockets_hi
603 ONE3_HIs = haskell-1.3/LibSystem.hi \
604 haskell-1.3/LibCPUTime.hi \
605 haskell-1.3/LibDirectory.hi \
606 haskell-1.3/LibTime.hi \
607 haskell-1.3/LibPosix.hi
609 HBCLIB_HIs = hbc/Algebra.hi \
626 /************************************************************************
628 * Macros for creating and installing libHS<x>.a (in its many flavors). *
630 *************************************************************************/
632 #ifndef SpecialGhcLibraryTarget
633 #define SpecialGhcLibraryTarget(lib,tag,objs_DEP,objs_DIR,find_pat) @@\
634 AllTarget(CAT3(lib,tag,.a)) @@\
635 CAT3(lib,tag,.a):: objs_DEP @@\
638 TMPDIR=$(TMPDIR); export TMPDIR; \
639 find objs_DIR -name find_pat -print | xargs ar q $@ @@\
640 $(RANLIB) CAT3(lib,tag,.a) @@\
642 $(RM) CAT3(lib,tag,.a)
643 #endif /* SpecialGhcLibraryTarget */
645 #ifndef SpecialGhcLibInstallTarget
646 #if DoInstallGHCSystem == YES
647 #define SpecialGhcLibInstallTarget(lib,tag) @@\
648 install :: CAT3(lib,tag,.a) @@\
649 $(INSTALL) $(INSTLIBFLAGS) CAT3(lib,tag,.a) \
650 $(INSTLIBDIR_GHC)/CAT3(lib,tag,.a) @@\
651 $(RANLIB) $(INSTLIBDIR_GHC)/CAT3(lib,tag,.a)
652 #else /* ! DoInstallGhc... */
653 #define SpecialGhcLibInstallTarget(lib,tag) /*nothing*/
654 #endif /* ! DoInstallGhc... */
655 #endif /* SpecialGhcLibInstallTarget */
657 /* build/install all the diff libs for a particular build */
659 #define BigHisTarget(targeti,basei,ghci,hbci,one3i) @@\
661 InstallTarget(targeti) @@\
662 InstallMultNonExecTargets(targeti,basei,$(INSTDATADIR_GHC)/imports) @@\
663 InstallMultNonExecTargets(targeti,ghci, $(INSTDATADIR_GHC)/imports/ghc) @@\
664 InstallMultNonExecTargets(targeti,hbci, $(INSTDATADIR_GHC)/imports/hbc) @@\
665 InstallMultNonExecTargets(targeti,one3i,$(INSTDATADIR_GHC)/imports/haskell-1.3)
667 #define BigLibsTarget(tag,glob,base,ghc,hbc,one3) @@\
668 SpecialGhcLibraryTarget(libHS,tag,base,$(BASIC_OBJS_DIRS),glob) @@\
669 SpecialGhcLibInstallTarget(libHS,tag) @@\
670 SpecialGhcLibraryTarget(libHSghc,tag,ghc,$(GHCLIB_OBJS_DIRS),glob) @@\
671 SpecialGhcLibInstallTarget(libHSghc,tag) @@\
672 SpecialGhcLibraryTarget(libHShbc,tag,hbc,$(HBCLIB_OBJS_DIRS),glob) @@\
673 SpecialGhcLibInstallTarget(libHShbc,tag) @@\
674 SpecialGhcLibraryTarget(libHS13,tag,one3,$(ONE3_OBJS_DIRS),glob) @@\
675 SpecialGhcLibInstallTarget(libHS13,tag)
677 /* build *everything* -- monster macro from hell */
678 #define BigBuildTarget(tag,glob,targeti,base,basei,ghc,ghci,hbc,hbci,one3,one3i) \
679 BigLibsTarget(tag,glob,base,ghc,hbc,one3) @@\
680 BigHisTarget(targeti,basei,ghci,hbci,one3i)
683 /****************************************************************
685 * Creating and installing... *
686 * libHS_<tag>.a standard Prelude library *
687 * libHShbc_<tag>.a HBC-compatibility lib *
688 * libHSghc_<tag>.a GHC utilities lib *
689 * libHS13_<tag>.a Haskell 1.3 lib *
691 ****************************************************************/
693 /* make sure install's target dir is there */
694 #if DoInstallGHCSystem == YES
695 MakeDirectories(install, $(INSTLIBDIR_GHC) \
696 $(INSTDATADIR_GHC)/imports \
697 $(INSTDATADIR_GHC)/imports/ghc \
698 $(INSTDATADIR_GHC)/imports/hbc \
699 $(INSTDATADIR_GHC)/imports/haskell-1.3)
701 basic_his :: /* nothing */
702 InstallTarget(basic_his)
703 InstallMultNonExecTargets(basic_his, $(BASIC_HIs), $(INSTDATADIR_GHC)/imports)
704 InstallMultNonExecTargets(basic_his, $(HBCLIB_HIs), $(INSTDATADIR_GHC)/imports/hbc)
705 InstallMultNonExecTargets(basic_his, $(ONE3_HIs), $(INSTDATADIR_GHC)/imports/haskell-1.3)
706 InstallMultNonExecTargets(basic_his, $(GHCLIB_HIs), $(INSTDATADIR_GHC)/imports/ghc)
707 #endif /* installing */
709 IfGhcBuild_normal(BigBuildTarget(,'*_.o',basic_his \
710 , $(BASIC_DEP_norm), $(BASIC_HIs) \
711 , $(GHCLIB_DEP_norm), $(GHCLIB_HIs) \
712 , $(HBCLIB_DEP_norm), $(HBCLIB_HIs) \
713 , $(ONE3_DEP_norm), $(ONE3_HIs) \
716 IfGhcBuild_p(BigBuildTarget(_p,'*_p.o',his_p \
717 , $(BASIC_DEP_p), $(BASIC_HIs_p) \
718 , $(GHCLIB_DEP_p), $(GHCLIB_HIs_p) \
719 , $(HBCLIB_DEP_p), $(HBCLIB_HIs_p) \
720 , $(ONE3_DEP_p), $(ONE3_HIs_p) \
723 IfGhcBuild_t(BigBuildTarget(_t,'*_t.o',his_t \
724 , $(BASIC_DEP_t), $(BASIC_HIs_t) \
725 , $(GHCLIB_DEP_t), $(GHCLIB_HIs_t) \
726 , $(HBCLIB_DEP_t), $(HBCLIB_HIs_t) \
727 , $(ONE3_DEP_t), $(ONE3_HIs_t) \
730 IfGhcBuild_u(BigBuildTarget(,'*_u.o',his_u \
731 , $(BASIC_DEP_u), $(BASIC_HIs_u) \
732 , $(GHCLIB_DEP_u), $(GHCLIB_HIs_u) \
733 , $(HBCLIB_DEP_u), $(HBCLIB_HIs_u) \
734 , $(ONE3_DEP_u), $(ONE3_HIs_u) \
737 IfGhcBuild_mc(BigBuildTarget(_mc,'*_mc.o',his_mc \
738 , $(BASIC_DEP_mc), $(BASIC_HIs_mc) \
739 , $(GHCLIB_DEP_mc), $(GHCLIB_HIs_mc) \
740 , $(HBCLIB_DEP_mc), $(HBCLIB_HIs_mc) \
741 , $(ONE3_DEP_mc), $(ONE3_HIs_mc) \
744 IfGhcBuild_mr(BigBuildTarget(_mr,'*_mr.o',his_mr \
745 , $(BASIC_DEP_mr), $(BASIC_HIs_mr) \
746 , $(GHCLIB_DEP_mr), $(GHCLIB_HIs_mr) \
747 , $(HBCLIB_DEP_mr), $(HBCLIB_HIs_mr) \
748 , $(ONE3_DEP_mr), $(ONE3_HIs_mr) \
751 IfGhcBuild_mt(BigBuildTarget(_mr,'*_mt.o',his_mt \
752 , $(BASIC_DEP_mt), $(BASIC_HIs_mt) \
753 , $(GHCLIB_DEP_mt), $(GHCLIB_HIs_mt) \
754 , $(HBCLIB_DEP_mt), $(HBCLIB_HIs_mt) \
755 , $(ONE3_DEP_mt), $(ONE3_HIs_mt) \
758 IfGhcBuild_mp(BigBuildTarget(_mp,'*_mp.o',his_mp \
759 , $(BASIC_DEP_mp), $(BASIC_HIs_mp) \
760 , $(GHCLIB_DEP_mp), $(GHCLIB_HIs_mp) \
761 , $(HBCLIB_DEP_mp), $(HBCLIB_HIs_mp) \
762 , $(ONE3_DEP_mp), $(ONE3_HIs_mp) \
765 IfGhcBuild_mg(BigBuildTarget(_mg,'*_mg.o',his_mg \
766 , $(BASIC_DEP_mg), $(BASIC_HIs_mg) \
767 , $(GHCLIB_DEP_mg), $(GHCLIB_HIs_mg) \
768 , $(HBCLIB_DEP_mg), $(HBCLIB_HIs_mg) \
769 , $(ONE3_DEP_mg), $(ONE3_HIs_mg) \
772 /* these GC ones do not *really* need separate .hi files,
773 but it really makes life easier to do it this way
775 IfGhcBuild_2s(BigBuildTarget(_2s,'*_2s.o',his_2s \
776 , $(BASIC_DEP_2s), $(BASIC_HIs_2s) \
777 , $(GHCLIB_DEP_2s), $(GHCLIB_HIs_2s) \
778 , $(HBCLIB_DEP_2s), $(HBCLIB_HIs_2s) \
779 , $(ONE3_DEP_2s), $(ONE3_HIs_2s) \
782 IfGhcBuild_1s(BigBuildTarget(_1s,'*_1s.o',his_1s \
783 , $(BASIC_DEP_1s), $(BASIC_HIs_1s) \
784 , $(GHCLIB_DEP_1s), $(GHCLIB_HIs_1s) \
785 , $(HBCLIB_DEP_1s), $(HBCLIB_HIs_1s) \
786 , $(ONE3_DEP_1s), $(ONE3_HIs_1s) \
789 IfGhcBuild_du(BigBuildTarget(_du,'*_du.o',his_du \
790 , $(BASIC_DEP_du), $(BASIC_HIs_du) \
791 , $(GHCLIB_DEP_du), $(GHCLIB_HIs_du) \
792 , $(HBCLIB_DEP_du), $(HBCLIB_HIs_du) \
793 , $(ONE3_DEP_du), $(ONE3_HIs_du) \
796 /* user ways -- yeeps! */
798 IfGhcBuild_a(BigBuildTarget(_a,'*_a.o',his_a \
799 , $(BASIC_DEP_a), $(BASIC_HIs_a) \
800 , $(GHCLIB_DEP_a), $(GHCLIB_HIs_a) \
801 , $(HBCLIB_DEP_a), $(HBCLIB_HIs_a) \
802 , $(ONE3_DEP_a), $(ONE3_HIs_a) \
805 IfGhcBuild_b(BigBuildTarget(_b,'*_b.o',his_b \
806 , $(BASIC_DEP_b), $(BASIC_HIs_b) \
807 , $(GHCLIB_DEP_b), $(GHCLIB_HIs_b) \
808 , $(HBCLIB_DEP_b), $(HBCLIB_HIs_b) \
809 , $(ONE3_DEP_b), $(ONE3_HIs_b) \
812 IfGhcBuild_c(BigBuildTarget(_c,'*_c.o',his_c \
813 , $(BASIC_DEP_c), $(BASIC_HIs_c) \
814 , $(GHCLIB_DEP_c), $(GHCLIB_HIs_c) \
815 , $(HBCLIB_DEP_c), $(HBCLIB_HIs_c) \
816 , $(ONE3_DEP_c), $(ONE3_HIs_c) \
819 IfGhcBuild_d(BigBuildTarget(_d,'*_d.o',his_d \
820 , $(BASIC_DEP_d), $(BASIC_HIs_d) \
821 , $(GHCLIB_DEP_d), $(GHCLIB_HIs_d) \
822 , $(HBCLIB_DEP_d), $(HBCLIB_HIs_d) \
823 , $(ONE3_DEP_d), $(ONE3_HIs_d) \
826 IfGhcBuild_e(BigBuildTarget(_e,'*_e.o',his_e \
827 , $(BASIC_DEP_e), $(BASIC_HIs_e) \
828 , $(GHCLIB_DEP_e), $(GHCLIB_HIs_e) \
829 , $(HBCLIB_DEP_e), $(HBCLIB_HIs_e) \
830 , $(ONE3_DEP_e), $(ONE3_HIs_e) \
833 IfGhcBuild_f(BigBuildTarget(_f,'*_f.o',his_f \
834 , $(BASIC_DEP_f), $(BASIC_HIs_f) \
835 , $(GHCLIB_DEP_f), $(GHCLIB_HIs_f) \
836 , $(HBCLIB_DEP_f), $(HBCLIB_HIs_f) \
837 , $(ONE3_DEP_f), $(ONE3_HIs_f) \
840 IfGhcBuild_g(BigBuildTarget(_g,'*_g.o',his_g \
841 , $(BASIC_DEP_g), $(BASIC_HIs_g) \
842 , $(GHCLIB_DEP_g), $(GHCLIB_HIs_g) \
843 , $(HBCLIB_DEP_g), $(HBCLIB_HIs_g) \
844 , $(ONE3_DEP_g), $(ONE3_HIs_g) \
847 IfGhcBuild_h(BigBuildTarget(_h,'*_h.o',his_h \
848 , $(BASIC_DEP_h), $(BASIC_HIs_h) \
849 , $(GHCLIB_DEP_h), $(GHCLIB_HIs_h) \
850 , $(HBCLIB_DEP_h), $(HBCLIB_HIs_h) \
851 , $(ONE3_DEP_h), $(ONE3_HIs_h) \
854 IfGhcBuild_i(BigBuildTarget(_i,'*_i.o',his_i \
855 , $(BASIC_DEP_i), $(BASIC_HIs_i) \
856 , $(GHCLIB_DEP_i), $(GHCLIB_HIs_i) \
857 , $(HBCLIB_DEP_i), $(HBCLIB_HIs_i) \
858 , $(ONE3_DEP_i), $(ONE3_HIs_i) \
861 IfGhcBuild_j(BigBuildTarget(_j,'*_j.o',his_j \
862 , $(BASIC_DEP_j), $(BASIC_HIs_j) \
863 , $(GHCLIB_DEP_j), $(GHCLIB_HIs_j) \
864 , $(HBCLIB_DEP_j), $(HBCLIB_HIs_j) \
865 , $(ONE3_DEP_j), $(ONE3_HIs_j) \
868 IfGhcBuild_k(BigBuildTarget(_k,'*_k.o',his_k \
869 , $(BASIC_DEP_k), $(BASIC_HIs_k) \
870 , $(GHCLIB_DEP_k), $(GHCLIB_HIs_k) \
871 , $(HBCLIB_DEP_k), $(HBCLIB_HIs_k) \
872 , $(ONE3_DEP_k), $(ONE3_HIs_k) \
875 IfGhcBuild_l(BigBuildTarget(_l,'*_l.o',his_l \
876 , $(BASIC_DEP_l), $(BASIC_HIs_l) \
877 , $(GHCLIB_DEP_l), $(GHCLIB_HIs_l) \
878 , $(HBCLIB_DEP_l), $(HBCLIB_HIs_l) \
879 , $(ONE3_DEP_l), $(ONE3_HIs_l) \
882 IfGhcBuild_m(BigBuildTarget(_m,'*_m.o',his_m \
883 , $(BASIC_DEP_m), $(BASIC_HIs_m) \
884 , $(GHCLIB_DEP_m), $(GHCLIB_HIs_m) \
885 , $(HBCLIB_DEP_m), $(HBCLIB_HIs_m) \
886 , $(ONE3_DEP_m), $(ONE3_HIs_m) \
889 IfGhcBuild_n(BigBuildTarget(_n,'*_n.o',his_n \
890 , $(BASIC_DEP_n), $(BASIC_HIs_n) \
891 , $(GHCLIB_DEP_n), $(GHCLIB_HIs_n) \
892 , $(HBCLIB_DEP_n), $(HBCLIB_HIs_n) \
893 , $(ONE3_DEP_n), $(ONE3_HIs_n) \
896 IfGhcBuild_o(BigBuildTarget(_o,'*_o.o',his_o \
897 , $(BASIC_DEP_o), $(BASIC_HIs_o) \
898 , $(GHCLIB_DEP_o), $(GHCLIB_HIs_o) \
899 , $(HBCLIB_DEP_o), $(HBCLIB_HIs_o) \
900 , $(ONE3_DEP_o), $(ONE3_HIs_o) \
903 /****************************************************************
905 * Creating the individual .hc files: *
907 * For the just-vary-the-GC-thanks flavors, we only need to *
908 * compile .hs->.hc once; then re-use the .hc file each time. *
910 * For the profiling one (_p) and all the user-specified *
911 * ones, we recompile the Haskell each time. *
913 * NB: old (WDP 95/06) *
914 ****************************************************************/
916 /* some "helpful" internal macros first... */
918 #if GhcWithHscBuiltViaC == YES && HaskellCompilerType == HC_USE_HC_FILES
919 #define CompilePreludishly__(file,isuf,way,flags) @@\
921 $(RM) CAT3(file,way,.hc)
923 #else /* normal case */
924 #define CompilePreludishly__(file,isuf,way,flags) @@\
925 CAT3(file,way,.hc) : file.isuf @@\
926 $(RM) CAT3(file,way,.hc) @@\
927 $(GHC) -C $(GHCFLAGS) flags file.isuf -o CAT3(file,way,.hc) @@\
929 $(RM) CAT3(file,way,.hc)
932 #define ObjectifyPreludishly__(file,way,flags,osuff,find_pat) @@\
933 CAT3(file,way,.o) : CAT3(file,way,.hc) @@\
934 $(RM) CAT3(file,way,.o) @@\
935 @if [ ! -d file ] ; then mkdir file ; else exit 0 ; fi @@\
936 @find file -name find_pat -print | xargs $(RM) __rm_food @@\
937 $(GHC) -c $(GHCFLAGS) flags CAT3(file,way,.hc) -odir file -osuf osuff @@\
938 touch CAT3(file,way,.o) @@\
940 $(RM) CAT3(file,way,.o) @@\
941 find file -name find_pat -print | xargs $(RM) __rm_food
943 #define DoHs(file,isuf,way,flags,osuf,find_pat) \
944 CompilePreludishly__(file,isuf,way,flags) @@\
945 ObjectifyPreludishly__(file,way,flags,osuf,find_pat)
947 /* here we go: (NB: do not make .hc files for _u [unregisterized]) */
949 #define CompilePreludishly(file,isuf,flags) @@\
950 IfGhcBuild_normal(DoHs(file,isuf,,flags $(GHC_OPTS_norm),'_.o', '*_.o')) \
951 IfGhcBuild_p(DoHs(file,isuf,_p, flags $(GHC_OPTS_p), '_p.o', '*_p.o')) \
952 IfGhcBuild_t(DoHs(file,isuf,_t, flags $(GHC_OPTS_t), '_t.o', '*_t.o')) \
953 IfGhcBuild_mc(DoHs(file,isuf,_mc, flags $(GHC_OPTS_mc), '_mc.o', '*_mc.o')) \
954 IfGhcBuild_mr(DoHs(file,isuf,_mr, flags $(GHC_OPTS_mr), '_mr.o', '*_mr.o')) \
955 IfGhcBuild_mt(DoHs(file,isuf,_mt, flags $(GHC_OPTS_mt), '_mt.o', '*_mt.o')) \
956 IfGhcBuild_mp(DoHs(file,isuf,_mp, flags $(GHC_OPTS_mp), '_mp.o', '*_mp.o')) \
957 IfGhcBuild_mg(DoHs(file,isuf,_mg, flags $(GHC_OPTS_mg), '_mg.o', '*_mg.o')) \
958 IfGhcBuild_2s(DoHs(file,isuf,_2s, flags $(GHC_OPTS_2s), '_2s.o', '*_2s.o')) \
959 IfGhcBuild_1s(DoHs(file,isuf,_1s, flags $(GHC_OPTS_1s), '_1s.o', '*_1s.o')) \
960 IfGhcBuild_du(DoHs(file,isuf,_du, flags $(GHC_OPTS_du), '_du.o', '*_du.o')) \
961 IfGhcBuild_a(DoHs(file,isuf,_a, flags $(GHC_OPTS_a), '_a.o', '*_a.o')) \
962 IfGhcBuild_b(DoHs(file,isuf,_b, flags $(GHC_OPTS_b), '_b.o', '*_b.o')) \
963 IfGhcBuild_c(DoHs(file,isuf,_c, flags $(GHC_OPTS_c), '_c.o', '*_c.o')) \
964 IfGhcBuild_d(DoHs(file,isuf,_d, flags $(GHC_OPTS_d), '_d.o', '*_d.o')) \
965 IfGhcBuild_e(DoHs(file,isuf,_e, flags $(GHC_OPTS_e), '_e.o', '*_e.o')) \
966 IfGhcBuild_f(DoHs(file,isuf,_f, flags $(GHC_OPTS_f), '_f.o', '*_f.o')) \
967 IfGhcBuild_g(DoHs(file,isuf,_g, flags $(GHC_OPTS_g), '_g.o', '*_g.o')) \
968 IfGhcBuild_h(DoHs(file,isuf,_h, flags $(GHC_OPTS_h), '_h.o', '*_h.o')) \
969 IfGhcBuild_i(DoHs(file,isuf,_i, flags $(GHC_OPTS_i), '_i.o', '*_i.o')) \
970 IfGhcBuild_j(DoHs(file,isuf,_j, flags $(GHC_OPTS_j), '_j.o', '*_j.o')) \
971 IfGhcBuild_k(DoHs(file,isuf,_k, flags $(GHC_OPTS_k), '_k.o', '*_k.o')) \
972 IfGhcBuild_l(DoHs(file,isuf,_l, flags $(GHC_OPTS_l), '_l.o', '*_l.o')) \
973 IfGhcBuild_m(DoHs(file,isuf,_m, flags $(GHC_OPTS_m), '_m.o', '*_m.o')) \
974 IfGhcBuild_n(DoHs(file,isuf,_n, flags $(GHC_OPTS_n), '_n.o', '*_n.o')) \
975 IfGhcBuild_o(DoHs(file,isuf,_o, flags $(GHC_OPTS_o), '_o.o', '*_o.o'))
977 /* now use the macro: */
979 CompilePreludishly(glaExts/PreludeGlaST,lhs, $(PREL_OPTS) -split-objs ST -H16m -monly-4-regs -fno-omit-reexported-instances)
980 CompilePreludishly(glaExts/PreludePrimIO,lhs, $(PREL_OPTS) -split-objs PreludePrimIO)
981 CompilePreludishly(glaExts/PreludeErrIO,lhs, $(PREL_OPTS) -split-objs ErrIO)
982 CompilePreludishly(glaExts/PreludeDialogueIO,lhs,$(PREL_OPTS) -split-objs DialogueIO)
983 CompilePreludishly(glaExts/MainIO,lhs, $(PREL_OPTS) -split-objs MainIO)
984 CompilePreludishly(glaExts/MainIO13,lhs, $(PREL_OPTS) -split-objs MainIO13 -ohi glaExts/MainIO13.hi)
985 CompilePreludishly(glaExts/Stdio,lhs, $(PREL_OPTS) -split-objs Stdio)
986 CompilePreludishly(glaExts/ByteOps,lhs, $(PREL_OPTS) -split-objs ByteOps)
988 CompilePreludishly(prelude/Concurrent,lhs, -fhaskell-1.3 -split-objs Concurrent -ohi prelude/Concurrent.hi)
989 CompilePreludishly(prelude/ChannelVar,lhs, -fhaskell-1.3 -split-objs ChannelVar -ohi prelude/ChannelVar.hi)
990 /* NB: do not split objs for Channel, because of purely-local things */
991 CompilePreludishly(prelude/Channel,lhs, -fhaskell-1.3 -ohi prelude/Channel.hi)
992 CompilePreludishly(prelude/Semaphore,lhs, -fhaskell-1.3 -split-objs Semaphore -ohi prelude/Semaphore.hi)
993 CompilePreludishly(prelude/Merge,lhs, -fhaskell-1.3 -split-objs Merge -ohi prelude/Merge.hi)
994 CompilePreludishly(prelude/SampleVar,lhs, -fhaskell-1.3 -split-objs SampleVar -ohi prelude/SampleVar.hi)
996 CompilePreludishly(prelude/Parallel,lhs, -split-objs Parallel -ohi prelude/Parallel.hi)
998 CompilePreludishly(prelude/TysBasic,hs, $(PREL_OPTS) -split-objs TysBasic -fmin-builtin-names -nohi)
999 CompilePreludishly(prelude/TyBool,hs, $(PREL_OPTS) -split-objs TyBool -fhide-builtin-names -nohi)
1000 CompilePreludishly(prelude/TyArray,hs, $(PREL_OPTS) -split-objs TyArray -ohi prelude/TyArray.hi)
1001 CompilePreludishly(prelude/TyComplex,hs,$(PREL_OPTS) -split-objs TyComplex -ohi prelude/TyComplex.hi)
1002 CompilePreludishly(prelude/TyIO,hs, $(PREL_OPTS) -split-objs TyIO -fmin-builtin-names -ohi prelude/TyIO.hi)
1003 CompilePreludishly(prelude/TyRatio,hs, $(PREL_OPTS) -split-objs TyRatio -fmin-builtin-names -nohi)
1005 CompilePreludishly(prelude/IArray,hs, $(PREL_OPTS) -split-objs IArray -H14m -ohi prelude/IArray.hi)
1006 CompilePreludishly(prelude/IBool,hs, $(PREL_OPTS) -split-objs IBool -ohi prelude/IBool.hi)
1007 CompilePreludishly(prelude/IChar,hs, $(PREL_OPTS) -split-objs IChar -ohi prelude/IChar.hi)
1008 CompilePreludishly(prelude/IComplex,hs, $(PREL_OPTS) -split-objs IComplex -H16m -ohi prelude/IComplex.hi)
1009 CompilePreludishly(prelude/IDouble,hs, $(PREL_OPTS) -split-objs IDouble -ohi prelude/IDouble.hi)
1010 CompilePreludishly(prelude/IFloat,hs, $(PREL_OPTS) -split-objs IFloat -ohi prelude/IFloat.hi)
1011 CompilePreludishly(prelude/IInt,hs, $(PREL_OPTS) -split-objs IInt -ohi prelude/IInt.hi -monly-4-regs)
1012 CompilePreludishly(prelude/IInteger,hs, $(PREL_OPTS) -split-objs IInteger -ohi prelude/IInteger.hi)
1013 CompilePreludishly(prelude/IList,hs, $(PREL_OPTS) -split-objs IList -ohi prelude/IList.hi)
1014 CompilePreludishly(prelude/IRatio,hs, $(PREL_OPTS) -split-objs IRatio -H16m -ohi prelude/IRatio.hi)
1015 CompilePreludishly(prelude/ITup0,hs, $(PREL_OPTS) -split-objs ITup0 -ohi prelude/ITup0.hi)
1016 CompilePreludishly(prelude/ITup2,hs, $(PREL_OPTS) -split-objs ITup2 -ohi prelude/ITup2.hi)
1017 CompilePreludishly(prelude/ITup3,hs, $(PREL_OPTS) -split-objs ITup3 -ohi prelude/ITup3.hi)
1018 CompilePreludishly(prelude/ITup4,hs, $(PREL_OPTS) -split-objs ITup4 -H16m -ohi prelude/ITup4.hi)
1019 CompilePreludishly(prelude/ITup5,hs, $(PREL_OPTS) -split-objs ITup5 -H24m -ohi prelude/ITup5.hi)
1021 CompilePreludishly(prelude/Cls,hs, $(PREL_OPTS) -split-objs Cls -H24m -fmin-builtin-names -ohi prelude/Cls.hi)
1023 CompilePreludishly(prelude/Builtin,hs, $(PREL_OPTS) -split-objs Builtin -ohi prelude/Builtin.hi)
1024 CompilePreludishly(prelude/Core,hs, $(PREL_OPTS) -split-objs Core -ohi prelude/Core.hi)
1025 CompilePreludishly(prelude/IO,hs, $(PREL_OPTS) -split-objs IO -ohi prelude/IO.hi)
1026 CompilePreludishly(prelude/List,hs, $(PREL_OPTS) -split-objs List -H14m -ohi prelude/List.hi)
1027 CompilePreludishly(prelude/PS,lhs, $(PREL_OPTS) -split-objs PS -ohi prelude/PS.hi -monly-2-regs)
1028 CompilePreludishly(prelude/Prel,hs, $(PREL_OPTS) -split-objs Prel -H14m -ohi prelude/Prel.hi -monly-2-regs)
1029 CompilePreludishly(prelude/Text,hs, $(PREL_OPTS) -split-objs Text -H14m -ohi prelude/Text.hi -monly-4-regs)
1030 CompilePreludishly(prelude/FoldrBuild,hs, $(PREL_OPTS) -split-objs FoldrBuild -nohi)
1032 /* --- 1.3 I/O support --- */
1034 CompilePreludishly(prelude/PreludeIOError,lhs, $(PREL_OPTS) -split-objs IOError -ohi prelude/PreludeIOError.hi -fno-omit-reexported-instances -fomit-derived-read '-#include"stgio.h"')
1035 CompilePreludishly(prelude/PreludeWriteTextIO,lhs, $(PREL_OPTS) -split-objs WriteTextIO -ohi prelude/PreludeWriteTextIO.hi -fno-omit-reexported-instances '-#include"stgio.h"')
1036 CompilePreludishly(prelude/PreludeStdIO,lhs, $(PREL_OPTS) -split-objs StdIO -ohi prelude/PreludeStdIO.hi -fno-omit-reexported-instances '-#include"stgio.h"' -H14m)
1037 CompilePreludishly(prelude/PreludeIO,lhs, $(PREL_OPTS) -split-objs PIO -ohi prelude/PreludeIO.hi -fno-omit-reexported-instances '-#include"stgio.h"')
1038 CompilePreludishly(prelude/PreludeMonadicIO,lhs, $(PREL_OPTS) -split-objs MonadicIO -ohi prelude/PreludeMonadicIO.hi -fno-omit-reexported-instances '-#include"stgio.h"')
1039 CompilePreludishly(prelude/PreludeReadTextIO,lhs, $(PREL_OPTS) -split-objs ReadTextIO -ohi prelude/PreludeReadTextIO.hi -fno-omit-reexported-instances '-#include"stgio.h"')
1041 /* --- Haskell 1.3 libraries --- */
1043 CompilePreludishly(haskell-1.3/LibSystem,lhs, -fhaskell-1.3 -split-objs LibSystem '-#include"stgio.h"')
1044 CompilePreludishly(haskell-1.3/LibCPUTime,lhs, -fhaskell-1.3 -split-objs LibCPUTime '-#include"stgio.h"')
1045 CompilePreludishly(haskell-1.3/LibDirectory,lhs, -fhaskell-1.3 -split-objs LibDirectory '-#include"stgio.h"' -monly-3-regs)
1046 CompilePreludishly(haskell-1.3/LibTime,lhs, -fhaskell-1.3 -split-objs LibTime '-#include"stgio.h"' '-#include"timezone.h"' -H12m -monly-3-regs -optcO-DNON_POSIX_SOURCE)
1048 CompilePreludishly(haskell-1.3/LibPosix,lhs, -fhaskell-1.3 -split-objs LibPosix '-#include"stgio.h"' '-#include"libposix.h"')
1049 CompilePreludishly(haskell-1.3/LibPosixDB,lhs, -fhaskell-1.3 -split-objs LibPosixDB '-#include"stgio.h"' '-#include"libposix.h"')
1050 CompilePreludishly(haskell-1.3/LibPosixErr,lhs, -fhaskell-1.3 -split-objs LibPosixErr -H12m '-#include"stgio.h"' '-#include"libposix.h"')
1051 CompilePreludishly(haskell-1.3/LibPosixFiles,lhs, -fhaskell-1.3 -split-objs LibPosixFiles -H12m '-#include"stgio.h"' '-#include"libposix.h"')
1052 CompilePreludishly(haskell-1.3/LibPosixIO,lhs, -fhaskell-1.3 -split-objs LibPosixIO -H12m '-#include"stgio.h"' '-#include"libposix.h"' -monly-4-regs)
1053 CompilePreludishly(haskell-1.3/LibPosixProcEnv,lhs, -fhaskell-1.3 -split-objs LibPosixProcEnv -H12m '-#include"stgio.h"' '-#include"libposix.h"')
1054 CompilePreludishly(haskell-1.3/LibPosixProcPrim,lhs, -fhaskell-1.3 -split-objs LibPosixProcPrim -H16m '-#include"stgio.h"' '-#include"libposix.h"')
1055 CompilePreludishly(haskell-1.3/LibPosixTTY,lhs, -fhaskell-1.3 -split-objs LibPosixTTY -H12m '-#include"stgio.h"' '-#include"libposix.h"' -monly-2-regs)
1056 CompilePreludishly(haskell-1.3/LibPosixUtil,lhs, -fhaskell-1.3 -split-objs LibPosixUtil '-#include"stgio.h"' '-#include"libposix.h"' -monly-3-regs)
1059 the next six create our main "Prelude" interface files;
1060 NOT to be used here.
1063 CompilePreludishly(glaExts/PreludeGlaMisc,lhs, $(PREL_OPTS) -split-objs GlaMisc -ohi glaExts/PreludeGlaMisc.hi -monly-4-regs)
1065 CompilePreludishly(prelude/PreludeHi,hs,$(PREL_OPTS) -split-objs Hi -ohi prelude/Prelude.hi -fno-omit-reexported-instances)
1066 CompilePreludishly(prelude/PrelCoreHi,hs,$(PREL_OPTS) -split-objs CoreHi -ohi prelude/PreludeCore.hi -fno-omit-reexported-instances)
1068 CompilePreludishly(prelude/Prel13,hs,$(PREL_OPTS) -iprelude:glaExts:haskell-1.3 -split-objs Hi13 -ohi prelude/Prel13.hi -fno-omit-reexported-instances)
1069 CompilePreludishly(prelude/PrelCore13,hs,$(PREL_OPTS) -iprelude:glaExts:haskell-1.3 -split-objs Core13 -ohi prelude/PrelCore13.hi -fno-omit-reexported-instances)
1071 /* --- GHC utilities library --- */
1073 CompilePreludishly(ghc/Bag,lhs, )
1074 CompilePreludishly(ghc/BitSet,lhs, -monly-4-regs)
1075 CompilePreludishly(ghc/CharSeq,lhs, )
1076 CompilePreludishly(ghc/FiniteMap,lhs, -ighc -fhaskell-1.3)
1077 CompilePreludishly(ghc/ListSetOps,lhs, )
1078 CompilePreludishly(ghc/Maybes,lhs, -fhaskell-1.3)
1079 CompilePreludishly(ghc/PackedString,lhs,)
1080 CompilePreludishly(ghc/Regex,lhs, -fhaskell-1.3 '-#include"ghcRegex.h"')
1081 CompilePreludishly(ghc/MatchPS,lhs, -ighc -fhaskell-1.3)
1082 CompilePreludishly(ghc/Pretty,lhs, -ighc -fhaskell-1.3)
1083 #if GhcWithReadline == YES
1084 CompilePreludishly(ghc/Readline,lhs, -ighc -fhaskell-1.3 '-#include"ghcReadline.h"')
1086 #if GhcWithSockets == YES
1087 CompilePreludishly(ghc/Socket,lhs, -ighc -fhaskell-1.3)
1088 CompilePreludishly(ghc/SocketPrim,lhs, -ighc -fhaskell-1.3 -K2m -optcO-DNON_POSIX_SOURCE '-#include"ghcSockets.h"')
1089 CompilePreludishly(ghc/BSD,lhs, -ighc -fhaskell-1.3 -optcO-DNON_POSIX_SOURCE '-#include"ghcSockets.h"')
1090 CompilePreludishly(ghc/CError,lhs, -ighc -fhaskell-1.3 -K2m -fomit-derived-read)
1092 CompilePreludishly(ghc/Set,lhs, -ighc -fhaskell-1.3)
1093 CompilePreludishly(ghc/Util,lhs, -ighc -fhaskell-1.3)
1095 /* --- HBC-compatibility library --- */
1097 CompilePreludishly(hbc/Algebra,hs,)
1098 CompilePreludishly(hbc/Hash,hs, )
1099 CompilePreludishly(hbc/ListUtil,hs, -ihbc -fhaskell-1.3)
1100 CompilePreludishly(hbc/Miranda,hs, -ihbc)
1101 CompilePreludishly(hbc/NameSupply,hs, )
1102 CompilePreludishly(hbc/Native,hs, -ihbc -fhaskell-1.3)
1103 CompilePreludishly(hbc/Number,hs, )
1104 CompilePreludishly(hbc/Parse,hs, -ihbc -fhaskell-1.3)
1105 CompilePreludishly(hbc/Polynomial,hs, -ihbc) /* this code could not ever have worked */
1106 CompilePreludishly(hbc/Pretty,hs, )
1107 CompilePreludishly(hbc/Printf,hs, )
1108 CompilePreludishly(hbc/QSort,hs, )
1109 CompilePreludishly(hbc/Random,hs, -monly-4-regs)
1110 CompilePreludishly(hbc/SimpleLex,hs, )
1111 CompilePreludishly(hbc/Time,hs, )
1112 CompilePreludishly(hbc/Trace,hs, -fglasgow-exts)
1113 CompilePreludishly(hbc/Word,hs, -K2m -monly-4-regs)
1115 /****************************************************************
1117 * misc "make" targets -- depend, clean, tags *
1119 ****************************************************************/
1121 /* this is a BAD idea!
1122 ExtraStuffToClean( $(SRCS_C) )
1123 without the .hc files, the distrib cannot boot itself
1125 ExtraStuffToBeVeryClean( $(SRCS_C) )
1126 ExtraStuffToBeVeryClean( $(STD_VERY_CLEAN) )
1129 /* Ugly but OK? [WDP 94/09] */
1130 HsTagsTarget( */[A-Z]*.*hs )
1131 HSTAGS_OPTS=-cpp -fglasgow-exts
1133 /* pretty horrible */
1135 /* we do the depend stuff in a semi-automated way:
1137 make depend # to create basic dependendencies
1138 make print_file_lists # to dup dependencies for various builds
1139 make Makefile # to slurp in dup'd dependencies
1144 @echo making Jmake.inc5 ...
1145 @echo '/* Machine-generated file: do not edit! */' > Jmake.inc5
1146 perl ./make_extra_deps >> Jmake.inc5
1148 /* now include the extra dependencies so generated */
1149 #include "Jmake.inc5"
1151 /* should be *LAST* */
1152 #if HaskellCompilerType != HC_USE_HC_FILES
1153 /* otherwise, the dependencies jeopardize our .hc files --
1154 which are all we have! */
1155 MAIN_INCLUDE_DIR = $(TOP_PWD)/$(CURRENT_DIR)/$(GHC_INCLUDES)
1156 MKDEPENDHS_OPTS= -o .hc -iprelude:glaExts:ghc:hbc:haskell-1.3 -I$(MAIN_INCLUDE_DIR)
1158 HaskellDependTarget( $(BASIC_LHS) $(BASIC_HS_PREL) $(HBCLIB_HS) $(GHCLIB_LHS) $(ONE3_LHS) )