Commit 864759cb authored by Joachim Breitner's avatar Joachim Breitner

test.mk: Be liberal in accepting GHC_PKG output

When the tree is not built, GHC_PKG refers to ghc-pkg in the patth,
which may not yet support --simple-output to suppress the field name. So
we strip the fieldname when parsing the output, to avoid annoying
warnings.
parent b33f321a
......@@ -55,7 +55,7 @@ else
RUNTEST_OPTS += -e ghc_with_native_codegen=0
endif
GHC_PRIM_LIBDIR := $(shell "$(GHC_PKG)" field ghc-prim library-dirs --simple-output)
GHC_PRIM_LIBDIR := $(subst library-dirs: ,,$(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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment