Create empty dump files when there was nothing to dump
[ghc.git] / testsuite / tests / driver / sigof02 / Makefile
1 TOP=../../..
2 include $(TOP)/mk/boilerplate.mk
3 include $(TOP)/mk/test.mk
4
5 # -fforce-recomp makes lots of driver tests trivially pass, so we
6 # filter it out from $(TEST_HC_OPTS).
7 TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
8
9 S02_OPTS=$(TEST_HC_OPTS_NO_RECOMP) -outputdir tmp_sigof02 -i -itmp_sigof02
10 sigof02:
11 rm -rf tmp_sigof02
12 mkdir tmp_sigof02
13 '$(GHC_PKG)' field containers key | sed 's/^.*: *//' > tmp_sigof02/containers
14 '$(TEST_HC)' $(S02_OPTS) -c Map.hsig -sig-of "Map is `cat tmp_sigof02/containers`:Data.Map.Strict"
15 '$(TEST_HC)' $(S02_OPTS) -c Main.hs
16 '$(TEST_HC)' $(S02_OPTS) -package containers tmp_sigof02/Main.o -o tmp_sigof02/StrictMain
17 ! ./tmp_sigof02/StrictMain
18 '$(TEST_HC)' $(S02_OPTS) -c Map.hsig -sig-of "Map is `cat tmp_sigof02/containers`:Data.Map.Lazy"
19 '$(TEST_HC)' $(S02_OPTS) -c Main.hs
20 '$(TEST_HC)' $(S02_OPTS) -package containers tmp_sigof02/Main.o -o tmp_sigof02/LazyMain
21 ./tmp_sigof02/LazyMain
22
23 S02T_OPTS=$(TEST_HC_OPTS_NO_RECOMP) -fno-code -fwrite-interface -outputdir tmp_sigof02t -i -itmp_sigof02t
24 sigof02t:
25 rm -rf tmp_sigof02t
26 mkdir tmp_sigof02t
27 '$(TEST_HC)' $(S02T_OPTS) -c Map.hsig
28 '$(TEST_HC)' $(S02T_OPTS) -c Main.hs
29
30 S02M_OPTS=$(TEST_HC_OPTS_NO_RECOMP) -outputdir tmp_sigof02m
31 sigof02m:
32 rm -rf tmp_sigof02m
33 mkdir tmp_sigof02m
34 '$(GHC_PKG)' field containers key | sed 's/^.*: *//' > tmp_sigof02m/containers
35 '$(TEST_HC)' $(S02M_OPTS) --make Main.hs -sig-of "Map is `cat tmp_sigof02m/containers`:Data.Map.Strict" -o tmp_sigof02m/StrictMain
36 ! ./tmp_sigof02m/StrictMain
37 '$(TEST_HC)' $(S02M_OPTS) --make Main.hs -sig-of "Map is `cat tmp_sigof02m/containers`:Data.Map.Lazy" -o tmp_sigof02m/LazyMain
38 ./tmp_sigof02m/LazyMain
39
40 sigof02mt:
41 rm -rf tmp_sigof02mt
42 mkdir tmp_sigof02mt
43 '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -outputdir tmp_sigof02mt --make Main.hs -fno-code -fwrite-interface
44
45 S02D_OPTS=$(TEST_HC_OPTS_NO_RECOMP) -outputdir tmp_sigof02d -i -itmp_sigof02d
46 sigof02d:
47 rm -rf tmp_sigof02d
48 mkdir tmp_sigof02d
49 '$(GHC_PKG)' field containers key | sed 's/^.*: *//' > tmp_sigof02d/containers
50 '$(TEST_HC)' $(S02D_OPTS) -c Map.hsig -sig-of "Map is `cat tmp_sigof02d/containers`:Data.Map.Lazy, MapAsSet is `cat tmp_sigof02d/containers`:Data.Map.Lazy"
51 '$(TEST_HC)' $(S02D_OPTS) -c MapAsSet.hsig -sig-of "Map is `cat tmp_sigof02d/containers`:Data.Map.Lazy, MapAsSet is `cat tmp_sigof02d/containers`:Data.Map.Lazy"
52 '$(TEST_HC)' $(S02D_OPTS) -c Double.hs
53 '$(TEST_HC)' $(S02D_OPTS) -package containers tmp_sigof02d/Main.o -o tmp_sigof02d/Double
54 ./tmp_sigof02d/Double
55
56 S02DT_OPTS=$(TEST_HC_OPTS_NO_RECOMP) -outputdir tmp_sigof02dt -i -itmp_sigof02dt -fno-code -fwrite-interface
57 sigof02dt:
58 rm -rf tmp_sigof02dt
59 mkdir tmp_sigof02dt
60 '$(TEST_HC)' $(S02DT_OPTS) -c Map.hsig
61 '$(TEST_HC)' $(S02DT_OPTS) -c MapAsSet.hsig
62 ! '$(TEST_HC)' $(S02DT_OPTS) -c Double.hs
63
64 sigof02dm:
65 rm -rf tmp_sigof02dm
66 mkdir tmp_sigof02dm
67 '$(GHC_PKG)' field containers key | sed 's/^.*: *//' > tmp_sigof02dm/containers
68 '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -outputdir tmp_sigof02dm --make Double.hs -sig-of "Map is `cat tmp_sigof02dm/containers`:Data.Map.Lazy, MapAsSet is `cat tmp_sigof02dm/containers`:Data.Map.Lazy" -o tmp_sigof02dm/Double
69 ./tmp_sigof02dm/Double
70
71 sigof02dmt:
72 rm -rf tmp_sigof02dmt
73 mkdir tmp_sigof02dmt
74 # doesn't typecheck due to lack of alias
75 ! '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -outputdir tmp_sigof02dmt -fno-code -fwrite-interface --make Double.hs -o tmp_sigof02dmt/Double