Use $(PYTHON) to run calibrate, rather than relying on it finding python itself
[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 += Calibrate.hs
8
9 ifeq "$(Windows)" "NO"
10 SRC_HC_OPTS += -package unix
11 endif
12
13 HS_PROG = timeout
14
15 boot :: calibrate.out
16
17 ifeq "$(findstring thr,$(GhcRTSWays))" "thr"
18 boot :: $(HS_PROG)
19 else
20 boot :: python-timeout
21 endif
22
23 calibrate.out:
24 rm -f Calibrate.o Calibrate.hi Calibrate
25 $(PYTHON) calibrate "$(HC)" > $@
26
27 python-timeout:
28 cp timeout.py timeout
29 chmod +x timeout
30
31 include $(TOP)/mk/target.mk