Makefile 1.25 KB
Newer Older
1
TOP=../..
chak's avatar
chak committed
2
3
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
simonpj's avatar
simonpj committed
4
5
6
7

# Trac 2386 requires batch-compile not --make
# Very important: without -O 
T2386:
8
9
	'$(TEST_HC)' $(TEST_HC_OPTS) -v0 -c T2386_Lib.hs -fforce-recomp
	'$(TEST_HC)' $(TEST_HC_OPTS) -v0 -c T2386.hs -fforce-recomp
simonpj's avatar
simonpj committed
10

Simon Marlow's avatar
Simon Marlow committed
11
12
13
14

HC_OPTS = -XTemplateHaskell -package template-haskell

TH_spliceE5_prof::
15
	$(RM) TH_spliceE5_prof*.o TH_spliceE5_prof*.hi TH_spliceE5_prof*.p.o 
16
	'$(TEST_HC)' $(TEST_HC_OPTS) $(HC_OPTS) --make -v0 TH_spliceE5_prof.hs -c
17
	'$(TEST_HC)' $(TEST_HC_OPTS) $(HC_OPTS) --make -v0 TH_spliceE5_prof.hs -prof -auto-all -osuf p.o -o $@
Ian Lynagh's avatar
Ian Lynagh committed
18
	./$@
Simon Marlow's avatar
Simon Marlow committed
19

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
.PHONY: TH_Depends
TH_Depends:
	$(RM) TH_Depends_external.txt
	$(RM) TH_Depends TH_Depends.exe
	$(RM) TH_Depends.o TH_Depends.hi
	$(RM) TH_Depends_External.o TH_Depends_External.hi
	echo "first run" > TH_Depends_external.txt
	'$(TEST_HC)' $(TEST_HC_OPTS) --make -v0 TH_Depends
	./TH_Depends
# Remove the executable, as GHC won't relink if the timestamps seem to
# be the same
	$(RM) TH_Depends TH_Depends.exe
	echo "second run" > TH_Depends_external.txt
# Give TH_Depends_external.txt a future date in case it gets the same
# timestamp again
	touch --date="now + 3 seconds" TH_Depends_external.txt
	'$(TEST_HC)' $(TEST_HC_OPTS) --make -v0 TH_Depends
	./TH_Depends