summaryrefslogtreecommitdiff
path: root/testsuite/timeout/Makefile
blob: 6277009dbf5fb27a5d47a5a5a2cf51c5b9386055 (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
30
31
32
33
34
35
36
37
TOP = ..
include $(TOP)/mk/boilerplate.mk

TIMEOUT_PROGRAM = install-inplace/bin/timeout$(exeext)

ifeq "$(filter thr, $(GhcRTSWays))" ""
$(TIMEOUT_PROGRAM): timeout.py
	rm -rf install-inplace
	mkdir install-inplace
	mkdir install-inplace/bin
	cp $< $@
	chmod +x $@
else
$(TIMEOUT_PROGRAM): timeout.hs
	rm -rf install-inplace
	$(TEST_HC) --make Setup
	./Setup configure --with-compiler=$(TEST_HC) --with-hc-pkg=$(GHC_PKG) \
	                  --ghc-option=-threaded --prefix=$(abspath install-inplace)
	./Setup build
	./Setup install
endif

boot all :: calibrate.out $(TIMEOUT_PROGRAM)

calibrate.out:
	$(RM) -f TimeMe.o TimeMe.hi TimeMe TimeMe.exe
	$(PYTHON) calibrate "$(GHC_STAGE1)" > $@
# We use stage 1 to do the calibration, as stage 2 may not exist.
# This isn't necessarily the compiler we'll be running the testsuite
# with, but it's really the performance of the machine that we're
# interested in

clean distclean:
	-$(CABAL) clean
	$(RM) -rf install-inplace
	$(RM) -f calibrate.out