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 \
77 -fshow-pragma-name-errs \
79 -fomit-default-instance-methods \
80 -cpp -fglasgow-exts -genSPECS \
81 -DUSE_FOLDR_BUILD -D__OVERLAPPING_INSTANCES__ \
82 HcMaxHeapFlag $(EXTRA_HC_OPTS)
84 /* For building with unboxed stuff add:
86 -fspecialise-unboxed -genSPECSunboxed -D__UNBOXED_INSTANCES__ -D__UNBOXED_SPECS__
88 This is currently done using -user-way-b = -unboxed-specialisation
91 /* For the "Prelude" bits: mostly we do not want it to pick
92 up interface information from anywhere except *here*.
94 -fomit-reexported-instances: we occasionally override
95 this (e.g., on PreludeHi.hs, to create Prelude.hi)
97 PREL_OPTS=-prelude -fno-implicit-prelude -fomit-reexported-instances
99 /* per-build options: shared with RTS */
100 #define rts_or_lib(r,l) l
101 #include "../mkworld/GHC_OPTS"
103 /* this is just friendliness to "hstags" */
104 HSTAGS_OPTS=-fglasgow-exts
106 /****************************************************************
108 * what it is we are compiling; *
109 * these are long and tedious lists, but c'est la guerre *
111 ****************************************************************/
113 /* the actual source bits */
116 glaExts/PreludeErrIO.lhs \
117 glaExts/PreludePrimIO.lhs \
118 glaExts/PreludeGlaST.lhs \
119 glaExts/PreludeDialogueIO.lhs \
121 glaExts/MainIO13.lhs \
123 glaExts/ByteOps.lhs \
125 prelude/PreludeIO.lhs \
126 prelude/PreludeIOError.lhs \
127 prelude/PreludeMonadicIO.lhs \
128 prelude/PreludeReadTextIO.lhs \
129 prelude/PreludeStdIO.lhs \
130 prelude/PreludeWriteTextIO.lhs \
134 prelude/Concurrent.lhs \
135 prelude/ChannelVar.lhs \
136 prelude/Channel.lhs \
137 prelude/Semaphore.lhs \
139 prelude/SampleVar.lhs \
141 prelude/Parallel.lhs \
143 glaExts/PreludeGlaMisc.lhs /* interface */
146 prelude/TysBasic.hs \
149 prelude/TyComplex.hs \
156 prelude/IComplex.hs \
160 prelude/IInteger.hs \
177 prelude/FoldrBuild.hs \
179 prelude/PrelCoreHi.hs /* interface */ \
180 prelude/PreludeHi.hs /* interface */ \
182 prelude/PrelCore13.hs /* interface */ \
183 prelude/Prel13.hs /* interface */
185 #if MakeDoesNestedMacros != YES
187 /* make is brain-dead: use the file created below (w/ a good make) */
188 #include "Jmake.inc1"
190 #else /* good make */
192 print_file_lists : print_file_list1 print_file_list2 print_file_list3 print_file_list4 print_file_list5
194 #define SrcThingVars(blob) @@\
195 CAT2(blob,_HC_norm) = $(CAT2(blob,_HS):.hs=.hc) @@\
196 CAT2(blob,_HC_p) = $(CAT2(blob,_HS):.hs=_p.hc) @@\
197 CAT2(blob,_HC_t) = $(CAT2(blob,_HS):.hs=_t.hc) @@\
198 CAT2(blob,_HC_u) = $(CAT2(blob,_HS):.hs=_u.hc) @@\
199 CAT2(blob,_HC_mc) = $(CAT2(blob,_HS):.hs=_mc.hc) @@\
200 CAT2(blob,_HC_mr) = $(CAT2(blob,_HS):.hs=_mr.hc) @@\
201 CAT2(blob,_HC_mt) = $(CAT2(blob,_HS):.hs=_mt.hc) @@\
202 CAT2(blob,_HC_mp) = $(CAT2(blob,_HS):.hs=_mp.hc) @@\
203 CAT2(blob,_HC_mg) = $(CAT2(blob,_HS):.hs=_mg.hc) @@\
204 CAT2(blob,_HC_2s) = $(CAT2(blob,_HS):.hs=_2s.hc) @@\
205 CAT2(blob,_HC_1s) = $(CAT2(blob,_HS):.hs=_1s.hc) @@\
206 CAT2(blob,_HC_du) = $(CAT2(blob,_HS):.hs=_du.hc) @@\
207 CAT2(blob,_HC_a) = $(CAT2(blob,_HS):.hs=_a.hc) @@\
208 CAT2(blob,_HC_b) = $(CAT2(blob,_HS):.hs=_b.hc) @@\
209 CAT2(blob,_HC_c) = $(CAT2(blob,_HS):.hs=_c.hc) @@\
210 CAT2(blob,_HC_d) = $(CAT2(blob,_HS):.hs=_d.hc) @@\
211 CAT2(blob,_HC_e) = $(CAT2(blob,_HS):.hs=_e.hc) @@\
212 CAT2(blob,_HC_f) = $(CAT2(blob,_HS):.hs=_f.hc) @@\
213 CAT2(blob,_HC_g) = $(CAT2(blob,_HS):.hs=_g.hc) @@\
214 CAT2(blob,_HC_h) = $(CAT2(blob,_HS):.hs=_h.hc) @@\
215 CAT2(blob,_HC_i) = $(CAT2(blob,_HS):.hs=_i.hc) @@\
216 CAT2(blob,_HC_j) = $(CAT2(blob,_HS):.hs=_j.hc) @@\
217 CAT2(blob,_HC_k) = $(CAT2(blob,_HS):.hs=_k.hc) @@\
218 CAT2(blob,_HC_l) = $(CAT2(blob,_HS):.hs=_l.hc) @@\
219 CAT2(blob,_HC_m) = $(CAT2(blob,_HS):.hs=_m.hc) @@\
220 CAT2(blob,_HC_n) = $(CAT2(blob,_HS):.hs=_n.hc) @@\
221 CAT2(blob,_HC_o) = $(CAT2(blob,_HS):.hs=_o.hc) @@\
222 CAT2(blob,_HC_A) = $(CAT2(blob,_HS):.hs=_A.hc) @@\
223 CAT2(blob,_HC_B) = $(CAT2(blob,_HS):.hs=_B.hc) @@\
225 CAT2(blob,_DEP_norm) = $(CAT2(blob,_HC_norm):.hc=.o) @@\
226 CAT2(blob,_DEP_p) = $(CAT2(blob,_HC_p):.hc=.o) @@\
227 CAT2(blob,_DEP_t) = $(CAT2(blob,_HC_t):.hc=.o) @@\
228 CAT2(blob,_DEP_u) = $(CAT2(blob,_HC_u):.hc=.o) @@\
229 CAT2(blob,_DEP_mc) = $(CAT2(blob,_HC_mc):.hc=.o) @@\
230 CAT2(blob,_DEP_mr) = $(CAT2(blob,_HC_mr):.hc=.o) @@\
231 CAT2(blob,_DEP_mt) = $(CAT2(blob,_HC_mt):.hc=.o) @@\
232 CAT2(blob,_DEP_mp) = $(CAT2(blob,_HC_mp):.hc=.o) @@\
233 CAT2(blob,_DEP_mg) = $(CAT2(blob,_HC_mg):.hc=.o) @@\
234 CAT2(blob,_DEP_2s) = $(CAT2(blob,_HC_2s):.hc=.o) @@\
235 CAT2(blob,_DEP_1s) = $(CAT2(blob,_HC_1s):.hc=.o) @@\
236 CAT2(blob,_DEP_du) = $(CAT2(blob,_HC_du):.hc=.o) @@\
237 CAT2(blob,_DEP_a) = $(CAT2(blob,_HC_a):.hc=.o) @@\
238 CAT2(blob,_DEP_b) = $(CAT2(blob,_HC_b):.hc=.o) @@\
239 CAT2(blob,_DEP_c) = $(CAT2(blob,_HC_c):.hc=.o) @@\
240 CAT2(blob,_DEP_d) = $(CAT2(blob,_HC_d):.hc=.o) @@\
241 CAT2(blob,_DEP_e) = $(CAT2(blob,_HC_e):.hc=.o) @@\
242 CAT2(blob,_DEP_f) = $(CAT2(blob,_HC_f):.hc=.o) @@\
243 CAT2(blob,_DEP_g) = $(CAT2(blob,_HC_g):.hc=.o) @@\
244 CAT2(blob,_DEP_h) = $(CAT2(blob,_HC_h):.hc=.o) @@\
245 CAT2(blob,_DEP_i) = $(CAT2(blob,_HC_i):.hc=.o) @@\
246 CAT2(blob,_DEP_j) = $(CAT2(blob,_HC_j):.hc=.o) @@\
247 CAT2(blob,_DEP_k) = $(CAT2(blob,_HC_k):.hc=.o) @@\
248 CAT2(blob,_DEP_l) = $(CAT2(blob,_HC_l):.hc=.o) @@\
249 CAT2(blob,_DEP_m) = $(CAT2(blob,_HC_m):.hc=.o) @@\
250 CAT2(blob,_DEP_n) = $(CAT2(blob,_HC_n):.hc=.o) @@\
251 CAT2(blob,_DEP_o) = $(CAT2(blob,_HC_o):.hc=.o) @@\
252 CAT2(blob,_DEP_A) = $(CAT2(blob,_HC_A):.hc=.o) @@\
253 CAT2(blob,_DEP_B) = $(CAT2(blob,_HC_B):.hc=.o) @@\
255 CAT2(blob,_HIs_p) = $(CAT2(blob,_HIs):.hi=_p.hi) @@\
256 CAT2(blob,_HIs_t) = $(CAT2(blob,_HIs):.hi=_t.hi) @@\
257 CAT2(blob,_HIs_u) = $(CAT2(blob,_HIs):.hi=_u.hi) @@\
258 CAT2(blob,_HIs_mc) = $(CAT2(blob,_HIs):.hi=_mc.hi) @@\
259 CAT2(blob,_HIs_mr) = $(CAT2(blob,_HIs):.hi=_mr.hi) @@\
260 CAT2(blob,_HIs_mt) = $(CAT2(blob,_HIs):.hi=_mt.hi) @@\
261 CAT2(blob,_HIs_mp) = $(CAT2(blob,_HIs):.hi=_mp.hi) @@\
262 CAT2(blob,_HIs_mg) = $(CAT2(blob,_HIs):.hi=_mg.hi) @@\
263 CAT2(blob,_HIs_2s) = $(CAT2(blob,_HIs):.hi=_2s.hi) @@\
264 CAT2(blob,_HIs_1s) = $(CAT2(blob,_HIs):.hi=_1s.hi) @@\
265 CAT2(blob,_HIs_du) = $(CAT2(blob,_HIs):.hi=_du.hi) @@\
266 CAT2(blob,_HIs_a) = $(CAT2(blob,_HIs):.hi=_a.hi) @@\
267 CAT2(blob,_HIs_b) = $(CAT2(blob,_HIs):.hi=_b.hi) @@\
268 CAT2(blob,_HIs_c) = $(CAT2(blob,_HIs):.hi=_c.hi) @@\
269 CAT2(blob,_HIs_d) = $(CAT2(blob,_HIs):.hi=_d.hi) @@\
270 CAT2(blob,_HIs_e) = $(CAT2(blob,_HIs):.hi=_e.hi) @@\
271 CAT2(blob,_HIs_f) = $(CAT2(blob,_HIs):.hi=_f.hi) @@\
272 CAT2(blob,_HIs_g) = $(CAT2(blob,_HIs):.hi=_g.hi) @@\
273 CAT2(blob,_HIs_h) = $(CAT2(blob,_HIs):.hi=_h.hi) @@\
274 CAT2(blob,_HIs_i) = $(CAT2(blob,_HIs):.hi=_i.hi) @@\
275 CAT2(blob,_HIs_j) = $(CAT2(blob,_HIs):.hi=_j.hi) @@\
276 CAT2(blob,_HIs_k) = $(CAT2(blob,_HIs):.hi=_k.hi) @@\
277 CAT2(blob,_HIs_l) = $(CAT2(blob,_HIs):.hi=_l.hi) @@\
278 CAT2(blob,_HIs_m) = $(CAT2(blob,_HIs):.hi=_m.hi) @@\
279 CAT2(blob,_HIs_n) = $(CAT2(blob,_HIs):.hi=_n.hi) @@\
280 CAT2(blob,_HIs_o) = $(CAT2(blob,_HIs):.hi=_o.hi) @@\
281 CAT2(blob,_HIs_A) = $(CAT2(blob,_HIs):.hi=_A.hi) @@\
282 CAT2(blob,_HIs_B) = $(CAT2(blob,_HIs):.hi=_B.hi)
285 #define PrintFileStuff(blob,outf) \
286 @echo 'IfGhcBuild_normal(' CAT2(blob,_HC_norm) = $(CAT2(blob,_HC_norm)) ')' >> outf @@\
287 @echo 'IfGhcBuild_normal(' CAT2(blob,_DEP_norm) = $(CAT2(blob,_DEP_norm)) ')' >> outf @@\
288 @echo 'IfGhcBuild_p(' CAT2(blob,_HC_p) = $(CAT2(blob,_HC_p)) ')' >> outf @@\
289 @echo 'IfGhcBuild_t(' CAT2(blob,_HC_t) = $(CAT2(blob,_HC_t)) ')' >> outf @@\
290 @echo 'IfGhcBuild_u(' CAT2(blob,_HC_u) = $(CAT2(blob,_HC_u)) ')' >> outf @@\
291 @echo 'IfGhcBuild_mc(' CAT2(blob,_HC_mc) = $(CAT2(blob,_HC_mc)) ')' >> outf @@\
292 @echo 'IfGhcBuild_mr(' CAT2(blob,_HC_mr) = $(CAT2(blob,_HC_mr)) ')' >> outf @@\
293 @echo 'IfGhcBuild_mt(' CAT2(blob,_HC_mt) = $(CAT2(blob,_HC_mt)) ')' >> outf @@\
294 @echo 'IfGhcBuild_mp(' CAT2(blob,_HC_mp) = $(CAT2(blob,_HC_mp)) ')' >> outf @@\
295 @echo 'IfGhcBuild_mg(' CAT2(blob,_HC_mg) = $(CAT2(blob,_HC_mg)) ')' >> outf @@\
296 @echo 'IfGhcBuild_2s(' CAT2(blob,_HC_2s) = $(CAT2(blob,_HC_2s)) ')' >> outf @@\
297 @echo 'IfGhcBuild_1s(' CAT2(blob,_HC_1s) = $(CAT2(blob,_HC_1s)) ')' >> outf @@\
298 @echo 'IfGhcBuild_du(' CAT2(blob,_HC_du) = $(CAT2(blob,_HC_du)) ')' >> outf @@\
299 @echo 'IfGhcBuild_a(' CAT2(blob,_HC_a) = $(CAT2(blob,_HC_a)) ')' >> outf @@\
300 @echo 'IfGhcBuild_b(' CAT2(blob,_HC_b) = $(CAT2(blob,_HC_b)) ')' >> outf @@\
301 @echo 'IfGhcBuild_c(' CAT2(blob,_HC_c) = $(CAT2(blob,_HC_c)) ')' >> outf @@\
302 @echo 'IfGhcBuild_d(' CAT2(blob,_HC_d) = $(CAT2(blob,_HC_d)) ')' >> outf @@\
303 @echo 'IfGhcBuild_e(' CAT2(blob,_HC_e) = $(CAT2(blob,_HC_e)) ')' >> outf @@\
304 @echo 'IfGhcBuild_f(' CAT2(blob,_HC_f) = $(CAT2(blob,_HC_f)) ')' >> outf @@\
305 @echo 'IfGhcBuild_g(' CAT2(blob,_HC_g) = $(CAT2(blob,_HC_g)) ')' >> outf @@\
306 @echo 'IfGhcBuild_h(' CAT2(blob,_HC_h) = $(CAT2(blob,_HC_h)) ')' >> outf @@\
307 @echo 'IfGhcBuild_i(' CAT2(blob,_HC_i) = $(CAT2(blob,_HC_i)) ')' >> outf @@\
308 @echo 'IfGhcBuild_j(' CAT2(blob,_HC_j) = $(CAT2(blob,_HC_j)) ')' >> outf @@\
309 @echo 'IfGhcBuild_k(' CAT2(blob,_HC_k) = $(CAT2(blob,_HC_k)) ')' >> outf @@\
310 @echo 'IfGhcBuild_l(' CAT2(blob,_HC_l) = $(CAT2(blob,_HC_l)) ')' >> outf @@\
311 @echo 'IfGhcBuild_m(' CAT2(blob,_HC_m) = $(CAT2(blob,_HC_m)) ')' >> outf @@\
312 @echo 'IfGhcBuild_n(' CAT2(blob,_HC_n) = $(CAT2(blob,_HC_n)) ')' >> outf @@\
313 @echo 'IfGhcBuild_o(' CAT2(blob,_HC_o) = $(CAT2(blob,_HC_o)) ')' >> outf @@\
314 @echo 'IfGhcBuild_A(' CAT2(blob,_HC_A) = $(CAT2(blob,_HC_A)) ')' >> outf @@\
315 @echo 'IfGhcBuild_B(' CAT2(blob,_HC_B) = $(CAT2(blob,_HC_B)) ')' >> outf @@\
316 @echo 'IfGhcBuild_p(' CAT2(blob,_DEP_p) = $(CAT2(blob,_DEP_p)) ')' >> outf @@\
317 @echo 'IfGhcBuild_t(' CAT2(blob,_DEP_t) = $(CAT2(blob,_DEP_t)) ')' >> outf @@\
318 @echo 'IfGhcBuild_u(' CAT2(blob,_DEP_u) = $(CAT2(blob,_DEP_u)) ')' >> outf @@\
319 @echo 'IfGhcBuild_mc(' CAT2(blob,_DEP_mc) = $(CAT2(blob,_DEP_mc)) ')' >> outf @@\
320 @echo 'IfGhcBuild_mr(' CAT2(blob,_DEP_mr) = $(CAT2(blob,_DEP_mr)) ')' >> outf @@\
321 @echo 'IfGhcBuild_mt(' CAT2(blob,_DEP_mt) = $(CAT2(blob,_DEP_mt)) ')' >> outf @@\
322 @echo 'IfGhcBuild_mp(' CAT2(blob,_DEP_mp) = $(CAT2(blob,_DEP_mp)) ')' >> outf @@\
323 @echo 'IfGhcBuild_mg(' CAT2(blob,_DEP_mg) = $(CAT2(blob,_DEP_mg)) ')' >> outf @@\
324 @echo 'IfGhcBuild_2s(' CAT2(blob,_DEP_2s) = $(CAT2(blob,_DEP_2s)) ')' >> outf @@\
325 @echo 'IfGhcBuild_1s(' CAT2(blob,_DEP_1s) = $(CAT2(blob,_DEP_1s)) ')' >> outf @@\
326 @echo 'IfGhcBuild_du(' CAT2(blob,_DEP_du) = $(CAT2(blob,_DEP_du)) ')' >> outf @@\
327 @echo 'IfGhcBuild_a(' CAT2(blob,_DEP_a) = $(CAT2(blob,_DEP_a)) ')' >> outf @@\
328 @echo 'IfGhcBuild_b(' CAT2(blob,_DEP_b) = $(CAT2(blob,_DEP_b)) ')' >> outf @@\
329 @echo 'IfGhcBuild_c(' CAT2(blob,_DEP_c) = $(CAT2(blob,_DEP_c)) ')' >> outf @@\
330 @echo 'IfGhcBuild_d(' CAT2(blob,_DEP_d) = $(CAT2(blob,_DEP_d)) ')' >> outf @@\
331 @echo 'IfGhcBuild_e(' CAT2(blob,_DEP_e) = $(CAT2(blob,_DEP_e)) ')' >> outf @@\
332 @echo 'IfGhcBuild_f(' CAT2(blob,_DEP_f) = $(CAT2(blob,_DEP_f)) ')' >> outf @@\
333 @echo 'IfGhcBuild_g(' CAT2(blob,_DEP_g) = $(CAT2(blob,_DEP_g)) ')' >> outf @@\
334 @echo 'IfGhcBuild_h(' CAT2(blob,_DEP_h) = $(CAT2(blob,_DEP_h)) ')' >> outf @@\
335 @echo 'IfGhcBuild_i(' CAT2(blob,_DEP_i) = $(CAT2(blob,_DEP_i)) ')' >> outf @@\
336 @echo 'IfGhcBuild_j(' CAT2(blob,_DEP_j) = $(CAT2(blob,_DEP_j)) ')' >> outf @@\
337 @echo 'IfGhcBuild_k(' CAT2(blob,_DEP_k) = $(CAT2(blob,_DEP_k)) ')' >> outf @@\
338 @echo 'IfGhcBuild_l(' CAT2(blob,_DEP_l) = $(CAT2(blob,_DEP_l)) ')' >> outf @@\
339 @echo 'IfGhcBuild_m(' CAT2(blob,_DEP_m) = $(CAT2(blob,_DEP_m)) ')' >> outf @@\
340 @echo 'IfGhcBuild_n(' CAT2(blob,_DEP_n) = $(CAT2(blob,_DEP_n)) ')' >> outf @@\
341 @echo 'IfGhcBuild_o(' CAT2(blob,_DEP_o) = $(CAT2(blob,_DEP_o)) ')' >> outf @@\
342 @echo 'IfGhcBuild_A(' CAT2(blob,_DEP_A) = $(CAT2(blob,_DEP_A)) ')' >> outf @@\
343 @echo 'IfGhcBuild_B(' CAT2(blob,_DEP_B) = $(CAT2(blob,_DEP_B)) ')' >> outf @@\
344 @echo 'IfGhcBuild_p(' CAT2(blob,_HIs_p) = $(CAT2(blob,_HIs_p)) ')' >> outf @@\
345 @echo 'IfGhcBuild_t(' CAT2(blob,_HIs_t) = $(CAT2(blob,_HIs_t)) ')' >> outf @@\
346 @echo 'IfGhcBuild_u(' CAT2(blob,_HIs_u) = $(CAT2(blob,_HIs_u)) ')' >> outf @@\
347 @echo 'IfGhcBuild_mc(' CAT2(blob,_HIs_mc) = $(CAT2(blob,_HIs_mc)) ')' >> outf @@\
348 @echo 'IfGhcBuild_mr(' CAT2(blob,_HIs_mr) = $(CAT2(blob,_HIs_mr)) ')' >> outf @@\
349 @echo 'IfGhcBuild_mt(' CAT2(blob,_HIs_mt) = $(CAT2(blob,_HIs_mt)) ')' >> outf @@\
350 @echo 'IfGhcBuild_mp(' CAT2(blob,_HIs_mp) = $(CAT2(blob,_HIs_mp)) ')' >> outf @@\
351 @echo 'IfGhcBuild_mg(' CAT2(blob,_HIs_mg) = $(CAT2(blob,_HIs_mg)) ')' >> outf @@\
352 @echo 'IfGhcBuild_2s(' CAT2(blob,_HIs_2s) = $(CAT2(blob,_HIs_2s)) ')' >> outf @@\
353 @echo 'IfGhcBuild_1s(' CAT2(blob,_HIs_1s) = $(CAT2(blob,_HIs_1s)) ')' >> outf @@\
354 @echo 'IfGhcBuild_du(' CAT2(blob,_HIs_du) = $(CAT2(blob,_HIs_du)) ')' >> outf @@\
355 @echo 'IfGhcBuild_a(' CAT2(blob,_HIs_a) = $(CAT2(blob,_HIs_a)) ')' >> outf @@\
356 @echo 'IfGhcBuild_b(' CAT2(blob,_HIs_b) = $(CAT2(blob,_HIs_b)) ')' >> outf @@\
357 @echo 'IfGhcBuild_c(' CAT2(blob,_HIs_c) = $(CAT2(blob,_HIs_c)) ')' >> outf @@\
358 @echo 'IfGhcBuild_d(' CAT2(blob,_HIs_d) = $(CAT2(blob,_HIs_d)) ')' >> outf @@\
359 @echo 'IfGhcBuild_e(' CAT2(blob,_HIs_e) = $(CAT2(blob,_HIs_e)) ')' >> outf @@\
360 @echo 'IfGhcBuild_f(' CAT2(blob,_HIs_f) = $(CAT2(blob,_HIs_f)) ')' >> outf @@\
361 @echo 'IfGhcBuild_g(' CAT2(blob,_HIs_g) = $(CAT2(blob,_HIs_g)) ')' >> outf @@\
362 @echo 'IfGhcBuild_h(' CAT2(blob,_HIs_h) = $(CAT2(blob,_HIs_h)) ')' >> outf @@\
363 @echo 'IfGhcBuild_i(' CAT2(blob,_HIs_i) = $(CAT2(blob,_HIs_i)) ')' >> outf @@\
364 @echo 'IfGhcBuild_j(' CAT2(blob,_HIs_j) = $(CAT2(blob,_HIs_j)) ')' >> outf @@\
365 @echo 'IfGhcBuild_k(' CAT2(blob,_HIs_k) = $(CAT2(blob,_HIs_k)) ')' >> outf @@\
366 @echo 'IfGhcBuild_l(' CAT2(blob,_HIs_l) = $(CAT2(blob,_HIs_l)) ')' >> outf @@\
367 @echo 'IfGhcBuild_m(' CAT2(blob,_HIs_m) = $(CAT2(blob,_HIs_m)) ')' >> outf @@\
368 @echo 'IfGhcBuild_n(' CAT2(blob,_HIs_n) = $(CAT2(blob,_HIs_n)) ')' >> outf @@\
369 @echo 'IfGhcBuild_o(' CAT2(blob,_HIs_o) = $(CAT2(blob,_HIs_o)) ')' >> outf @@\
370 @echo 'IfGhcBuild_A(' CAT2(blob,_HIs_A) = $(CAT2(blob,_HIs_A)) ')' >> outf @@\
371 @echo 'IfGhcBuild_B(' CAT2(blob,_HIs_B) = $(CAT2(blob,_HIs_B)) ')' >> outf
373 BASIC_HS = $(BASIC_LHS:.lhs=.hs) $(BASIC_HS_PREL)
374 BASIC_OBJS_DIRS = $(BASIC_HS:.hs=)
380 @echo making Jmake.inc1 ...
381 @echo '/* Machine-generated file: do not edit! */' > Jmake.inc1
382 @echo BASIC_HS = $(BASIC_HS) >> Jmake.inc1
383 @echo BASIC_OBJS_DIRS = $(BASIC_OBJS_DIRS) >> Jmake.inc1
384 PrintFileStuff(BASIC,Jmake.inc1)
386 #endif /* good make */
388 /* ------------------------------------------*/
389 /* same stuff, for Haskell 1.3 library */
391 haskell-1.3/LibSystem.lhs \
392 haskell-1.3/LibCPUTime.lhs \
393 haskell-1.3/LibDirectory.lhs \
394 haskell-1.3/LibTime.lhs \
395 haskell-1.3/LibPosix.lhs \
396 haskell-1.3/LibPosixDB.lhs \
397 haskell-1.3/LibPosixErr.lhs \
398 haskell-1.3/LibPosixFiles.lhs \
399 haskell-1.3/LibPosixIO.lhs \
400 haskell-1.3/LibPosixProcEnv.lhs \
401 haskell-1.3/LibPosixProcPrim.lhs \
402 haskell-1.3/LibPosixTTY.lhs \
403 haskell-1.3/LibPosixUtil.lhs
405 #if MakeDoesNestedMacros != YES
406 /* make is brain-dead: use file produced below (w/ a good make) */
407 #include "Jmake.inc2"
409 #else /* good make */
411 ONE3_HS = $(ONE3_LHS:.lhs=.hs)
412 ONE3_OBJS_DIRS = $(ONE3_HS:.hs=)
418 @echo making Jmake.inc2 ...
419 @echo '/* Machine-generated file: do not edit! */' > Jmake.inc2
420 @echo ONE3_HS = $(ONE3_HS) >> Jmake.inc2
421 @echo ONE3_OBJS_DIRS = $(ONE3_OBJS_DIRS) >> Jmake.inc2
422 PrintFileStuff(ONE3,Jmake.inc2)
424 #endif /* good make */
426 /* ------------------------------------------*/
427 /* same stuff, for GHC utilities library */
429 #if GhcWithReadline != YES
430 # define __readline_lhs /*none*/
431 # define __readline_hi /*none*/
433 # define __readline_lhs \
435 # define __readline_hi \
439 #if GhcWithSockets != YES
440 # define __sockets_lhs /*none*/
441 # define __sockets_hi /*none*/
443 # define __sockets_lhs \
448 # define __sockets_hi \
461 ghc/PackedString.lhs \
466 ghc/Util.lhs __readline_lhs __sockets_lhs
468 #if MakeDoesNestedMacros != YES
469 /* make is brain-dead: use the file produced below */
470 #include "Jmake.inc3"
472 #else /* good make */
474 GHCLIB_HS = $(GHCLIB_LHS:.lhs=.hs)
475 GHCLIB_OBJS_DIRS = $(GHCLIB_HS:.hs=)
481 @echo making Jmake.inc3 ...
482 @echo '/* Machine-generated file: do not edit! */' > Jmake.inc3
483 @echo GHCLIB_HS = $(GHCLIB_HS) >> Jmake.inc3
484 @echo GHCLIB_OBJS_DIRS = $(GHCLIB_OBJS_DIRS) >> Jmake.inc3
485 PrintFileStuff(GHCLIB,Jmake.inc3)
487 #endif /* good make */
489 /* ------------------------------------------*/
490 /* same stuff, for HBC-compatibility library */
509 #if MakeDoesNestedMacros != YES
510 /* make is brain-dead: use file produced below (w/ a good make) */
511 #include "Jmake.inc4"
513 #else /* good make */
515 HBCLIB_OBJS_DIRS = $(HBCLIB_HS:.hs=)
521 @echo making Jmake.inc4 ...
522 @echo '/* Machine-generated file: do not edit! */' > Jmake.inc4
523 @echo HBCLIB_HS = $(HBCLIB_HS) >> Jmake.inc4
524 @echo HBCLIB_OBJS_DIRS = $(HBCLIB_OBJS_DIRS) >> Jmake.inc4
525 PrintFileStuff(HBCLIB,Jmake.inc4)
527 #endif /* good make */
529 #if MakeDoesNestedMacros == YES
531 /* ---- occasionally convenient make targets ---- */
532 IfGhcBuild_normal(hcs :: $(BASIC_HC_norm) $(ONE3_HC_norm) $(GHCLIB_HC_norm) $(HBCLIB_HC_norm))
533 IfGhcBuild_p(hcs_p :: $(BASIC_HC_p) $(ONE3_HC_p) $(GHCLIB_HC_p) $(HBCLIB_HC_p))
534 IfGhcBuild_t(hcs_t :: $(BASIC_HC_t) $(ONE3_HC_t) $(GHCLIB_HC_t) $(HBCLIB_HC_t))
535 IfGhcBuild_u(hcs_u :: $(BASIC_HC_u) $(ONE3_HC_u) $(GHCLIB_HC_u) $(HBCLIB_HC_u))
536 IfGhcBuild_mc(hcs_mc :: $(BASIC_HC_mc) $(ONE3_HC_mc) $(GHCLIB_HC_mc) $(HBCLIB_HC_mc))
537 IfGhcBuild_mr(hcs_mr :: $(BASIC_HC_mr) $(ONE3_HC_mr) $(GHCLIB_HC_mr) $(HBCLIB_HC_mr))
538 IfGhcBuild_mt(hcs_mt :: $(BASIC_HC_mt) $(ONE3_HC_mt) $(GHCLIB_HC_mt) $(HBCLIB_HC_mt))
539 IfGhcBuild_mp(hcs_mp :: $(BASIC_HC_mp) $(ONE3_HC_mp) $(GHCLIB_HC_mp) $(HBCLIB_HC_mp))
540 IfGhcBuild_mg(hcs_mg :: $(BASIC_HC_mg) $(ONE3_HC_mg) $(GHCLIB_HC_mg) $(HBCLIB_HC_mg))
541 IfGhcBuild_2s(hcs_2s :: $(BASIC_HC_2s) $(ONE3_HC_2s) $(GHCLIB_HC_2s) $(HBCLIB_HC_2s))
542 IfGhcBuild_1s(hcs_1s :: $(BASIC_HC_1s) $(ONE3_HC_1s) $(GHCLIB_HC_1s) $(HBCLIB_HC_1s))
543 IfGhcBuild_du(hcs_du :: $(BASIC_HC_du) $(ONE3_HC_du) $(GHCLIB_HC_du) $(HBCLIB_HC_du))
544 IfGhcBuild_a(hcs_a :: $(BASIC_HC_a) $(ONE3_HC_a) $(GHCLIB_HC_a) $(HBCLIB_HC_a))
545 IfGhcBuild_b(hcs_b :: $(BASIC_HC_b) $(ONE3_HC_b) $(GHCLIB_HC_b) $(HBCLIB_HC_b))
546 IfGhcBuild_c(hcs_c :: $(BASIC_HC_c) $(ONE3_HC_c) $(GHCLIB_HC_c) $(HBCLIB_HC_c))
547 IfGhcBuild_d(hcs_d :: $(BASIC_HC_d) $(ONE3_HC_d) $(GHCLIB_HC_d) $(HBCLIB_HC_d))
548 IfGhcBuild_e(hcs_e :: $(BASIC_HC_e) $(ONE3_HC_e) $(GHCLIB_HC_e) $(HBCLIB_HC_e))
549 IfGhcBuild_f(hcs_f :: $(BASIC_HC_f) $(ONE3_HC_f) $(GHCLIB_HC_f) $(HBCLIB_HC_f))
550 IfGhcBuild_g(hcs_g :: $(BASIC_HC_g) $(ONE3_HC_g) $(GHCLIB_HC_g) $(HBCLIB_HC_g))
551 IfGhcBuild_h(hcs_h :: $(BASIC_HC_h) $(ONE3_HC_h) $(GHCLIB_HC_h) $(HBCLIB_HC_h))
552 IfGhcBuild_i(hcs_i :: $(BASIC_HC_i) $(ONE3_HC_i) $(GHCLIB_HC_i) $(HBCLIB_HC_i))
553 IfGhcBuild_j(hcs_j :: $(BASIC_HC_j) $(ONE3_HC_j) $(GHCLIB_HC_j) $(HBCLIB_HC_j))
554 IfGhcBuild_k(hcs_k :: $(BASIC_HC_k) $(ONE3_HC_k) $(GHCLIB_HC_k) $(HBCLIB_HC_k))
555 IfGhcBuild_l(hcs_l :: $(BASIC_HC_l) $(ONE3_HC_l) $(GHCLIB_HC_l) $(HBCLIB_HC_l))
556 IfGhcBuild_m(hcs_m :: $(BASIC_HC_m) $(ONE3_HC_m) $(GHCLIB_HC_m) $(HBCLIB_HC_m))
557 IfGhcBuild_n(hcs_n :: $(BASIC_HC_n) $(ONE3_HC_n) $(GHCLIB_HC_n) $(HBCLIB_HC_n))
558 IfGhcBuild_o(hcs_o :: $(BASIC_HC_o) $(ONE3_HC_o) $(GHCLIB_HC_o) $(HBCLIB_HC_o))
559 IfGhcBuild_A(hcs_A :: $(BASIC_HC_A) $(ONE3_HC_A) $(GHCLIB_HC_A) $(HBCLIB_HC_A))
560 IfGhcBuild_B(hcs_B :: $(BASIC_HC_B) $(ONE3_HC_B) $(GHCLIB_HC_B) $(HBCLIB_HC_B))
562 IfGhcBuild_normal(libs:: libHS.a libHS13.a libHSghc.a libHShbc.a)
563 IfGhcBuild_p(libs_p :: libHS_p.a libHS13_p.a libHSghc_p.a libHShbc_p.a)
564 IfGhcBuild_t(libs_t :: libHS_t.a libHS13_t.a libHSghc_t.a libHShbc_t.a)
565 IfGhcBuild_t(libs_u :: libHS_u.a libHS13_u.a libHSghc_u.a libHShbc_u.a)
566 IfGhcBuild_mc(libs_mc :: libHS_mc.a libHS13_mc.a libHSghc_mc.a libHShbc_mc.a)
567 IfGhcBuild_mr(libs_mr :: libHS_mr.a libHS13_mr.a libHSghc_mr.a libHShbc_mr.a)
568 IfGhcBuild_mt(libs_mt :: libHS_mt.a libHS13_mt.a libHSghc_mt.a libHShbc_mt.a)
569 IfGhcBuild_mp(libs_mp :: libHS_mp.a libHS13_mp.a libHSghc_mp.a libHShbc_mp.a)
570 IfGhcBuild_mg(libs_mg :: libHS_mg.a libHS13_mg.a libHSghc_mg.a libHShbc_mg.a)
571 IfGhcBuild_2s(libs_2s :: libHS_2s.a libHS13_2s.a libHSghc_2s.a libHShbc_2s.a)
572 IfGhcBuild_1s(libs_1s :: libHS_1s.a libHS13_1s.a libHSghc_1s.a libHShbc_1s.a)
573 IfGhcBuild_du(libs_du :: libHS_du.a libHS13_du.a libHSghc_du.a libHShbc_du.a)
574 IfGhcBuild_a(libs_a :: libHS_a.a libHS13_a.a libHSghc_a.a libHShbc_a.a)
575 IfGhcBuild_b(libs_b :: libHS_b.a libHS13_b.a libHSghc_b.a libHShbc_b.a)
576 IfGhcBuild_c(libs_c :: libHS_c.a libHS13_c.a libHSghc_c.a libHShbc_c.a)
577 IfGhcBuild_d(libs_d :: libHS_d.a libHS13_d.a libHSghc_d.a libHShbc_d.a)
578 IfGhcBuild_e(libs_e :: libHS_e.a libHS13_e.a libHSghc_e.a libHShbc_e.a)
579 IfGhcBuild_f(libs_f :: libHS_f.a libHS13_f.a libHSghc_f.a libHShbc_f.a)
580 IfGhcBuild_g(libs_g :: libHS_g.a libHS13_g.a libHSghc_g.a libHShbc_g.a)
581 IfGhcBuild_h(libs_h :: libHS_h.a libHS13_h.a libHSghc_h.a libHShbc_h.a)
582 IfGhcBuild_i(libs_i :: libHS_i.a libHS13_i.a libHSghc_i.a libHShbc_i.a)
583 IfGhcBuild_j(libs_j :: libHS_j.a libHS13_j.a libHSghc_j.a libHShbc_j.a)
584 IfGhcBuild_k(libs_k :: libHS_k.a libHS13_k.a libHSghc_k.a libHShbc_k.a)
585 IfGhcBuild_l(libs_l :: libHS_l.a libHS13_l.a libHSghc_l.a libHShbc_l.a)
586 IfGhcBuild_m(libs_m :: libHS_m.a libHS13_m.a libHSghc_m.a libHShbc_m.a)
587 IfGhcBuild_n(libs_n :: libHS_n.a libHS13_n.a libHSghc_n.a libHShbc_n.a)
588 IfGhcBuild_o(libs_o :: libHS_o.a libHS13_o.a libHSghc_o.a libHShbc_o.a)
589 IfGhcBuild_A(libs_A :: libHS_A.a libHS13_A.a libHSghc_A.a libHShbc_A.a)
590 IfGhcBuild_B(libs_B :: libHS_B.a libHS13_B.a libHSghc_B.a libHShbc_B.a)
592 /* maybe for GNU make only? */
593 .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 hcs_A hcs_B
595 #endif /* reasonable make */
597 GHCLIB_HIs = you-really-need-to-define-GHCLIB_HIs
598 /* use print_file_lists */
600 /* lists of *.hi files, for installation; i.e., the user
601 will be able to say (e.g.,) "import PreludePrimIO" and it will work.
602 (but "import ITup5" will not)
604 PreludeNull_.hi is tickled by "hstags".
606 BASIC_HIs = prelude/Prelude.hi \
607 prelude/PreludeCore.hi \
609 prelude/PrelCore13.hi \
610 prelude/PreludeNull_.hi \
611 glaExts/PreludeGlaST.hi \
612 glaExts/PreludeGlaMisc.hi \
613 prelude/Concurrent.hi \
616 GHCLIB_HIs = ghc/Bag.hi \
622 ghc/PackedString.hi \
629 ONE3_HIs = haskell-1.3/LibSystem.hi \
630 haskell-1.3/LibCPUTime.hi \
631 haskell-1.3/LibDirectory.hi \
632 haskell-1.3/LibTime.hi \
633 haskell-1.3/LibPosix.hi
635 HBCLIB_HIs = hbc/Algebra.hi \
652 /************************************************************************
654 * Macros for creating and installing libHS<x>.a (in its many flavors). *
656 *************************************************************************/
658 #ifndef SpecialGhcLibraryTarget
659 #define SpecialGhcLibraryTarget(lib,tag,objs_DEP,objs_DIR,find_pat) @@\
660 AllTarget(CAT3(lib,tag,.a)) @@\
661 CAT3(lib,tag,.a):: objs_DEP @@\
664 TMPDIR=$(TMPDIR); export TMPDIR; \
665 find objs_DIR -name find_pat -print | xargs ar q $@ @@\
666 $(RANLIB) CAT3(lib,tag,.a) @@\
668 $(RM) CAT3(lib,tag,.a)
669 #endif /* SpecialGhcLibraryTarget */
671 #ifndef SpecialGhcLibInstallTarget
672 #if DoInstallGHCSystem == YES
673 #define SpecialGhcLibInstallTarget(lib,tag) @@\
674 install :: CAT3(lib,tag,.a) @@\
675 $(INSTALL) $(INSTLIBFLAGS) CAT3(lib,tag,.a) \
676 $(INSTLIBDIR_GHC)/CAT3(lib,tag,.a) @@\
677 $(RANLIB) $(INSTLIBDIR_GHC)/CAT3(lib,tag,.a)
678 #else /* ! DoInstallGhc... */
679 #define SpecialGhcLibInstallTarget(lib,tag) /*nothing*/
680 #endif /* ! DoInstallGhc... */
681 #endif /* SpecialGhcLibInstallTarget */
683 /* build/install all the diff libs for a particular build */
685 #define BigHisTarget(targeti,basei,ghci,hbci,one3i) @@\
687 InstallTarget(targeti) @@\
688 InstallMultNonExecTargets(targeti,basei,$(INSTDATADIR_GHC)/imports) @@\
689 InstallMultNonExecTargets(targeti,ghci, $(INSTDATADIR_GHC)/imports/ghc) @@\
690 InstallMultNonExecTargets(targeti,hbci, $(INSTDATADIR_GHC)/imports/hbc) @@\
691 InstallMultNonExecTargets(targeti,one3i,$(INSTDATADIR_GHC)/imports/haskell-1.3)
693 #define BigLibsTarget(tag,glob,base,ghc,hbc,one3) @@\
694 SpecialGhcLibraryTarget(libHS,tag,base,$(BASIC_OBJS_DIRS),glob) @@\
695 SpecialGhcLibInstallTarget(libHS,tag) @@\
696 SpecialGhcLibraryTarget(libHSghc,tag,ghc,$(GHCLIB_OBJS_DIRS),glob) @@\
697 SpecialGhcLibInstallTarget(libHSghc,tag) @@\
698 SpecialGhcLibraryTarget(libHShbc,tag,hbc,$(HBCLIB_OBJS_DIRS),glob) @@\
699 SpecialGhcLibInstallTarget(libHShbc,tag) @@\
700 SpecialGhcLibraryTarget(libHS13,tag,one3,$(ONE3_OBJS_DIRS),glob) @@\
701 SpecialGhcLibInstallTarget(libHS13,tag)
703 /* build *everything* -- monster macro from hell */
704 #define BigBuildTarget(tag,glob,targeti,base,basei,ghc,ghci,hbc,hbci,one3,one3i) \
705 BigLibsTarget(tag,glob,base,ghc,hbc,one3) @@\
706 BigHisTarget(targeti,basei,ghci,hbci,one3i)
709 /****************************************************************
711 * Creating and installing... *
712 * libHS_<tag>.a standard Prelude library *
713 * libHShbc_<tag>.a HBC-compatibility lib *
714 * libHSghc_<tag>.a GHC utilities lib *
715 * libHS13_<tag>.a Haskell 1.3 lib *
717 ****************************************************************/
719 /* make sure install's target dir is there */
720 #if DoInstallGHCSystem == YES
721 MakeDirectories(install, $(INSTLIBDIR_GHC) \
722 $(INSTDATADIR_GHC)/imports \
723 $(INSTDATADIR_GHC)/imports/ghc \
724 $(INSTDATADIR_GHC)/imports/hbc \
725 $(INSTDATADIR_GHC)/imports/haskell-1.3)
727 basic_his :: /* nothing */
728 InstallTarget(basic_his)
729 InstallMultNonExecTargets(basic_his, $(BASIC_HIs), $(INSTDATADIR_GHC)/imports)
730 InstallMultNonExecTargets(basic_his, $(HBCLIB_HIs), $(INSTDATADIR_GHC)/imports/hbc)
731 InstallMultNonExecTargets(basic_his, $(ONE3_HIs), $(INSTDATADIR_GHC)/imports/haskell-1.3)
732 InstallMultNonExecTargets(basic_his, $(GHCLIB_HIs), $(INSTDATADIR_GHC)/imports/ghc)
733 #endif /* installing */
735 IfGhcBuild_normal(BigBuildTarget(,'*_.o',basic_his \
736 , $(BASIC_DEP_norm), $(BASIC_HIs) \
737 , $(GHCLIB_DEP_norm), $(GHCLIB_HIs) \
738 , $(HBCLIB_DEP_norm), $(HBCLIB_HIs) \
739 , $(ONE3_DEP_norm), $(ONE3_HIs) \
742 IfGhcBuild_p(BigBuildTarget(_p,'*_p.o',his_p \
743 , $(BASIC_DEP_p), $(BASIC_HIs_p) \
744 , $(GHCLIB_DEP_p), $(GHCLIB_HIs_p) \
745 , $(HBCLIB_DEP_p), $(HBCLIB_HIs_p) \
746 , $(ONE3_DEP_p), $(ONE3_HIs_p) \
749 IfGhcBuild_t(BigBuildTarget(_t,'*_t.o',his_t \
750 , $(BASIC_DEP_t), $(BASIC_HIs_t) \
751 , $(GHCLIB_DEP_t), $(GHCLIB_HIs_t) \
752 , $(HBCLIB_DEP_t), $(HBCLIB_HIs_t) \
753 , $(ONE3_DEP_t), $(ONE3_HIs_t) \
756 IfGhcBuild_u(BigBuildTarget(,'*_u.o',his_u \
757 , $(BASIC_DEP_u), $(BASIC_HIs_u) \
758 , $(GHCLIB_DEP_u), $(GHCLIB_HIs_u) \
759 , $(HBCLIB_DEP_u), $(HBCLIB_HIs_u) \
760 , $(ONE3_DEP_u), $(ONE3_HIs_u) \
763 IfGhcBuild_mc(BigBuildTarget(_mc,'*_mc.o',his_mc \
764 , $(BASIC_DEP_mc), $(BASIC_HIs_mc) \
765 , $(GHCLIB_DEP_mc), $(GHCLIB_HIs_mc) \
766 , $(HBCLIB_DEP_mc), $(HBCLIB_HIs_mc) \
767 , $(ONE3_DEP_mc), $(ONE3_HIs_mc) \
770 IfGhcBuild_mr(BigBuildTarget(_mr,'*_mr.o',his_mr \
771 , $(BASIC_DEP_mr), $(BASIC_HIs_mr) \
772 , $(GHCLIB_DEP_mr), $(GHCLIB_HIs_mr) \
773 , $(HBCLIB_DEP_mr), $(HBCLIB_HIs_mr) \
774 , $(ONE3_DEP_mr), $(ONE3_HIs_mr) \
777 IfGhcBuild_mt(BigBuildTarget(_mr,'*_mt.o',his_mt \
778 , $(BASIC_DEP_mt), $(BASIC_HIs_mt) \
779 , $(GHCLIB_DEP_mt), $(GHCLIB_HIs_mt) \
780 , $(HBCLIB_DEP_mt), $(HBCLIB_HIs_mt) \
781 , $(ONE3_DEP_mt), $(ONE3_HIs_mt) \
784 IfGhcBuild_mp(BigBuildTarget(_mp,'*_mp.o',his_mp \
785 , $(BASIC_DEP_mp), $(BASIC_HIs_mp) \
786 , $(GHCLIB_DEP_mp), $(GHCLIB_HIs_mp) \
787 , $(HBCLIB_DEP_mp), $(HBCLIB_HIs_mp) \
788 , $(ONE3_DEP_mp), $(ONE3_HIs_mp) \
791 IfGhcBuild_mg(BigBuildTarget(_mg,'*_mg.o',his_mg \
792 , $(BASIC_DEP_mg), $(BASIC_HIs_mg) \
793 , $(GHCLIB_DEP_mg), $(GHCLIB_HIs_mg) \
794 , $(HBCLIB_DEP_mg), $(HBCLIB_HIs_mg) \
795 , $(ONE3_DEP_mg), $(ONE3_HIs_mg) \
798 /* these GC ones do not *really* need separate .hi files,
799 but it really makes life easier to do it this way
801 IfGhcBuild_2s(BigBuildTarget(_2s,'*_2s.o',his_2s \
802 , $(BASIC_DEP_2s), $(BASIC_HIs_2s) \
803 , $(GHCLIB_DEP_2s), $(GHCLIB_HIs_2s) \
804 , $(HBCLIB_DEP_2s), $(HBCLIB_HIs_2s) \
805 , $(ONE3_DEP_2s), $(ONE3_HIs_2s) \
808 IfGhcBuild_1s(BigBuildTarget(_1s,'*_1s.o',his_1s \
809 , $(BASIC_DEP_1s), $(BASIC_HIs_1s) \
810 , $(GHCLIB_DEP_1s), $(GHCLIB_HIs_1s) \
811 , $(HBCLIB_DEP_1s), $(HBCLIB_HIs_1s) \
812 , $(ONE3_DEP_1s), $(ONE3_HIs_1s) \
815 IfGhcBuild_du(BigBuildTarget(_du,'*_du.o',his_du \
816 , $(BASIC_DEP_du), $(BASIC_HIs_du) \
817 , $(GHCLIB_DEP_du), $(GHCLIB_HIs_du) \
818 , $(HBCLIB_DEP_du), $(HBCLIB_HIs_du) \
819 , $(ONE3_DEP_du), $(ONE3_HIs_du) \
822 /* user ways -- yeeps! */
824 IfGhcBuild_a(BigBuildTarget(_a,'*_a.o',his_a \
825 , $(BASIC_DEP_a), $(BASIC_HIs_a) \
826 , $(GHCLIB_DEP_a), $(GHCLIB_HIs_a) \
827 , $(HBCLIB_DEP_a), $(HBCLIB_HIs_a) \
828 , $(ONE3_DEP_a), $(ONE3_HIs_a) \
831 IfGhcBuild_b(BigBuildTarget(_b,'*_b.o',his_b \
832 , $(BASIC_DEP_b), $(BASIC_HIs_b) \
833 , $(GHCLIB_DEP_b), $(GHCLIB_HIs_b) \
834 , $(HBCLIB_DEP_b), $(HBCLIB_HIs_b) \
835 , $(ONE3_DEP_b), $(ONE3_HIs_b) \
838 IfGhcBuild_c(BigBuildTarget(_c,'*_c.o',his_c \
839 , $(BASIC_DEP_c), $(BASIC_HIs_c) \
840 , $(GHCLIB_DEP_c), $(GHCLIB_HIs_c) \
841 , $(HBCLIB_DEP_c), $(HBCLIB_HIs_c) \
842 , $(ONE3_DEP_c), $(ONE3_HIs_c) \
845 IfGhcBuild_d(BigBuildTarget(_d,'*_d.o',his_d \
846 , $(BASIC_DEP_d), $(BASIC_HIs_d) \
847 , $(GHCLIB_DEP_d), $(GHCLIB_HIs_d) \
848 , $(HBCLIB_DEP_d), $(HBCLIB_HIs_d) \
849 , $(ONE3_DEP_d), $(ONE3_HIs_d) \
852 IfGhcBuild_e(BigBuildTarget(_e,'*_e.o',his_e \
853 , $(BASIC_DEP_e), $(BASIC_HIs_e) \
854 , $(GHCLIB_DEP_e), $(GHCLIB_HIs_e) \
855 , $(HBCLIB_DEP_e), $(HBCLIB_HIs_e) \
856 , $(ONE3_DEP_e), $(ONE3_HIs_e) \
859 IfGhcBuild_f(BigBuildTarget(_f,'*_f.o',his_f \
860 , $(BASIC_DEP_f), $(BASIC_HIs_f) \
861 , $(GHCLIB_DEP_f), $(GHCLIB_HIs_f) \
862 , $(HBCLIB_DEP_f), $(HBCLIB_HIs_f) \
863 , $(ONE3_DEP_f), $(ONE3_HIs_f) \
866 IfGhcBuild_g(BigBuildTarget(_g,'*_g.o',his_g \
867 , $(BASIC_DEP_g), $(BASIC_HIs_g) \
868 , $(GHCLIB_DEP_g), $(GHCLIB_HIs_g) \
869 , $(HBCLIB_DEP_g), $(HBCLIB_HIs_g) \
870 , $(ONE3_DEP_g), $(ONE3_HIs_g) \
873 IfGhcBuild_h(BigBuildTarget(_h,'*_h.o',his_h \
874 , $(BASIC_DEP_h), $(BASIC_HIs_h) \
875 , $(GHCLIB_DEP_h), $(GHCLIB_HIs_h) \
876 , $(HBCLIB_DEP_h), $(HBCLIB_HIs_h) \
877 , $(ONE3_DEP_h), $(ONE3_HIs_h) \
880 IfGhcBuild_i(BigBuildTarget(_i,'*_i.o',his_i \
881 , $(BASIC_DEP_i), $(BASIC_HIs_i) \
882 , $(GHCLIB_DEP_i), $(GHCLIB_HIs_i) \
883 , $(HBCLIB_DEP_i), $(HBCLIB_HIs_i) \
884 , $(ONE3_DEP_i), $(ONE3_HIs_i) \
887 IfGhcBuild_j(BigBuildTarget(_j,'*_j.o',his_j \
888 , $(BASIC_DEP_j), $(BASIC_HIs_j) \
889 , $(GHCLIB_DEP_j), $(GHCLIB_HIs_j) \
890 , $(HBCLIB_DEP_j), $(HBCLIB_HIs_j) \
891 , $(ONE3_DEP_j), $(ONE3_HIs_j) \
894 IfGhcBuild_k(BigBuildTarget(_k,'*_k.o',his_k \
895 , $(BASIC_DEP_k), $(BASIC_HIs_k) \
896 , $(GHCLIB_DEP_k), $(GHCLIB_HIs_k) \
897 , $(HBCLIB_DEP_k), $(HBCLIB_HIs_k) \
898 , $(ONE3_DEP_k), $(ONE3_HIs_k) \
901 IfGhcBuild_l(BigBuildTarget(_l,'*_l.o',his_l \
902 , $(BASIC_DEP_l), $(BASIC_HIs_l) \
903 , $(GHCLIB_DEP_l), $(GHCLIB_HIs_l) \
904 , $(HBCLIB_DEP_l), $(HBCLIB_HIs_l) \
905 , $(ONE3_DEP_l), $(ONE3_HIs_l) \
908 IfGhcBuild_m(BigBuildTarget(_m,'*_m.o',his_m \
909 , $(BASIC_DEP_m), $(BASIC_HIs_m) \
910 , $(GHCLIB_DEP_m), $(GHCLIB_HIs_m) \
911 , $(HBCLIB_DEP_m), $(HBCLIB_HIs_m) \
912 , $(ONE3_DEP_m), $(ONE3_HIs_m) \
915 IfGhcBuild_n(BigBuildTarget(_n,'*_n.o',his_n \
916 , $(BASIC_DEP_n), $(BASIC_HIs_n) \
917 , $(GHCLIB_DEP_n), $(GHCLIB_HIs_n) \
918 , $(HBCLIB_DEP_n), $(HBCLIB_HIs_n) \
919 , $(ONE3_DEP_n), $(ONE3_HIs_n) \
922 IfGhcBuild_o(BigBuildTarget(_o,'*_o.o',his_o \
923 , $(BASIC_DEP_o), $(BASIC_HIs_o) \
924 , $(GHCLIB_DEP_o), $(GHCLIB_HIs_o) \
925 , $(HBCLIB_DEP_o), $(HBCLIB_HIs_o) \
926 , $(ONE3_DEP_o), $(ONE3_HIs_o) \
929 IfGhcBuild_A(BigBuildTarget(_A,'*_A.o',his_A \
930 , $(BASIC_DEP_A), $(BASIC_HIs_A) \
931 , $(GHCLIB_DEP_A), $(GHCLIB_HIs_A) \
932 , $(HBCLIB_DEP_A), $(HBCLIB_HIs_A) \
933 , $(ONE3_DEP_A), $(ONE3_HIs_A) \
936 IfGhcBuild_B(BigBuildTarget(_B,'*_B.o',his_B \
937 , $(BASIC_DEP_B), $(BASIC_HIs_B) \
938 , $(GHCLIB_DEP_B), $(GHCLIB_HIs_B) \
939 , $(HBCLIB_DEP_B), $(HBCLIB_HIs_B) \
940 , $(ONE3_DEP_B), $(ONE3_HIs_B) \
943 /****************************************************************
945 * Creating the individual .hc files: *
947 * For the just-vary-the-GC-thanks flavors, we only need to *
948 * compile .hs->.hc once; then re-use the .hc file each time. *
950 * For the profiling one (_p) and all the user-specified *
951 * ones, we recompile the Haskell each time. *
953 * NB: old (WDP 95/06) *
954 ****************************************************************/
956 /* some "helpful" internal macros first... */
958 #if GhcWithHscBuiltViaC == YES && HaskellCompilerType == HC_USE_HC_FILES
959 #define CompilePreludishly__(file,isuf,way,flags) @@\
961 $(RM) CAT3(file,way,.hc)
963 #else /* normal case */
964 #define CompilePreludishly__(file,isuf,way,flags) @@\
965 CAT3(file,way,.hc) : file.isuf @@\
966 $(RM) CAT3(file,way,.hc) @@\
967 $(GHC) -C $(GHCFLAGS) flags file.isuf -o CAT3(file,way,.hc) @@\
969 $(RM) CAT3(file,way,.hc)
972 #define ObjectifyPreludishly__(file,way,flags,osuff,find_pat) @@\
973 CAT3(file,way,.o) : CAT3(file,way,.hc) @@\
974 $(RM) CAT3(file,way,.o) @@\
975 @if [ ! -d file ] ; then mkdir file ; else exit 0 ; fi @@\
976 @find file -name find_pat -print | xargs $(RM) __rm_food @@\
977 $(GHC) -c $(GHCFLAGS) flags CAT3(file,way,.hc) -odir file -osuf osuff @@\
978 touch CAT3(file,way,.o) @@\
980 $(RM) CAT3(file,way,.o) @@\
981 find file -name find_pat -print | xargs $(RM) __rm_food
983 #define DoHs(file,isuf,way,flags,osuf,find_pat) \
984 CompilePreludishly__(file,isuf,way,flags) @@\
985 ObjectifyPreludishly__(file,way,flags,osuf,find_pat)
987 /* here we go: (NB: do not make .hc files for _u [unregisterized]) */
989 #define CompilePreludishly(file,isuf,flags) @@\
990 IfGhcBuild_normal(DoHs(file,isuf,,flags $(GHC_OPTS_norm),'_.o', '*_.o')) \
991 IfGhcBuild_p(DoHs(file,isuf,_p, flags $(GHC_OPTS_p), '_p.o', '*_p.o')) \
992 IfGhcBuild_t(DoHs(file,isuf,_t, flags $(GHC_OPTS_t), '_t.o', '*_t.o')) \
993 IfGhcBuild_mc(DoHs(file,isuf,_mc, flags $(GHC_OPTS_mc), '_mc.o', '*_mc.o')) \
994 IfGhcBuild_mr(DoHs(file,isuf,_mr, flags $(GHC_OPTS_mr), '_mr.o', '*_mr.o')) \
995 IfGhcBuild_mt(DoHs(file,isuf,_mt, flags $(GHC_OPTS_mt), '_mt.o', '*_mt.o')) \
996 IfGhcBuild_mp(DoHs(file,isuf,_mp, flags $(GHC_OPTS_mp), '_mp.o', '*_mp.o')) \
997 IfGhcBuild_mg(DoHs(file,isuf,_mg, flags $(GHC_OPTS_mg), '_mg.o', '*_mg.o')) \
998 IfGhcBuild_2s(DoHs(file,isuf,_2s, flags $(GHC_OPTS_2s), '_2s.o', '*_2s.o')) \
999 IfGhcBuild_1s(DoHs(file,isuf,_1s, flags $(GHC_OPTS_1s), '_1s.o', '*_1s.o')) \
1000 IfGhcBuild_du(DoHs(file,isuf,_du, flags $(GHC_OPTS_du), '_du.o', '*_du.o')) \
1001 IfGhcBuild_a(DoHs(file,isuf,_a, flags $(GHC_OPTS_a), '_a.o', '*_a.o')) \
1002 IfGhcBuild_b(DoHs(file,isuf,_b, flags $(GHC_OPTS_b), '_b.o', '*_b.o')) \
1003 IfGhcBuild_c(DoHs(file,isuf,_c, flags $(GHC_OPTS_c), '_c.o', '*_c.o')) \
1004 IfGhcBuild_d(DoHs(file,isuf,_d, flags $(GHC_OPTS_d), '_d.o', '*_d.o')) \
1005 IfGhcBuild_e(DoHs(file,isuf,_e, flags $(GHC_OPTS_e), '_e.o', '*_e.o')) \
1006 IfGhcBuild_f(DoHs(file,isuf,_f, flags $(GHC_OPTS_f), '_f.o', '*_f.o')) \
1007 IfGhcBuild_g(DoHs(file,isuf,_g, flags $(GHC_OPTS_g), '_g.o', '*_g.o')) \
1008 IfGhcBuild_h(DoHs(file,isuf,_h, flags $(GHC_OPTS_h), '_h.o', '*_h.o')) \
1009 IfGhcBuild_i(DoHs(file,isuf,_i, flags $(GHC_OPTS_i), '_i.o', '*_i.o')) \
1010 IfGhcBuild_j(DoHs(file,isuf,_j, flags $(GHC_OPTS_j), '_j.o', '*_j.o')) \
1011 IfGhcBuild_k(DoHs(file,isuf,_k, flags $(GHC_OPTS_k), '_k.o', '*_k.o')) \
1012 IfGhcBuild_l(DoHs(file,isuf,_l, flags $(GHC_OPTS_l), '_l.o', '*_l.o')) \
1013 IfGhcBuild_m(DoHs(file,isuf,_m, flags $(GHC_OPTS_m), '_m.o', '*_m.o')) \
1014 IfGhcBuild_n(DoHs(file,isuf,_n, flags $(GHC_OPTS_n), '_n.o', '*_n.o')) \
1015 IfGhcBuild_o(DoHs(file,isuf,_o, flags $(GHC_OPTS_o), '_o.o', '*_o.o')) \
1016 IfGhcBuild_A(DoHs(file,isuf,_A, flags $(GHC_OPTS_A), '_A.o', '*_A.o')) \
1017 IfGhcBuild_B(DoHs(file,isuf,_B, flags $(GHC_OPTS_B), '_B.o', '*_B.o'))
1019 /* now use the macro: */
1021 CompilePreludishly(glaExts/PreludeGlaST,lhs, $(PREL_OPTS) -split-objs ST -H16m -monly-4-regs -fno-omit-reexported-instances)
1022 CompilePreludishly(glaExts/PreludePrimIO,lhs, $(PREL_OPTS) -split-objs PreludePrimIO)
1023 CompilePreludishly(glaExts/PreludeErrIO,lhs, $(PREL_OPTS) -split-objs ErrIO)
1024 CompilePreludishly(glaExts/PreludeDialogueIO,lhs,$(PREL_OPTS) -split-objs DialogueIO)
1025 CompilePreludishly(glaExts/MainIO,lhs, $(PREL_OPTS) -split-objs MainIO)
1026 CompilePreludishly(glaExts/MainIO13,lhs, $(PREL_OPTS) -split-objs MainIO13 -ohi glaExts/MainIO13.hi)
1027 CompilePreludishly(glaExts/Stdio,lhs, $(PREL_OPTS) -split-objs Stdio)
1028 CompilePreludishly(glaExts/ByteOps,lhs, $(PREL_OPTS) -split-objs ByteOps)
1030 CompilePreludishly(prelude/Concurrent,lhs, -fhaskell-1.3 -split-objs Concurrent -ohi prelude/Concurrent.hi)
1031 CompilePreludishly(prelude/ChannelVar,lhs, -fhaskell-1.3 -split-objs ChannelVar -ohi prelude/ChannelVar.hi)
1032 /* NB: do not split objs for Channel, because of purely-local things */
1033 CompilePreludishly(prelude/Channel,lhs, -fhaskell-1.3 -ohi prelude/Channel.hi)
1034 CompilePreludishly(prelude/Semaphore,lhs, -fhaskell-1.3 -split-objs Semaphore -ohi prelude/Semaphore.hi)
1035 CompilePreludishly(prelude/Merge,lhs, -fhaskell-1.3 -split-objs Merge -ohi prelude/Merge.hi)
1036 CompilePreludishly(prelude/SampleVar,lhs, -fhaskell-1.3 -split-objs SampleVar -ohi prelude/SampleVar.hi)
1038 CompilePreludishly(prelude/Parallel,lhs, -split-objs Parallel -ohi prelude/Parallel.hi)
1040 CompilePreludishly(prelude/TysBasic,hs, $(PREL_OPTS) -split-objs TysBasic -fmin-builtin-names -nohi)
1041 CompilePreludishly(prelude/TyBool,hs, $(PREL_OPTS) -split-objs TyBool -fhide-builtin-names -nohi)
1042 CompilePreludishly(prelude/TyArray,hs, $(PREL_OPTS) -split-objs TyArray -ohi prelude/TyArray.hi)
1043 CompilePreludishly(prelude/TyComplex,hs,$(PREL_OPTS) -split-objs TyComplex -ohi prelude/TyComplex.hi)
1044 CompilePreludishly(prelude/TyIO,hs, $(PREL_OPTS) -split-objs TyIO -fmin-builtin-names -ohi prelude/TyIO.hi)
1045 CompilePreludishly(prelude/TyRatio,hs, $(PREL_OPTS) -split-objs TyRatio -fmin-builtin-names -nohi)
1047 CompilePreludishly(prelude/IArray,hs, $(PREL_OPTS) -split-objs IArray -H18m -ohi prelude/IArray.hi)
1048 CompilePreludishly(prelude/IBool,hs, $(PREL_OPTS) -split-objs IBool -ohi prelude/IBool.hi)
1049 CompilePreludishly(prelude/IChar,hs, $(PREL_OPTS) -split-objs IChar -ohi prelude/IChar.hi)
1050 CompilePreludishly(prelude/IComplex,hs, $(PREL_OPTS) -split-objs IComplex -H16m -ohi prelude/IComplex.hi)
1051 CompilePreludishly(prelude/IDouble,hs, $(PREL_OPTS) -split-objs IDouble -ohi prelude/IDouble.hi)
1052 CompilePreludishly(prelude/IFloat,hs, $(PREL_OPTS) -split-objs IFloat -ohi prelude/IFloat.hi)
1053 CompilePreludishly(prelude/IInt,hs, $(PREL_OPTS) -split-objs IInt -ohi prelude/IInt.hi -monly-4-regs)
1054 CompilePreludishly(prelude/IInteger,hs, $(PREL_OPTS) -split-objs IInteger -ohi prelude/IInteger.hi)
1055 CompilePreludishly(prelude/IList,hs, $(PREL_OPTS) -split-objs IList -H12m -ohi prelude/IList.hi)
1056 CompilePreludishly(prelude/IRatio,hs, $(PREL_OPTS) -split-objs IRatio -H16m -ohi prelude/IRatio.hi)
1057 CompilePreludishly(prelude/ITup0,hs, $(PREL_OPTS) -split-objs ITup0 -ohi prelude/ITup0.hi)
1058 CompilePreludishly(prelude/ITup2,hs, $(PREL_OPTS) -split-objs ITup2 -H40m -K2m -ohi prelude/ITup2.hi)
1059 CompilePreludishly(prelude/ITup3,hs, $(PREL_OPTS) -split-objs ITup3 -ohi prelude/ITup3.hi)
1060 CompilePreludishly(prelude/ITup4,hs, $(PREL_OPTS) -split-objs ITup4 -H16m -ohi prelude/ITup4.hi)
1061 CompilePreludishly(prelude/ITup5,hs, $(PREL_OPTS) -split-objs ITup5 -H24m -ohi prelude/ITup5.hi)
1063 CompilePreludishly(prelude/Cls,hs, $(PREL_OPTS) -split-objs Cls -H24m -fmin-builtin-names -ohi prelude/Cls.hi)
1065 CompilePreludishly(prelude/Builtin,hs, $(PREL_OPTS) -split-objs Builtin -ohi prelude/Builtin.hi)
1066 CompilePreludishly(prelude/Core,hs, $(PREL_OPTS) -split-objs Core -H24m -ohi prelude/Core.hi)
1067 CompilePreludishly(prelude/IO,hs, $(PREL_OPTS) -split-objs IO -ohi prelude/IO.hi)
1068 CompilePreludishly(prelude/List,hs, $(PREL_OPTS) -split-objs List -H24m -ohi prelude/List.hi -fno-snapback-to-append)
1069 CompilePreludishly(prelude/PS,lhs, $(PREL_OPTS) -split-objs PS -ohi prelude/PS.hi -monly-2-regs)
1070 CompilePreludishly(prelude/Prel,hs, $(PREL_OPTS) -split-objs Prel -H14m -ohi prelude/Prel.hi -monly-2-regs)
1071 CompilePreludishly(prelude/Text,hs, $(PREL_OPTS) -split-objs Text -H30m -ohi prelude/Text.hi -monly-4-regs)
1072 CompilePreludishly(prelude/FoldrBuild,hs, $(PREL_OPTS) -split-objs FoldrBuild -nohi)
1074 /* --- 1.3 I/O support --- */
1076 CompilePreludishly(prelude/PreludeIOError,lhs, $(PREL_OPTS) -split-objs IOError -ohi prelude/PreludeIOError.hi -fno-omit-reexported-instances -fomit-derived-read '-#include"stgio.h"')
1077 CompilePreludishly(prelude/PreludeWriteTextIO,lhs, $(PREL_OPTS) -split-objs WriteTextIO -ohi prelude/PreludeWriteTextIO.hi -fno-omit-reexported-instances '-#include"stgio.h"')
1078 CompilePreludishly(prelude/PreludeStdIO,lhs, $(PREL_OPTS) -split-objs StdIO -ohi prelude/PreludeStdIO.hi -fno-omit-reexported-instances '-#include"stgio.h"' -H14m)
1079 CompilePreludishly(prelude/PreludeIO,lhs, $(PREL_OPTS) -split-objs PIO -ohi prelude/PreludeIO.hi -fno-omit-reexported-instances '-#include"stgio.h"')
1080 CompilePreludishly(prelude/PreludeMonadicIO,lhs, $(PREL_OPTS) -split-objs MonadicIO -ohi prelude/PreludeMonadicIO.hi -fno-omit-reexported-instances '-#include"stgio.h"')
1081 CompilePreludishly(prelude/PreludeReadTextIO,lhs, $(PREL_OPTS) -split-objs ReadTextIO -ohi prelude/PreludeReadTextIO.hi -fno-omit-reexported-instances '-#include"stgio.h"')
1083 /* --- Haskell 1.3 libraries --- */
1085 CompilePreludishly(haskell-1.3/LibSystem,lhs, -fhaskell-1.3 -split-objs LibSystem '-#include"stgio.h"')
1086 CompilePreludishly(haskell-1.3/LibCPUTime,lhs, -fhaskell-1.3 -split-objs LibCPUTime '-#include"stgio.h"')
1087 CompilePreludishly(haskell-1.3/LibDirectory,lhs, -fhaskell-1.3 -split-objs LibDirectory '-#include"stgio.h"' -monly-3-regs)
1088 CompilePreludishly(haskell-1.3/LibTime,lhs, -fhaskell-1.3 -split-objs LibTime '-#include"stgio.h"' '-#include"timezone.h"' -H12m -K2m -monly-3-regs)
1090 CompilePreludishly(haskell-1.3/LibPosix,lhs, -fhaskell-1.3 -split-objs LibPosix '-#include"stgio.h"' '-#include"libposix.h"')
1091 CompilePreludishly(haskell-1.3/LibPosixDB,lhs, -fhaskell-1.3 -split-objs LibPosixDB '-#include"stgio.h"' '-#include"libposix.h"')
1092 CompilePreludishly(haskell-1.3/LibPosixErr,lhs, -fhaskell-1.3 -split-objs LibPosixErr -H12m '-#include"stgio.h"' '-#include"libposix.h"')
1093 CompilePreludishly(haskell-1.3/LibPosixFiles,lhs, -fhaskell-1.3 -split-objs LibPosixFiles -H12m '-#include"stgio.h"' '-#include"libposix.h"')
1094 CompilePreludishly(haskell-1.3/LibPosixIO,lhs, -fhaskell-1.3 -split-objs LibPosixIO -H12m '-#include"stgio.h"' '-#include"libposix.h"' -monly-4-regs)
1095 CompilePreludishly(haskell-1.3/LibPosixProcEnv,lhs, -fhaskell-1.3 -split-objs LibPosixProcEnv -H12m '-#include"stgio.h"' '-#include"libposix.h"')
1096 CompilePreludishly(haskell-1.3/LibPosixProcPrim,lhs, -fhaskell-1.3 -split-objs LibPosixProcPrim -H16m '-#include"stgio.h"' '-#include"libposix.h"')
1097 CompilePreludishly(haskell-1.3/LibPosixTTY,lhs, -fhaskell-1.3 -split-objs LibPosixTTY -H12m '-#include"stgio.h"' '-#include"libposix.h"' -monly-2-regs)
1098 CompilePreludishly(haskell-1.3/LibPosixUtil,lhs, -fhaskell-1.3 -split-objs LibPosixUtil '-#include"stgio.h"' '-#include"libposix.h"' -monly-3-regs)
1101 the next six create our main "Prelude" interface files;
1102 NOT to be used here.
1105 CompilePreludishly(glaExts/PreludeGlaMisc,lhs, $(PREL_OPTS) -split-objs GlaMisc -ohi glaExts/PreludeGlaMisc.hi -monly-4-regs)
1107 CompilePreludishly(prelude/PreludeHi,hs,$(PREL_OPTS) -split-objs Hi -ohi prelude/Prelude.hi -fno-omit-reexported-instances)
1108 CompilePreludishly(prelude/PrelCoreHi,hs,$(PREL_OPTS) -split-objs CoreHi -ohi prelude/PreludeCore.hi -fno-omit-reexported-instances)
1110 CompilePreludishly(prelude/Prel13,hs,$(PREL_OPTS) -iprelude:glaExts:haskell-1.3 -split-objs Hi13 -ohi prelude/Prel13.hi -fno-omit-reexported-instances)
1111 CompilePreludishly(prelude/PrelCore13,hs,$(PREL_OPTS) -iprelude:glaExts:haskell-1.3 -split-objs Core13 -ohi prelude/PrelCore13.hi -fno-omit-reexported-instances)
1113 /* --- GHC utilities library --- */
1115 CompilePreludishly(ghc/Bag,lhs, )
1116 CompilePreludishly(ghc/BitSet,lhs, -monly-4-regs)
1117 CompilePreludishly(ghc/CharSeq,lhs, )
1118 CompilePreludishly(ghc/FiniteMap,lhs, -ighc -fhaskell-1.3)
1119 CompilePreludishly(ghc/ListSetOps,lhs, )
1120 CompilePreludishly(ghc/Maybes,lhs, -fhaskell-1.3)
1121 CompilePreludishly(ghc/PackedString,lhs,)
1122 CompilePreludishly(ghc/Regex,lhs, -fhaskell-1.3 '-#include"ghcRegex.h"' -monly-4-regs)
1123 CompilePreludishly(ghc/MatchPS,lhs, -ighc -fhaskell-1.3)
1124 CompilePreludishly(ghc/Pretty,lhs, -ighc -fhaskell-1.3)
1125 #if GhcWithReadline == YES
1126 CompilePreludishly(ghc/Readline,lhs, -ighc -fhaskell-1.3 '-#include"ghcReadline.h"')
1128 #if GhcWithSockets == YES
1129 CompilePreludishly(ghc/Socket,lhs, -ighc -fhaskell-1.3)
1130 CompilePreludishly(ghc/SocketPrim,lhs, -ighc -fhaskell-1.3 -H12m -K2m -optcO-DNON_POSIX_SOURCE '-#include"ghcSockets.h"')
1131 CompilePreludishly(ghc/BSD,lhs, -ighc -fhaskell-1.3 -optcO-DNON_POSIX_SOURCE '-#include"ghcSockets.h"')
1132 CompilePreludishly(ghc/CError,lhs, -ighc -fhaskell-1.3 -K2m -fomit-derived-read)
1134 CompilePreludishly(ghc/Set,lhs, -ighc -fhaskell-1.3)
1135 CompilePreludishly(ghc/Util,lhs, -H12m -ighc -fhaskell-1.3)
1137 /* --- HBC-compatibility library --- */
1139 CompilePreludishly(hbc/Algebra,hs,)
1140 CompilePreludishly(hbc/Hash,hs, )
1141 CompilePreludishly(hbc/ListUtil,hs, -ihbc -fhaskell-1.3)
1142 CompilePreludishly(hbc/Miranda,hs, -ihbc)
1143 CompilePreludishly(hbc/NameSupply,hs, )
1144 CompilePreludishly(hbc/Native,hs, -H12m -ihbc -fhaskell-1.3 -fno-omit-default-instance-methods)
1145 CompilePreludishly(hbc/Number,hs, -H12m -K2m -fno-omit-default-instance-methods)
1146 CompilePreludishly(hbc/Parse,hs, -H12m -ihbc -fhaskell-1.3)
1147 CompilePreludishly(hbc/Polynomial,hs, -ihbc) /* this code could not ever have worked */
1148 CompilePreludishly(hbc/Pretty,hs, )
1149 CompilePreludishly(hbc/Printf,hs, -H12m)
1150 CompilePreludishly(hbc/QSort,hs, )
1151 CompilePreludishly(hbc/Random,hs, -monly-4-regs)
1152 CompilePreludishly(hbc/SimpleLex,hs, )
1153 CompilePreludishly(hbc/Time,hs, -H12m)
1154 CompilePreludishly(hbc/Trace,hs, -fglasgow-exts)
1155 CompilePreludishly(hbc/Word,hs, -H12m -K2m -monly-4-regs)
1157 /****************************************************************
1159 * misc "make" targets -- depend, clean, tags *
1161 ****************************************************************/
1163 /* this is a BAD idea!
1164 ExtraStuffToClean( $(SRCS_C) )
1165 without the .hc files, the distrib cannot boot itself
1167 ExtraStuffToBeVeryClean( $(SRCS_C) )
1168 ExtraStuffToBeVeryClean( $(STD_VERY_CLEAN) )
1171 /* Ugly but OK? [WDP 94/09] */
1172 HsTagsTarget( */[A-Z]*.*hs )
1173 HSTAGS_OPTS=-cpp -fglasgow-exts
1175 /* pretty horrible */
1177 /* we do the depend stuff in a semi-automated way:
1179 make depend # to create basic dependendencies
1180 make print_file_lists # to dup dependencies for various builds
1181 make Makefile # to slurp in dup'd dependencies
1186 @echo making Jmake.inc5 ...
1187 @echo '/* Machine-generated file: do not edit! */' > Jmake.inc5
1188 perl ./make_extra_deps >> Jmake.inc5
1190 /* now include the extra dependencies so generated */
1191 #include "Jmake.inc5"
1193 /* for unix-libs.lit */
1194 LitSuffixRule(.lhs,.hs)
1195 LitDocRootTarget(unix-libs,lit)
1197 /* should be *LAST* */
1198 #if HaskellCompilerType != HC_USE_HC_FILES
1199 /* otherwise, the dependencies jeopardize our .hc files --
1200 which are all we have! */
1201 MAIN_INCLUDE_DIR = $(TOP_PWD)/$(CURRENT_DIR)/$(GHC_INCLUDES)
1202 MKDEPENDHS_OPTS= -o .hc -iprelude:glaExts:ghc:hbc:haskell-1.3 -I$(MAIN_INCLUDE_DIR)
1204 HaskellDependTarget( $(BASIC_LHS) $(BASIC_HS_PREL) $(HBCLIB_HS) $(GHCLIB_LHS) $(ONE3_LHS) )