Makefile 982 Bytes
Newer Older
1
TOP = ../..
2
include $(TOP)/mk/boilerplate.mk
3
include $(TOP)/mk/cabal-flags.mk
4

5
TIMEOUT_PROGRAM = install-inplace/bin/timeout$(exeext)
Simon Marlow's avatar
Simon Marlow committed
6

7
8
9
10
11
ifeq "$(findstring thr,$(GhcRTSWays))" ""
$(TIMEOUT_PROGRAM): timeout.py
	$(MKDIRHIER) `dirname $@`
	cp $< $@
	chmod +x $@
12
else
13
14
15
16
17
18
19
$(TIMEOUT_PROGRAM): timeout.hs
	$(CABAL) configure $(USE_STAGE1_CONFIGURE_FLAGS)   \
	                   $(INPLACE_DIRS_CONFIGURE_FLAGS) \
	                   $(COMMON_CONFIGURE_FLAGS)       \
					   --ghc-option=-threaded
	$(CABAL) build
	$(CABAL) install
20
21
endif

22
boot all :: calibrate.out $(TIMEOUT_PROGRAM)
Simon Marlow's avatar
Simon Marlow committed
23

24
calibrate.out:
25
26
27
28
29
30
31
32
	$(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:
33
	-$(CABAL) clean
34
35
	$(RM) -rf install-inplace
	$(RM) -f calibrate.out
36