FIX boottestsuite build failure
[ghc.git] / testsuite / timeout / Makefile
1 TOP = ..
2 include $(TOP)/mk/boilerplate.mk
3
4 HC = $(GHC_INPLACE)
5 # These are required to stop the build system adding -package-conf
6 # bootstrapping.mk, which only makes sense when $(HC)==$(GHC)
7 BOOTSTRAPPING_PACKAGE_CONF_HC_OPTS=
8 BOOTSTRAPPING_PACKAGE_CONF_MKDEPENDHS_OPTS=
9
10 MKDEPENDHS = $(GHC_INPLACE)
11 SRC_HC_OPTS += -threaded
12 EXCLUDED_SRCS += TimeMe.hs
13
14 ifeq "$(Windows)" "YES"
15 SRC_HC_OPTS += -package Win32
16 else
17 SRC_HC_OPTS += -package unix
18 endif
19
20 all :: calibrate.out
21
22 ifeq "$(findstring thr,$(GhcRTSWays))" "thr"
23 HS_PROG = timeout
24 else
25 all :: python-timeout
26 CLEAN_FILES += timeout
27 endif
28
29 boot :: all
30
31 calibrate.out:
32 rm -f TimeMe.o TimeMe.hi TimeMe
33 $(PYTHON) calibrate "$(HC)" > $@
34
35 CLEAN_FILES += calibrate.out
36
37 python-timeout:
38 cp timeout.py timeout
39 chmod +x timeout
40
41 include $(TOP)/mk/target.mk