[commit: testsuite] master: Change how we detect what library ways are available (d047edf)
Ian Lynagh
igloo at earth.li
Sun May 12 17:57:33 CEST 2013
Repository : ssh://darcs.haskell.org//srv/darcs/testsuite
On branch : master
https://github.com/ghc/testsuite/commit/d047edf8f6b1d95e2b42138f83a334bed92fe572
>---------------------------------------------------------------
commit d047edf8f6b1d95e2b42138f83a334bed92fe572
Author: Ian Lynagh <ian at well-typed.com>
Date: Sun May 12 15:15:04 2013 +0100
Change how we detect what library ways are available
We used to use the base package to do the detection. However, base has
extra-lib-dirs: @ICONV_LIB_DIRS@
in base.buildinfo.in, which means that if ICONV_LIB_DIRS is set then
the package config will have
library-dirs: [...]base/dist-install/build /path/for/iconv
and, as paths may be double quoted and contains spaces, this makes it
a little tricky to extra the path that we want to look in (the first
path).
We therefore now use the ghc-prim package, which has no such complication.
>---------------------------------------------------------------
mk/test.mk | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/mk/test.mk b/mk/test.mk
index b43195e..fa2edb2 100644
--- a/mk/test.mk
+++ b/mk/test.mk
@@ -47,10 +47,10 @@ else
RUNTEST_OPTS += -e ghc_with_native_codegen=0
endif
-BASE_LIBDIR := $(shell "$(GHC_PKG)" field base library-dirs --simple-output)
-HAVE_VANILLA := $(shell if [ -f $(subst \,/,$(BASE_LIBDIR))/Prelude.hi ]; then echo YES; else echo NO; fi)
-HAVE_DYNAMIC := $(shell if [ -f $(subst \,/,$(BASE_LIBDIR))/Prelude.dyn_hi ]; then echo YES; else echo NO; fi)
-HAVE_PROFILING := $(shell if [ -f $(subst \,/,$(BASE_LIBDIR))/Prelude.p_hi ]; then echo YES; else echo NO; fi)
+GHC_PRIM_LIBDIR := $(shell "$(GHC_PKG)" field ghc-prim library-dirs --simple-output)
+HAVE_VANILLA := $(shell if [ -f $(subst \,/,$(GHC_PRIM_LIBDIR))/GHC/PrimopWrappers.hi ]; then echo YES; else echo NO; fi)
+HAVE_DYNAMIC := $(shell if [ -f $(subst \,/,$(GHC_PRIM_LIBDIR))/GHC/PrimopWrappers.dyn_hi ]; then echo YES; else echo NO; fi)
+HAVE_PROFILING := $(shell if [ -f $(subst \,/,$(GHC_PRIM_LIBDIR))/GHC/PrimopWrappers.p_hi ]; then echo YES; else echo NO; fi)
ifeq "$(HAVE_VANILLA)" "YES"
RUNTEST_OPTS += -e ghc_with_vanilla=1
More information about the ghc-commits
mailing list