diff options
Diffstat (limited to 'testsuite/timeout')
-rw-r--r-- | testsuite/timeout/Makefile | 21 | ||||
-rw-r--r-- | testsuite/timeout/Setup.hs | 6 | ||||
-rw-r--r-- | testsuite/timeout/ghc.mk | 41 |
3 files changed, 17 insertions, 51 deletions
diff --git a/testsuite/timeout/Makefile b/testsuite/timeout/Makefile index b9f87fe746..6277009dbf 100644 --- a/testsuite/timeout/Makefile +++ b/testsuite/timeout/Makefile @@ -1,22 +1,23 @@ -TOP = ../.. +TOP = .. include $(TOP)/mk/boilerplate.mk -include $(TOP)/mk/cabal-flags.mk TIMEOUT_PROGRAM = install-inplace/bin/timeout$(exeext) -ifeq "$(findstring thr,$(GhcRTSWays))" "" +ifeq "$(filter thr, $(GhcRTSWays))" "" $(TIMEOUT_PROGRAM): timeout.py - $(MKDIRHIER) `dirname $@` + rm -rf install-inplace + mkdir install-inplace + mkdir install-inplace/bin cp $< $@ chmod +x $@ else $(TIMEOUT_PROGRAM): timeout.hs - $(CABAL) configure $(USE_STAGE1_CONFIGURE_FLAGS) \ - $(INPLACE_DIRS_CONFIGURE_FLAGS) \ - $(COMMON_CONFIGURE_FLAGS) \ - --ghc-option=-threaded - $(CABAL) build - $(CABAL) install + 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) diff --git a/testsuite/timeout/Setup.hs b/testsuite/timeout/Setup.hs new file mode 100644 index 0000000000..6fa548caf7 --- /dev/null +++ b/testsuite/timeout/Setup.hs @@ -0,0 +1,6 @@ +module Main (main) where + +import Distribution.Simple + +main :: IO () +main = defaultMain diff --git a/testsuite/timeout/ghc.mk b/testsuite/timeout/ghc.mk deleted file mode 100644 index 6d69fdda18..0000000000 --- a/testsuite/timeout/ghc.mk +++ /dev/null @@ -1,41 +0,0 @@ -TIMEOUT_PROGRAM = $(INPLACE_BIN)/timeout$(exeext) - -ifeq "$(findstring thr,$(GhcRTSWays))" "" -$(TIMEOUT_PROGRAM): testsuite/timeout/timeout.py - $(MKDIRHIER) `dirname $@` - cp $< $@ - chmod +x $@ -else -testsuite/timeout_dist_MODULES = Main WinCBindings -testsuite/timeout_dist_PROG = timeout -testsuite/timeout_dist_DEP_INCLUDE_DIRS = $(GHC_INCLUDE_DIR) -testsuite/timeout_HC_OPTS = -threaded -XCPP -package process -ifeq "$(Windows)" "YES" -testsuite/timeout_HC_OPTS += -package Win32 -else -testsuite/timeout_HC_OPTS += -package unix -endif - -# XXX when GHC generates dependencies it uses the module name, not the -# filename, so we get dependencies on Main.o rather than timeout.o. -# If we don't fix this, timeout gets compiled before the libraries. -testsuite/timeout/dist/build/Main.hs : testsuite/timeout/timeout.hs $(MKDIRHIER) - @$(MKDIRHIER) $(dir $@) - $(CP) $< $@ - -$(eval $(call build-prog,testsuite/timeout,dist,1)) -endif - -all : testsuite/timeout/calibrate.out - -# depend on $(GHC_STAGE2) so we can be sure all the libs are built -testsuite/timeout/calibrate.out: $(GHC_STAGE2) - $(RM) -f testsuite/timeout/TimeMe.o testsuite/timeout/TimeMe.hi testsuite/timeout/TimeMe testsuite/timeout/TimeMe.exe - cd testsuite/timeout && $(PYTHON) calibrate "$(GHC_STAGE1_ABS)" > ../../$@ - -CLEAN_FILES += testsuite/timeout/calibrate.out - -# 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 |