Commit cf240aa0 authored by ian@well-typed.com's avatar ian@well-typed.com

Only run dynamicToo001 if we have both vanilla and dynamic libraries

parent 6f506011
......@@ -40,6 +40,9 @@ config.compiler_debugged = ghc_debugged
if (ghc_with_vanilla == 1):
config.have_vanilla = True
if (ghc_with_dynamic == 1):
config.have_dynamic = True
if (ghc_with_profiling == 1):
config.have_profiling = True
config.compile_ways.append('profasm')
......
......@@ -81,6 +81,9 @@ class TestConfig:
# Do we have vanilla libraries?
self.have_vanilla = False
# Do we have dynamic libraries?
self.have_dynamic = False
# Do we have profiling support?
self.have_profiling = False
......
......@@ -354,6 +354,42 @@ def if_cygwin( f ):
else:
return normal
def when_have_vanilla( f ):
if config.have_vanilla:
return f
else:
return normal
def unless_have_vanilla( f ):
if config.have_vanilla:
return normal
else:
return f
def when_have_dynamic( f ):
if config.have_dynamic:
return f
else:
return normal
def unless_have_dynamic( f ):
if config.have_dynamic:
return normal
else:
return f
def when_have_profiling( f ):
if config.have_profiling:
return f
else:
return normal
def unless_have_profiling( f ):
if config.have_profiling:
return normal
else:
return f
# ---
def if_ghci_dynamic( f ):
......
......@@ -49,7 +49,8 @@ endif
BASE_LIBDIR := $(shell "$(GHC_PKG)" field base library-dirs | sed 's/^[^:]*: *//')
HAVE_VANILLA := $(shell if [ -f $(subst \,/,$(BASE_LIBDIR))/Prelude.hi ]; then echo YES; else echo NO; fi)
HAVE_PROFILING := $(shell if [ -f $(subst \,/,$(BASE_LIBDIR))/Prelude.p_a ]; 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)
ifeq "$(HAVE_VANILLA)" "YES"
RUNTEST_OPTS += -e ghc_with_vanilla=1
......@@ -57,6 +58,12 @@ else
RUNTEST_OPTS += -e ghc_with_vanilla=0
endif
ifeq "$(HAVE_DYNAMIC)" "YES"
RUNTEST_OPTS += -e ghc_with_dynamic=1
else
RUNTEST_OPTS += -e ghc_with_dynamic=0
endif
ifeq "$(HAVE_PROFILING)" "YES"
RUNTEST_OPTS += -e ghc_with_profiling=1
else
......
setTestOpts(only_compiler_types(['ghc']))
test('dynamicToo001',
extra_clean(['A001.o', 'B001.o', 'C001.o',
'A001.hi', 'B001.hi', 'C001.hi',
'A001.dyn_o', 'B001.dyn_o', 'C001.dyn_o',
'A001.dyn_hi', 'B001.dyn_hi', 'C001.dyn_hi',
's001', 'd001']),
[extra_clean(['A001.o', 'B001.o', 'C001.o',
'A001.hi', 'B001.hi', 'C001.hi',
'A001.dyn_o', 'B001.dyn_o', 'C001.dyn_o',
'A001.dyn_hi', 'B001.dyn_hi', 'C001.dyn_hi',
's001', 'd001']),
unless_have_vanilla(skip),
unless_have_dynamic(skip)],
run_command,
['$MAKE -s --no-print-directory dynamicToo001'])
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