summaryrefslogtreecommitdiff
path: root/testsuite/tests/driver/sigof03/Makefile
blob: 03a0b9b2da6635e4c6399ae47372bebb38cd7a76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk

# -fforce-recomp makes lots of driver tests trivially pass, so we
# filter it out from $(TEST_HC_OPTS).
TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))

S03_OPTS=$(TEST_HC_OPTS_NO_RECOMP) -outputdir tmp_sigof03 -i -itmp_sigof03
sigof03:
	rm -rf tmp_sigof03
	mkdir tmp_sigof03
	'$(TEST_HC)' $(S03_OPTS) -c A.hs
	'$(TEST_HC)' $(S03_OPTS) -c ASig1.hsig -sig-of "ASig1 is main:A, ASig2 is main:A"
	'$(TEST_HC)' $(S03_OPTS) -c ASig2.hsig -sig-of "ASig1 is main:A, ASig2 is main:A"
	'$(TEST_HC)' $(S03_OPTS) -c Main.hs
	'$(TEST_HC)' $(S03_OPTS) tmp_sigof03/A.o tmp_sigof03/Main.o -o tmp_sigof03/Main
	./tmp_sigof03/Main

S03M_OPTS=$(TEST_HC_OPTS_NO_RECOMP) -outputdir tmp_sigof03m
sigof03m:
	rm -rf tmp_sigof03m
	mkdir tmp_sigof03m
	'$(TEST_HC)' $(S03M_OPTS) --make Main.hs -sig-of "ASig1 is main:A, ASig2 is main:A"
	./tmp_sigof03m/Main

# Currently, the type-check tests are omitted, because we don't have a
# way of telling GHC that ASig1 and ASig2 have the same identities
# (sig-of is not right because it requires the target to have an hi
# file, but in general we won't have it.)