small tidyups to thie Makefile
[ghc.git] / testsuite / timeout / Makefile
1 TOP = ..
2 include $(TOP)/mk/boilerplate.mk
3
4 HC = $(GHC_INPLACE)
5 MKDEPENDHS = $(GHC_INPLACE)
6 SRC_HC_OPTS += -threaded
7 EXCLUDED_SRCS += TimeMe.hs
8
9 ifeq "$(Windows)" "NO"
10 SRC_HC_OPTS += -package unix
11 endif
12
13 all :: calibrate.out
14
15 ifeq "$(findstring thr,$(GhcRTSWays))" "thr"
16 HS_PROG = timeout
17 else
18 all :: python-timeout
19 CLEAN_FILES += timeout
20 endif
21
22 boot :: all
23
24 calibrate.out:
25 rm -f TimeMe.o TimeMe.hi TimeMe
26 $(PYTHON) calibrate "$(HC)" > $@
27
28 CLEAN_FILES += calibrate.out
29
30 python-timeout:
31 cp timeout.py timeout
32 chmod +x timeout
33
34 include $(TOP)/mk/target.mk