Fix typo in testsuite Makefile
[ghc.git] / testsuite / tests / driver / Makefile
1 TOP=../..
2 include $(TOP)/mk/boilerplate.mk
3 include $(TOP)/mk/test.mk
4
5 # A set of driver tests
6
7 # Things to test:
8 #
9 # - one-shot vs. --make
10 # - hierarchical vs. flat
11 # - -odir vs. no -odir
12 # - -hidir vs. no -hidir
13 # - root module vs. found modules
14
15 OBJSUFFIX = .o
16
17 # -fforce-recomp makes lots of driver tests trivially pass, so we
18 # filter it out from $(TEST_HC_OPTS).
19 TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
20 TEST_HC_OPTS_NO_RECOMP_NO_RTSOPTS = $(filter-out -rtsopts,$(TEST_HC_OPTS_NO_RECOMP))
21
22 # -----------------------------------------------------------------------------
23 # One-shot compilations, non-hierarchical modules
24
25 test011:
26 $(RM) A011.hi
27 $(RM) A011$(OBJSUFFIX)
28 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c A011.hs
29 test -f A011.hi
30 test -f A011$(OBJSUFFIX)
31
32 # test -o
33 test012:
34 $(RM) A012.hi
35 $(RM) A012$(OBJSUFFIX)oo
36 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c A012.hs -o A012$(OBJSUFFIX)oo
37 test -f A012$(OBJSUFFIX)oo
38
39 # test -ohi
40 test013:
41 $(RM) A013.xhi
42 $(RM) A013$(OBJSUFFIX)
43 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c A013.hs -ohi A013.xhi
44 test -f A013.xhi
45
46 # test -odir
47 test014:
48 $(RM) -f A014.hi
49 $(RM) -rf obj014
50 mkdir obj014
51 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c A014.hs -odir obj014
52 test -f obj014/A014$(OBJSUFFIX)
53 test -f A014.hi
54
55 # test -hidir
56 test015:
57 $(RM) -f A015$(OBJSUFFIX)
58 $(RM) -rf hi015
59 mkdir hi015
60 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c A015.hs -hidir hi015
61 test -f A015$(OBJSUFFIX)
62 test -f hi015/A015.hi
63
64 # test stub generation
65 test016:
66 $(RM) F016.hi F016$(OBJSUFFIX) F016_stub.h
67 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c F016.hs
68 test -f F016_stub.h
69
70 # test -stubdir (filename differs from module name)
71 test017:
72 $(RM) F017.hi F017$(OBJSUFFIX)
73 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c F017.hs -stubdir stub017
74 test -f stub017/TestStub017_stub.h
75
76 # test -odir with stubs (filename differs from module name)
77 test018:
78 $(RM) -f F018.hi F018$(OBJSUFFIX) F018_stub.h
79 $(RM) -rf obj018
80 mkdir obj018
81 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c F018.hs -odir obj018
82
83 # test for bug #3093
84 test018a:
85 $(RM) -f F018a.hi F018a_stub.h *.obj.018
86 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c F018a.hs -osuf obj.018
87 test -f F018a.obj.018
88
89 # test -outputdir
90 test019:
91 $(RM) -rf out019
92 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c F019.hs -outputdir out019
93 test -f out019/TestStub019.hi
94 test -f out019/TestStub019_stub.h
95
96 # -----------------------------------------------------------------------------
97 # One-shot compilation, hierarchical modules
98
99 test021:
100 $(RM) B021/C.hi
101 $(RM) B021/C$(OBJSUFFIX)
102 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c B021/C.hs
103 test -f B021/C.hi
104 test -f B021/C$(OBJSUFFIX)
105
106 # test -o
107 test022:
108 $(RM) B022/C.hi
109 $(RM) B022/C$(OBJSUFFIX)oo
110 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c B022/C.hs -o B022/C$(OBJSUFFIX)oo
111 test -f B022/C$(OBJSUFFIX)oo
112
113 # test -ohi
114 test023:
115 $(RM) B023/C.xhi
116 $(RM) B023/C$(OBJSUFFIX)
117 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c B023/C.hs -ohi B023/C.xhi
118 test -f B023/C.xhi
119
120 # test -odir
121 test024:
122 $(RM) -f B024/C.hi
123 $(RM) -rf obj024
124 mkdir obj024
125 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c B024/C.hs -odir obj024
126 test -f obj024/B024/C$(OBJSUFFIX)
127
128 # test -odir with non-Haskell compilation
129 test024a:
130 $(RM) -rf B024a
131 $(RM) -rf obj024a
132 mkdir B024a
133 mkdir obj024a
134 echo >B024a/stub.c
135 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c B024a/stub.c -odir obj024a
136 test -f obj024a/B024a/stub$(OBJSUFFIX)
137
138 # test -hidir
139 test025:
140 $(RM) -rf hi025
141 mkdir hi025
142 $(RM) B025/C$(OBJSUFFIX)
143 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c B025/C.hs -hidir hi025
144 test -f hi025/B025/C.hi
145
146 # This is a hierarchical module that lives in a subdirectory.
147 test026:
148 $(RM) d026/P/Q.hi
149 $(RM) d026/P/Q$(OBJSUFFIX)
150 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c d026/P/Q.hs
151 test -f d026/P/Q.hi
152 test -f d026/P/Q$(OBJSUFFIX)
153
154 # test stub generation
155 # -fvia-C, because we want to check that the .hc file can #include the stub.h
156 test027:
157 $(RM) B027/F.hi B027/F$(OBJSUFFIX) B027/F_stub.h
158 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c B027/F.hs -fno-warn-deprecated-flags -fvia-C
159 test -f B027/F_stub.h
160
161 # test -stubdir
162 # -fvia-C, because we want to check that the .hc file can #include the stub.h
163 test028:
164 $(RM) B028/F.hi B028/F$(OBJSUFFIX)
165 $(RM) stub028/B028/F_stub.h
166 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c B028/F.hs -stubdir stub028 -fno-warn-deprecated-flags -fvia-C
167 test -f stub028/B028/F_stub.h
168
169 # -----------------------------------------------------------------------------
170 # Compilation-manager compilations, flat modules
171
172 test031:
173 $(RM) A031.hi
174 $(RM) A031$(OBJSUFFIX)
175 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make A031.hs
176 test -f A031.hi
177 test -f A031$(OBJSUFFIX)
178
179 # test -odir
180 test032:
181 $(RM) A032.hi
182 $(RM) -rf obj032
183 mkdir obj032
184 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make A032.hs -odir obj032
185 test -f obj032/A032$(OBJSUFFIX)
186
187 # test -hidir
188 test033:
189 $(RM) -rf hi033
190 $(RM) A033$(OBJSUFFIX)
191 mkdir hi033
192 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make A033.hs -hidir hi033
193 test -f hi033/A033.hi
194
195 # test stub generation
196 test034:
197 $(RM) F034.hi F034$(OBJSUFFIX) F034_stub.h
198 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make F034.hs
199 test -f F034_stub.h
200
201 # test -stubdir (filename differs from module name)
202 test035:
203 $(RM) F035.hi F$(OBJSUFFIX) stub035/Stubs_stub.h
204 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make F035.hs -stubdir stub035
205 test -f stub035/TestStub035_stub.h
206
207 # -----------------------------------------------------------------------------
208 # Compilation-manager compilations, hierarchical modules
209
210 test041:
211 $(RM) B041/C.hi
212 $(RM) B041/C$(OBJSUFFIX)
213 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make B041/C.hs
214 test -f B041/C.hi
215 test -f B041/C$(OBJSUFFIX)
216
217 # test -odir
218 test042:
219 $(RM) -rf obj042
220 mkdir obj042
221 $(RM) B042/C.hi
222 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make B042/C.hs -odir obj042
223 test -f obj042/B042/C$(OBJSUFFIX)
224
225 # test -odir with stubs
226 test042stub:
227 $(RM) -rf obj042stub
228 mkdir obj042stub
229 $(RM) B042stub/C.hi
230 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make B042stub/C.hs -odir obj042stub
231 test -f obj042stub/B042stub/C$(OBJSUFFIX)
232
233 # test -hidir
234 test043:
235 $(RM) -f B043/C$(OBJSUFFIX)
236 $(RM) -rf hi043
237 mkdir hi043
238 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make B043/C.hs -hidir hi043
239 test -f hi043/B043/C.hi
240
241 # test stub generation
242 test044:
243 $(RM) B044/F.hi B044/F$(OBJSUFFIX) B044/F_stub.h
244 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make B044/F.hs
245 test -f B044/F_stub.h
246
247 # test -stubdir
248 test045:
249 $(RM) B045/F.hi B045/F$(OBJSUFFIX)
250 $(RM) stub045/B045/F_stub.h
251 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make B045/F.hs -stubdir stub045
252 test -f stub045/B045/F_stub.h
253
254 # -----------------------------------------------------------------------------
255 # Compilation-manager compilations, hierarchical modules, non-root modules
256
257 test051:
258 $(RM) d051_2/R/S.hi
259 $(RM) d051_2/R/S$(OBJSUFFIX)
260 $(RM) d051_1/P/Q.hi
261 $(RM) d051_1/P/Q$(OBJSUFFIX)
262 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make -id051_1 -id051_2 R.S
263 test -f d051_2/R/S.hi
264 test -f d051_2/R/S$(OBJSUFFIX)
265 test -f d051_1/P/Q.hi
266 test -f d051_1/P/Q$(OBJSUFFIX)
267
268 # test -odir
269 test052:
270 $(RM) d052_2/R/S.hi
271 $(RM) d052_1/P/Q.hi
272 $(RM) -rf obj052
273 mkdir obj052
274 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make -id052_1 -id052_2 -odir obj052 R.S
275 test -f d052_2/R/S.hi
276 test -f obj052/R/S$(OBJSUFFIX)
277 test -f d052_1/P/Q.hi
278 test -f obj052/P/Q$(OBJSUFFIX)
279
280 # test -hidir
281 test053:
282 $(RM) hi053/R/S.hi
283 $(RM) d053_2/R/S$(OBJSUFFIX)
284 $(RM) hi053/P/Q.hi
285 $(RM) d053_1/P/Q$(OBJSUFFIX)
286 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make -id053_1 -id053_2 -hidir hi053 R.S
287 test -f hi053/R/S.hi
288 test -f d053_2/R/S$(OBJSUFFIX)
289 test -f hi053/P/Q.hi
290 test -f d053_1/P/Q$(OBJSUFFIX)
291
292 # -----------------------------------------------------------------------------
293 # Other tests
294
295 # Test that -keep-s-files works with --make and -fvia-C
296 test061a:
297 $(RM) A061a.hi A061a$(OBJSUFFIX) A061a.s
298 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make -keep-s-files -fno-warn-deprecated-flags -fvia-C A061a.hs
299 test -f A061a.s
300
301 # Test that -keep-s-files works without --make
302 test061b:
303 $(RM) A061b.hi A061b$(OBJSUFFIX) A061b.s
304 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c -keep-s-files -fno-warn-deprecated-flags -fvia-C A061b.hs
305 test -f A061b.s
306
307 # Test that -main-is works with --make
308 test062a:
309 $(RM) Hello062a.hs Hello062a.hi Hello062a$(OBJSUFFIX) Hello062a.hc hello062a
310 echo "module Hello062a where { hello062a = putStrLn \"ok\" }" >Hello062a.hs
311 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make -main-is Hello062a.hello062a Hello062a -o hello062a
312 ./hello062a
313 test062b:
314 $(RM) Hello062b.hs Hello062b.hi Hello062b$(OBJSUFFIX) Hello062b.hc hello062b
315 echo "module Hello062b where { main = putStrLn \"ok\" }" >Hello062b.hs
316 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make -main-is Hello062b Hello062b -o hello062b
317 ./hello062b
318 test062c:
319 $(RM) Hello062c.hs Hello062c.hi Hello062c$(OBJSUFFIX) Hello062c.hc hello062c
320 echo "module Main (hello062c) where { hello062c = putStrLn \"ok\" }" >Hello062c.hs
321 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make -main-is hello062c Hello062c.hs -o hello062c
322 ./hello062c
323 test062d:
324 $(RM) -rf B062d
325 $(RM) hello062d
326 mkdir B062d
327 echo "module B062d.Hello062d (hello062d) where { hello062d = putStrLn \"ok\" }" >B062d/Hello062d.hs
328 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make -main-is B062d.Hello062d.hello062d B062d/Hello062d.hs -o hello062d
329 ./hello062d
330 test062e:
331 $(RM) -rf B062e
332 $(RM) Hello062e.hc hello062e
333 mkdir B062e
334 echo "module B062e.Hello062e (main) where { main = putStrLn \"ok\" }" >B062e/Hello062e.hs
335 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make -main-is B062e.Hello062e B062e/Hello062e.hs -o hello062e
336 ./hello062e
337
338 # Test that -i deletes the list of search paths.
339 # The compilation will fail, but we ignore the failure and just
340 # compare the output, because make might give us a different exit code.
341 test063:
342 $(RM) A063.hi A063$(OBJSUFFIX) A063.hc D063.hi D063$(OBJSUFFIX) D063.hc
343 -"$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) --make -i -v0 D063.hs
344
345 # Test -E
346 test064:
347 $(RM) A064.hi A064.hspp
348 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -E A064.hs
349 test -f A064.hspp
350
351 # Test -E/-cpp
352 test065:
353 $(RM) A065.hi A065.hspp
354 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -E -cpp A065.hs
355 test -f A065.hspp
356
357 # Test -E/-o
358 test066:
359 $(RM) A066.hi A066.tmp
360 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -E A066.hs -o A066.tmp
361 test -f A066.tmp
362
363 # Test -E/-cpp/-o
364 test067:
365 $(RM) A067.hi A067.tmp
366 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -cpp -E A067.hs -o A067.tmp
367 test -f A067.tmp
368
369 # Test -S
370 test070:
371 $(RM) A070.hi A070.s
372 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -S A070.hs
373 test -f A070.s
374
375 # Test -S/-o
376 test071:
377 $(RM) A071.hi A071.tmp
378 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -S A071.hs -o A071.tmp
379 test -f A071.tmp
380
381
382 # Tests for #2248, -o and .exe
383
384 define test081
385 $(RM) $(1).hs $(1).hi $(1)$(OBJSUFFIX) $(1).hc $(1)$(exeext)
386 echo "module Main where { main = putStrLn \"ok\" }" >$(1).hs
387 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) --make -v0 $(1).hs
388 test -f $(1)$(exeext)
389 endef
390
391 test081a:
392 $(call test081, Test_081a)
393 test081b:
394 $(call test081, Test.081b)
395
396 # -----------------------------------------------------------------------------
397 # --make tests
398
399 # Test for overlap between home module and package module
400 test100:
401 $(RM) overlap/List.hi overlap/List.o
402 $(RM) overlap/Overlap.hi overlap/Overlap.o
403 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make -ioverlap Overlap
404
405 # -----------------------------------------------------------------------------
406 # dependency-generation tests
407
408 DEPFILE200 = depend200
409
410 # Test that we can create a dependency file, and that we can
411 # modify an existing dependency file.
412 test200:
413 $(RM) $(DEPFILE200)
414 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -M -dep-suffix "" -dep-makefile $(DEPFILE200) D200
415 test -f $(DEPFILE200)
416 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -M -dep-suffix "" -dep-makefile $(DEPFILE200) D200 B200.C A200
417 test -f $(DEPFILE200)
418 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -M -dep-suffix "" -dep-makefile $(DEPFILE200) D200.hs B200/C.hs A200.hs
419 test -f $(DEPFILE200)
420
421 # -----------------------------------------------------------------------------
422
423 T2566::
424 if "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c foo2566.bar; then false else true; fi
425
426 .PHONY: mode001
427 # We use
428 # sed '2,$$d'
429 # rather than
430 # head -1
431 # as the latter gives
432 # ghc: <stdout>: hFlush: resource vanished (Broken pipe)
433 # on OS X
434 mode001:
435 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) --make --help | sed '2,$$d'
436 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) --help --make | sed '2,$$d'
437 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) --interactive --help | sed '2,$$d'
438 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) --help --interactive | sed '2,$$d'
439 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) --version --help | sed "s/, version.*//"
440 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) --help --version | sed '2,$$d'
441 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) --interactive --version | sed "s/, version.*//"
442 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) --version --interactive | sed "s/, version.*//"
443
444 # Test for building DLLs with ghc -shared, see #2745
445 shared001:
446 $(RM) Shared001.hi Shared001.o HSdll.dll.a HSdll.dll Shared001_stub.*
447 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP_NO_RTSOPTS) -v0 -shared Shared001.hs
448
449 static001:
450 $(RM) Static001.hi Static001.o liba.a Static001_stub.*
451 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP_NO_RTSOPTS) -v0 -staticlib Static001.hs
452
453 # -----------------------------------------------------------------------------
454
455 T3674:
456 $(RM) T3674*.o T3674*.hi T3674_pre
457 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) --make T3674_pre.hs
458 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) --make T3674.hs
459
460 .PHONY: rtsopts001
461 rtsopts001:
462 $(RM) rtsOpts$(exeext) rtsOpts.hi rtsOpts.o
463 "$(TEST_HC)" $(filter-out -rtsopts,$(TEST_HC_OPTS_NO_RECOMP)) -v0 --make rtsOpts -rtsopts
464 echo "Normal"
465 -./rtsOpts +RTS -C0 2>&1
466 $(RM) rtsOpts$(exeext) rtsOpts.hi rtsOpts.o
467 "$(TEST_HC)" $(filter-out -rtsopts,$(TEST_HC_OPTS_NO_RECOMP)) -v0 --make rtsOpts
468 echo "No RTS opts"
469 -./rtsOpts +RTS -C0 2>&1
470
471 .PHONY: rtsopts002
472 rtsopts002:
473 $(RM) rtsopts002$(exeext) rtsopts002.hi rtsopts002.o
474 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make rtsopts002 -rtsopts=some
475 ./rtsopts002
476 ./rtsopts002 +RTS --info >/dev/null
477 if ./rtsopts002 +RTS -C0; then exit 1; else exit 0; fi
478 GHCRTS= ./rtsopts002
479 GHCRTS=--info ./rtsopts002 >/dev/null
480 if GHCRTS=-C0 ./rtsopts002; then exit 1; else exit 0; fi
481
482 .PHONY: withRtsOpts
483 withRtsOpts:
484 $(RM) withRtsOpts$(exeext) withRtsOpts.hi withRtsOpts.o withRtsOpts.out
485 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make withRtsOpts -with-rtsopts=--info
486 ./withRtsOpts | head -1
487 # Also test for non-safe RTS opts, these should be allowed too,
488 # since the author has explicitly requested them. (#5114)
489 $(RM) withRtsOpts$(exeext) withRtsOpts.hi withRtsOpts.o withRtsOpts.out
490 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -v0 --make withRtsOpts -with-rtsopts=-twithRtsOpts.out
491 ./withRtsOpts | head -1
492 test -f withRtsOpts.out
493
494 .PHONY: T3364
495 T3364:
496 -"$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -H
497
498 .PHONY: T706
499 T706:
500 cp T706a.hs T706.hs
501 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) $(ghciWayFlags) -c T706.hs
502 cp T706b.hs T706.hs
503 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) $(ghciWayFlags) -c T706.hs
504 echo "test" | "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) --interactive -ignore-dot-ghci -v0 T706
505
506 .PHONY: T5584
507 T5584:
508 $(RM) -rf T5584_out
509 mkdir T5584_out
510 "$(TEST_HC)" -odir T5584_out -c T5584_in/A.hs-boot
511
512 .PHONY: T5198
513 T5198:
514 $(RM) -rf T5198dump
515 [ ! -d T5198dump ]
516 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c T5198.hs -dumpdir T5198dump -ddump-to-file -ddump-simpl
517 [ -f T5198dump/T5198.dump-simpl ]
518
519 .PHONY: T7060a
520 T7060a:
521 $(RM) -rf T7060dump
522 [ ! -d T7060dump ]
523 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -O -c T7060.hs -dumpdir T7060dump -ddump-to-file -ddump-rules
524 [ -f T7060dump/T7060.dump-rules ]
525
526 .PHONY: T7060b
527 T7060b:
528 $(RM) -rf T7060dump
529 [ ! -d T7060dump ]
530 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -O -c T7060.hs -dumpdir T7060dump -ddump-to-file -ddump-rule-firings
531 [ -f T7060dump/T7060.dump-rule-firings ]
532
533 .PHONY: T7060c
534 T7060c:
535 $(RM) -rf T7060dump
536 [ ! -d T7060dump ]
537 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -O -c T7060.hs -dumpdir T7060dump -ddump-to-file -ddump-rule-rewrites
538 [ -f T7060dump/T7060.dump-rule-rewrites ]
539
540 .PHONY: T7060
541 T7060: T7060a T7060b T7060c
542
543 .PHONY: T7130
544 T7130:
545 "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -fflul-laziness
546
547 .PHONY: T7563
548 T7563:
549 -"$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -C T7563.hs
550
551 .PHONY: T6037
552 T6037:
553 -LC_ALL=C "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c T6037.hs
554
555 .PHONY: T2507
556 T2507:
557 -LC_ALL=C "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c T2507.hs
558
559 .PHONY: T8959a
560 T8959a:
561 -LC_ALL=C "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c T8959a.hs -XUnicodeSyntax
562
563 .PHONY: T703
564 T703:
565 $(RM) -rf T703
566 [ ! -d T703 ]
567 "$(TEST_HC)" $(TEST_HC_OPTS) --make T703.hs -v0
568 ! readelf -W -l T703 2>/dev/null | grep 'GNU_STACK' | grep -q 'RWE'
569
570 .PHONY: write_interface_oneshot
571 write_interface_oneshot:
572 $(RM) -rf write_interface_oneshot/A011.hi
573 "$(TEST_HC)" $(TEST_HC_OPTS) -hidir write_interface_oneshot -fno-code -fwrite-interface -c A011.hs
574 test -f write_interface_oneshot/A011.hi
575
576 .PHONY: write_interface_make
577 write_interface_make:
578 $(RM) -rf write_interface_make/A011.hi
579 "$(TEST_HC)" $(TEST_HC_OPTS) -hidir write_interface_make -fno-code -fwrite-interface --make A011.hs
580 test -f write_interface_make/A011.hi