summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2009-01-16 16:37:49 +0000
committerIan Lynagh <igloo@earth.li>2009-01-16 16:37:49 +0000
commit82de8caa4fd1ee1102344c721791a12c98b93e5b (patch)
treec84975938e436b26f41121861e05788b4db32230 /testsuite
parenta56435dc5ffc0b38d840e3fe309bdfb16fb6b2bb (diff)
downloadhaskell-82de8caa4fd1ee1102344c721791a12c98b93e5b.tar.gz
Also canonicalise the install prefix for the timeout program
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/mk/boilerplate.mk19
-rw-r--r--testsuite/timeout/Makefile5
2 files changed, 16 insertions, 8 deletions
diff --git a/testsuite/mk/boilerplate.mk b/testsuite/mk/boilerplate.mk
index 75fcb1aed0..e8bd73af3b 100644
--- a/testsuite/mk/boilerplate.mk
+++ b/testsuite/mk/boilerplate.mk
@@ -12,16 +12,21 @@ show:
@echo '$(VALUE)="$($(VALUE))"'
define canonicalise
-# $1 = program path variable
-ifneq "$$(wildcard $$($1).exe)" ""
-$1 := $$($1).exe
-endif
+# $1 = path variable
$1_CYGPATH := $$(shell cygpath -m $$($1) 2> /dev/null)
ifneq "$$($1_CYGPATH)" ""
$1 := $$($1_CYGPATH)
endif
endef
+define canonicaliseExecutable
+# $1 = program path variable
+ifneq "$$(wildcard $$($1).exe)" ""
+$1 := $$($1).exe
+endif
+$(call canonicalise,$1)
+endef
+
define get-ghc-rts-field # $1 = rseult variable, $2 = field name
$1 := $$(shell $$(TEST_HC) +RTS --info | grep '^ .("$2",' | sed -e 's/.*", *"//' -e 's/")$$$$//')
endef
@@ -96,17 +101,17 @@ ifeq "$(HP2PS_ABS)" ""
HP2PS_ABS := $(dir $(TEST_HC))/hp2ps
endif
-$(eval $(call canonicalise,TEST_HC))
+$(eval $(call canonicaliseExecutable,TEST_HC))
ifeq "$(wildcard $(TEST_HC))" ""
$(error Cannot find ghc: $(TEST_HC))
endif
-$(eval $(call canonicalise,GHC_PKG))
+$(eval $(call canonicaliseExecutable,GHC_PKG))
ifeq "$(wildcard $(GHC_PKG))" ""
$(error Cannot find ghc-pkg: $(GHC_PKG))
endif
-$(eval $(call canonicalise,HP2PS_ABS))
+$(eval $(call canonicaliseExecutable,HP2PS_ABS))
ifeq "$(wildcard $(HP2PS_ABS))" ""
$(error Cannot find hp2ps: $(HP2PS_ABS))
endif
diff --git a/testsuite/timeout/Makefile b/testsuite/timeout/Makefile
index 8acc229a4a..bdea066616 100644
--- a/testsuite/timeout/Makefile
+++ b/testsuite/timeout/Makefile
@@ -12,6 +12,9 @@ include $(TOP)/mk/boilerplate.mk
TIMEOUT_PROGRAM = install-inplace/bin/timeout$(exeext)
+PREFIX := $(abspath install-inplace)
+$(eval $(call canonicalise,PREFIX))
+
ifeq "$(filter thr, $(GhcRTSWays))" ""
$(TIMEOUT_PROGRAM): timeout.py
rm -rf install-inplace
@@ -24,7 +27,7 @@ $(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)
+ --ghc-option=-threaded --prefix=$(PREFIX)
./Setup build
./Setup install
endif