A better test for whether we have profiling
authorSimon Marlow <marlowsd@gmail.com>
Tue, 27 Jan 2009 09:48:31 +0000 (09:48 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Tue, 27 Jan 2009 09:48:31 +0000 (09:48 +0000)
Sigh, another shell command.

testsuite/mk/test.mk

index 184fa50..5078419 100644 (file)
@@ -43,7 +43,9 @@ else
 RUNTEST_OPTS += -e ghc_with_native_codegen=0
 endif
 
-ifeq "$(filter p, $(GhcRTSWays))" "p"
+HAVE_PROFILING:=$(if $(wildcard $(shell $(GHC_PKG) field haskell98 library-dirs | sed 's/^[^:]*: *//')/libHShaskell98-*_p.a),YES,NO)
+
+ifeq "$(HAVE_PROFILING)" "YES"
 RUNTEST_OPTS += -e ghc_with_profiling=1
 else
 RUNTEST_OPTS += -e ghc_with_profiling=0