summaryrefslogtreecommitdiff
path: root/testsuite/tests/driver/sigof01/Makefile
blob: 8e373e749e35ff1448db4d5d02b154b2dba5395a (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
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))

S01_OPTS=$(TEST_HC_OPTS_NO_RECOMP) -outputdir tmp_sigof01 -i -itmp_sigof01
sigof01:
	rm -rf tmp_sigof01
	mkdir tmp_sigof01
	'$(TEST_HC)' $(S01_OPTS) -c A.hs
	'$(TEST_HC)' $(S01_OPTS) -c B.hsig -sig-of main:A
	'$(TEST_HC)' $(S01_OPTS) -c Main.hs
	'$(TEST_HC)' $(S01_OPTS) tmp_sigof01/A.o tmp_sigof01/Main.o -o tmp_sigof01/Main
	tmp_sigof01/Main

sigof01m:
	rm -rf tmp_sigof01m
	mkdir tmp_sigof01m
	'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) -outputdir tmp_sigof01m --make Main.hs -sig-of "B is main:A" -o tmp_sigof01m/Main
	tmp_sigof01m/Main

sigof01i:
	'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --interactive -v0 -ignore-dot-ghci Main.hs -sig-of "B is main:A" < sigof01i.script

sigof01i2:
	'$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --interactive -v0 -ignore-dot-ghci -sig-of "B is main:A" < sigof01i2.script